Rating:

Just a sol:

import the file into a sqlite db save it as 1.sqlite

change all '1' int values to 0 and save it as 2.sqlite

compare two dbs, check the Char located after each difference offset

![](https://i.imgur.com/CxKYiip.pnghttp://)
```
Offsets: hexadec.

1B: 04 03
5F: 04 03
892: 08 09 I
BA5: 08 09 R
E13: 08 09 T
12A3: 08 09 S
145E: 08 09 C
169A: 08 09 E
188D: 08 09 {
1C42: 08 09 Q
1E16: 08 09 S
213E: 08 09 L
25DD: 08 09 T
2783: 08 09 I
284A: 08 09 _
2ABB: 08 09 E
2DE1: 08 09 I
306A: 08 09 _
3374: 08 09 S
3641: 08 09 H
3B3D: 08 09 A
3DAE: 08 09 D
3F7F: 08 09 R
41E6: 08 09 }
24 difference(s) found.

```

RITSEC{SQLITE_IS_HARD}

update:

how it works?

after ctf I checked values, since they are not exact size of data

```
** In an SQLite index record, the serial type is stored directly before
** the blob of data that it corresponds to. In a table record, all serial
** types are stored at the start of the record, and the blobs of data at
** the end. Hence these functions allow the caller to handle the
** serial-type and data blob seperately.
**
** The following table describes the various storage classes for data:
**
** serial type bytes of data type
** -------------- --------------- ---------------
** 0 0 NULL
** 1 1 signed integer
** 2 2 signed integer
** 3 3 signed integer
** 4 4 signed integer
** 5 6 signed integer
** 6 8 signed integer
** 7 8 IEEE float
** 8 0 Integer constant 0
** 9 0 Integer constant 1
** 10,11 reserved for expansion
** N>=12 and even (N-12)/2 BLOB
** N>=13 and odd (N-13)/2 text
```

so for "R" : 'R'= 0x52h = 82 in decimal

(82-12)/2 = 35 > size of blob data in '01_b' where '01_a'=1 in first row

[https://www.sqlite.org/fileformat.html](http://)

[https://stackoverflow.com/questions/6899363/how-to-obtain-the-size-of-a-blob-without-reading-the-blobs-content](http://)


//TMT