DL·SYS
Contact ↗

CSCTF 2026 · Forensics · 386 pts

Last Commit.

Six commits in a SQLite WAL file, and only one of them is the state the challenge actually wants reported on.

SQLite WALDatabase forensics
EventCSCTF 2026, Operation Dawn (online jeopardy)
CategoryForensics
Points386
StatusSolved during the event
Targetregistry.sqlite-wal, offline

TL;DR. Replaying a SQLite write-ahead log's 9 valid frames (checksum chain and salts all verified) in order reconstructs database state at each of 6 commit points, revealing exactly which commit first marked an export job COMPLETED — before two later commits silently altered its ownership.

Challenge

Recover the exact state of a database record at the commit where it first became COMPLETED, before later commits altered it, and export it under a stated profile.

Solution

A SQLite WAL file is a sequence of frames, each either a page update or a commit marker, chained together with checksums and a pair of salts that must match for the frame to be valid. Parsing registry.sqlite-wal directly (not through SQLite itself, to control exactly which commit is being viewed) finds 9 valid frames spanning 6 distinct commits, with every checksum and salt verifying.

Reconstructing a full database snapshot at each of the 6 commit boundaries in turn shows that export job LR-731 first reaches status COMPLETED at commit #4 (frame 5); commits 5 and 6 — which happen after that — silently change the job's recorded ownership, which is the "altered ownership" the challenge asks you to detect, not something that should be included in the report.

Running the profile's exact stated query against the commit-4 snapshot, with delivery.csv loaded as the referenced manifest, and emitting the result in the profile's specified tab/line-feed format (a header line plus 13 data rows) gives an exact byte sequence. The SHA-256 of those bytes — validated against the profile's own worked example, which the same formatting code reproduces exactly — is the flag.

Flag

FlagCSCTF{last_commit_40f3b19d5a11601e9d5e5bf0c7a3bcb6248b5667764f25549b607c27396ccf5f}

What I took from it