Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is SQLite Forensic Analysis?

Almost every application stores its data in SQLite, and deleted records survive in write-ahead logs, journals, and freelist pages long after the user believes they are gone.

Illustration for the cybersecurity term SQLite Forensic Analysis
Home / Blog / Cybersecurity Terms / What Is SQLite Forensic Analysis?
17 November 2026

What Is SQLite Forensic Analysis?

What Is SQLite Forensic Analysis?

SQLite is the most widely deployed database engine in existence, and that is not a marketing claim. It sits behind messaging applications, browsers, email clients, health and fitness trackers, and most of the operating system components on iOS and Android. If an investigation concerns what someone said, searched for, or visited, the answer is almost certainly in a SQLite file.

Forensic analysis of these files goes well beyond running a query. The interesting records are frequently the ones the application has already deleted.

The Three Files That Matter

A SQLite database is rarely one file. In write-ahead logging mode, which is the default for most mobile applications, new data is appended to a separate -wal file and only periodically checkpointed into the main database. A -shm shared memory file coordinates access.

This has a direct consequence for evidence handling. Copying only the .db file loses every record still sitting in the write-ahead log, which may be thousands of recent messages. Worse, opening the database with an ordinary client triggers a checkpoint and can delete the -wal file, destroying the very records an examiner wanted. Always collect all associated files together, work on copies, and open them with a tool that does not write.

Where Deleted Records Hide

Tools built for this include the CCL Epilog toolset, undark, walitean, and the recovery mode in the SQLite command line utility. Mobile forensic suites parse known application schemas automatically, but manual recovery remains necessary for less common applications and for verification.

Timestamps Are the Usual Trap

Different applications store time in incompatible formats within the same device, and misreading one by decades is a well-documented way to produce an embarrassing report.

FormatEpochTypical use
Unix seconds1 January 1970Android apps, many Linux tools
Unix milliseconds1 January 1970Android messaging, Java apps
Apple Cocoa1 January 2001iOS system databases
WebKit and Chrome1 January 1601Chrome history and cookies
Julian day numberAstronomicalSQLite date functions

Convert everything to UTC, record which format each column used, and state the local offset that applied on the date in question when the finding reaches a report or a court.

Databases Worth Knowing

On iOS, sms.db holds messages, CallHistory.storedata holds calls, and knowledgeC.db records application use, device locking, and charging at fine granularity, making it one of the best sources for establishing whether a phone was in use at a given moment. On Android, equivalent data sits in per-application sandboxes, with msgstore.db for WhatsApp, usually encrypted and requiring the key from the device or an associated account.

On desktops, Chrome and Edge store history, cookies, and saved credentials in SQLite, and Firefox uses places.sqlite. Several messaging clients encrypt their databases with SQLCipher, in which case the file is opaque until the key is recovered from the system keystore or from memory.

Practical Handling Rules

  1. Collect .db, -wal, -shm, and -journal as a set, and hash each one.
  2. Never open the original. Work on a verified copy.
  3. Parse before you query, so that deleted content is recovered before any tool checkpoints the log.
  4. Record the schema version, since application updates change table structures and a parser written for an older release will silently misread columns.
  5. Corroborate a recovered deleted row against another source where possible, because recovered fragments can lack the context that establishes which conversation or account they belonged to.

This level of detail routinely decides insider and misconduct investigations, and it forms part of the device examination we carry out within Investigation and Incident Response Services.

FAQ – Frequently Asked Questions

Why Must the WAL File Be Collected With the Database?

In write-ahead logging mode, recent changes live in the -wal file until a checkpoint moves them into the main database, so a database copied on its own may be missing the most recent and most relevant records entirely. The -wal file also preserves earlier versions of pages, which is a primary source for recovering deleted and edited rows.

Can Deleted Messages Be Recovered From SQLite?

Frequently, yes. Deleted rows remain in freelist pages and in the unallocated areas of pages until that space is reused, and earlier page images persist in write-ahead logs and rollback journals. Success depends on how much the application has been used since deletion and whether the database was vacuumed, which compacts the file and removes the recoverable content.

What Happens If I Open the Database in a Normal SQLite Client?

You risk destroying evidence. Opening a database in write-ahead logging mode can trigger a checkpoint that merges and then removes the -wal file, and some clients write on open regardless of intent. Always work from a hash-verified copy of the full file set, use read-only access, and prefer a forensic parser that reads the structures directly.

How Do I Know Which Timestamp Format an App Uses?

Test the conversion against a known event. Convert a value using each candidate epoch and see which produces a plausible date that matches an independently known fact, such as the time a message was sent during a controlled test or an event recorded elsewhere on the device. Document the format you concluded for each column in the report.

Related Terms

You May Be Interested In These

What Is Identity and Access Management (IAM)?

Cybersecurity Terms

17 November 2026

What Is Identity and Access Management (IAM)?

Read More
What Is a Shadow Credentials Attack?

Cybersecurity Terms

17 November 2026

What Is a Shadow Credentials Attack?

Read More
What Is a DCSync Attack?

Cybersecurity Terms

17 November 2026

What Is a DCSync Attack?

Read More