DL·SYS
Contact ↗

CSCTF 2026 · Forensics · 136 pts

Last Buffer.

Two Vim swap files from the same editor session — only one's buffer hash matches what the operator actually typed into the shell right before disconnecting.

Vim swap file forensics
EventCSCTF 2026, Operation Dawn (online jeopardy)
CategoryForensics
Points136
StatusSolved during the event
Targettwo .swp/.swo files + shell journal, offline

TL;DR. Of two Vim swap files recovered from a crashed session, the real one is identified not by its filename or revision number but by cross-referencing its recorded buffer hash against a `sha256sum` command the operator actually ran in a separate shell-journal log, moments before a SIGHUP disconnect.

Challenge

Recover an authorization code from the correct one of two recovered Vim swap files.

Solution

Both Vim 9 swap files parse cleanly. The .swp file is marked UNSAVED-AT-DISCONNECT, revision R18, with a recorded base_file_sha256 value. The .swo file is marked as an earlier periodic snapshot, revision R16, labelled as a drill rather than a live session.

The deciding evidence is external: a separate shell-journal log (shell-journal.jsonl) records the operator running sha256sum on pts/4 immediately before a SIGHUP disconnect event, and that command's recorded output hash matches the .swp file's base_file_sha256 exactly — confirming the .swp file is the genuine crash-session buffer, not the .swo drill snapshot.

The .swp file's authorization_b64 field (base64url) decodes directly to the flag. The .swo file's equivalent field decodes to an explicitly labelled decoy string, "retired-training-readback-16".

Flag

FlagCSCTF{last_buffer_4051c9f6b0d9622479785f613b063916}

What I took from it