Digital Forensic Tools

Database forensics basics

Short answer

Database forensics studies the data, structure and logs of a database to find what was stored, changed or deleted. SQLite is a good place to start, because phones and browsers use it widely.

What a database holds

A database stores records in tables, plus indexes and settings. Server databases keep logs of changes. File based databases such as SQLite keep everything in one file. Apps on phones and computers use these for messages, history and settings.

The same file can hold live data and traces of older data.

Where deleted data may remain

In SQLite, the file is split into pages. Unused pages are kept in a freelist, and their old content may stay until reused. A rollback journal or a write-ahead log (WAL) holds earlier page content during changes. The WAL also has its own header and frames.

Journal and WAL files are separate files next to the database. Collect them together with the main file.

How to work

Keep the original files and hash them. Work on a copy so that opening the database does not change the evidence. Read the structure first, then run read only queries.

  • Copy the database, journal and WAL files together.
  • Check the header to confirm the file type.
  • Review tables and run read only queries.
  • Use a recovery tool for deleted records.
  • Note timestamp formats, which differ by app.

Server databases

For server databases, useful sources are transaction logs, audit logs, backups and access records. Their contents depend on settings, so ask the administrator what was enabled. Procedures and laws differ by country and agency, so follow your lab's own procedure.

Common mistakes

  • Opening a live database and changing it by accident.
  • Copying only the main file and leaving out the WAL.
  • Assuming a deleted record is always recoverable.
  • Misreading timestamp formats.
  • Writing to the original while testing queries.

Key terms

Table
A set of records with the same fields.
Page
A fixed size block that SQLite uses to store data.
Freelist
The list of unused pages in a SQLite file.
WAL
A write-ahead log that holds recent changes.
Transaction log
A record of changes made to a server database.

Questions you may be asked

Where can deleted SQLite data remain?

In freelist pages, free space inside pages, the journal and the WAL file.

Why copy the WAL with the database?

It may hold recent changes that are not yet in the main file, so without it you can miss data.

Free tools to practise with

Learn more

Written in our own words from public forensic training material and standards. Last reviewed 24 Nov 2026. Procedures and laws differ by country and agency. Follow your own lab's procedure.