Difference between pages "Forensic Disk Differencing" and "SQLite database format"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
m (See Also)
 
(Use Cases)
 
Line 1: Line 1:
Forensic Disk Differencing is the process of taking two or more disk images from the same computer and determining what changes in the first disk image might have resulted in the changes that are observed in the second. One common use of differencing is to determine what an attacker did during a break-in. To be used for this purpose, it is necessary to have a forensic disk image of the computer before the break-in and after the break-in.
+
{{expand}}
  
==Differencing Tools==
+
SQLite databases are used by many programs including several forensics tools, e.g. [[Autopsy]] 3.
===idifference.py===
+
SQLite 3 is current and older SQLite packages cannot use sqlite3 databases so use sqlite3 tools.
idifference.py is part of the [[Digital Forensics XML]] Python Toolkit distributed with [[fiwalk]]. This tool will compare two different disk images and report changes in files between the first and the second. It also produces a timeline of changes.
+
  
For example, using the '''nps-2009-canon2''' series of disk images:
+
== SQLite3 ==
  
<pre>
+
SQLite version 3 uses a page-based storage where the pages are used for various types of data e.g. there are:
$ python idifference.py /nps-2009-canon2-gen2.raw nps-2009-canon2-gen3.raw
+
* lock-byte pages
>>> Reading nps-2009-canon2-gen2.raw
+
* freelist pages
>>> Reading nps-2009-canon2-gen3.raw
+
** freelist trunk pages
 +
** freelist leaf pages
 +
* B-tree pages
 +
** table B-tree interior pages
 +
** table B-tree leaf pages
 +
** index B-tree interior pages
 +
** index B-tree leaf pages
 +
* payload overflow pages
 +
* pointer map pages
  
Disk image:/corp/drives/nps/nps-2009-canon2/nps-2009-canon2-gen3.raw
+
=== Write-Ahead Log (WAL) ===
 +
The default method by which SQLite implements atomic commit and rollback is a rollback journal. In version 3.7.0 a "Write-Ahead Log" option was added.
  
New Files:
+
== Temporary sqlite files ==
 +
Seen in e.g.
 +
<pre>
 +
/Users/%USERNAME%/AppData/Local/Temp/etilqs_%RANDOM%
 +
</pre>
  
2008-12-23 14:26:12 1315993 DCIM/100CANON/IMG_0041.JPG
+
Where "etilqs" is "sqlite" in reverse
  
Deleted Files:
+
== Use Cases ==
 +
=== Web Browser Data ===
 +
[[Mozilla Firefox]] and [[Google Chrome]] both use SQLite version 3 databases for user data such as history, downloaded files.
  
2008-12-23 14:12:38 855935 DCIM/100CANON/IMG_0001.JPG
+
=== Mobile OS ===
2008-12-23 14:22:38 1347778 DCIM/100CANON/IMG_0037.JPG
+
[[Google Android]] and [[Apple iOS]] use SQLite3 databases for many system applications. Phone data including calls, messages, and credentials are all stored in SQLite3.
  
Files with modified content (but size unchanged):
+
== External Links ==
 
+
* [http://sqlite.org/fileformat2.html The SQLite Database File Format], by the [[SQLite|SQLite project]]
Files with changed file properties:  
+
* [http://sqlite.org/wal.html Write-Ahead Logging], by the [[SQLite|SQLite project]]
 
+
* [http://forensicsfromthesausagefactory.blogspot.com/2011/04/carving-sqlite-databases-from.html Carving SQLite databases from unallocated clusters], by Richard Drinkwater, April 27, 2011
DCIM/CANONMSC/M0100.CTG SHA1 changed 69b30c352ee802f49b1ea25325af9fa05c3ffca1 -> baa42c03a917b01b212fb7e538e5deb525995f31
+
* [http://linuxsleuthing.blogspot.ch/2013/09/recovering-data-from-deleted-sqlite.html Recovering Data from Deleted SQLite Records: Redux], by [[John Lehr]], September 13, 2013
DCIM/CANONMSC/M0100.CTG crtime changed to 1230070924 -> 1230071142
+
DCIM/CANONMSC/M0100.CTG mtime changed to 1230070924 -> 1230071142
+
DCIM/CANONMSC/M0100.CTG resized 180 -> 188
+
 
+
Timeline
+
 
+
2008-12-23 14:25:42 DCIM/CANONMSC/M0100.CTG SHA1 changed 69b30c352ee802f49b1ea25325af9fa05c3ffca1 -> baa42c03a917b01b212fb7e538e5deb525995f31
+
2008-12-23 14:25:42 DCIM/CANONMSC/M0100.CTG crtime changed 1230070924 -> 1230071142
+
2008-12-23 14:25:42 DCIM/CANONMSC/M0100.CTG mtime changed 1230070924 -> 1230071142
+
2008-12-23 14:25:42 DCIM/CANONMSC/M0100.CTG resized 180 -> 188
+
2008-12-23 14:26:12 DCIM/100CANON/IMG_0041.JPG created
+
$
+
</pre>
+
  
Here are some more examples:
+
== Tools ==
* [[File:Idifference-demo1.txt]] --- idifference.py run on two disks from the 2009-M57 Patents scenario (Jo's November 23 vs. November 24th disk)
+
* [[SQLite]]
 +
* [[SQLite Forensic Reporter]]
  
==See Also==
+
[[Category:File Formats]]
*[http://dfrws.org/2012/proceedings/DFRWS2012-6.pdf A general strategy for differential forensic analysis]
+

Revision as of 10:15, 26 June 2014

Information icon.png

Please help to improve this article by expanding it.
Further information might be found on the discussion page.

SQLite databases are used by many programs including several forensics tools, e.g. Autopsy 3. SQLite 3 is current and older SQLite packages cannot use sqlite3 databases so use sqlite3 tools.

SQLite3

SQLite version 3 uses a page-based storage where the pages are used for various types of data e.g. there are:

  • lock-byte pages
  • freelist pages
    • freelist trunk pages
    • freelist leaf pages
  • B-tree pages
    • table B-tree interior pages
    • table B-tree leaf pages
    • index B-tree interior pages
    • index B-tree leaf pages
  • payload overflow pages
  • pointer map pages

Write-Ahead Log (WAL)

The default method by which SQLite implements atomic commit and rollback is a rollback journal. In version 3.7.0 a "Write-Ahead Log" option was added.

Temporary sqlite files

Seen in e.g.

/Users/%USERNAME%/AppData/Local/Temp/etilqs_%RANDOM%

Where "etilqs" is "sqlite" in reverse

Use Cases

Web Browser Data

Mozilla Firefox and Google Chrome both use SQLite version 3 databases for user data such as history, downloaded files.

Mobile OS

Google Android and Apple iOS use SQLite3 databases for many system applications. Phone data including calls, messages, and credentials are all stored in SQLite3.

External Links

Tools