web / crypto / osint / forensics / dfir

LUN4R CTF 2026

Three full writeups from LUN4R CTF 2026: a six-decoy web challenge that ends in Jinja2 SSTI and RCE, a password hidden in a deleted GitHub commit, and a Windows DFIR case built on three unreliable clocks.

September 2026team: 0xAvengers3 challenges solved: Iron Veil Systems, Lunar Last Transmission, Quiet Backup

SSTI · JWT · IDOR · jinja2 · zipcrypto · github forensics · NTFS timestomping · windows forensics · logon type 9

LUN4R CTF 2026

Team: 0xAvengers Handle: 0xAnon (Wahid Khan) Event: LUN4R CTF 2026, hosted at rootriet.in

Full writeups with screenshots are published as PDFs, linked at the bottom of each section.


Iron Veil Systems (web)

Category: Web / SSTI / IDOR / JWT Flag format: lun4r{...}

A defense-contractor document site ships six layered decoys, each one convincing enough to look like the real flag: a rot13'd robots.txt comment, char-code-obfuscated JavaScript, steganographic PNGs with appended credentials, and a textbook IDOR on /api/v2/files?id=. Every one of them resolves to a FLAG{n_...} or DECOY{...} string, never the real lun4r{} format, and each is numbered (1, 2, 3, 4, 6), which turns out to matter later.

The real path: the IDOR leak and a logout response both independently confirm a JWT secret hint ("named after the organization, lowercase"). Forging a token with HS256 and secret ironveil and a sysadmin role gets into /internal/dashboard, which again only serves up another decoy. The actual target is /internal/preview, a Jinja2 "template render" tool with a keyword blacklist on flag, __class__, __globals__, import, popen, read(, and friends. Jinja2's ~ string-concatenation operator builds every forbidden substring at render time, so the blacklist (which scans the raw request body for literal matches) never sees them whole:

{{ get_flashed_messages[('__glob'~'als__')]['os'][('po'~'pen')](('cat /app/secrets_conf'~'ig.py'))[('re'~'ad')]() }}

That's arbitrary command execution, reading secrets_config.py off disk: a repeating-key-XOR, base64-encoded vault of every decoy flag plus the real one, keyed by an environment variable also pulled through the same SSTI. Decrypting it confirms every decoy number (1, 2, 3, 4, 6, and a 7 never actually surfaced on the site) and reveals the real flag, which was never reachable by following any of the "obvious" techniques on their own.

Flag: lun4r{v31l_sh4tt3r3d_n0_m0r3_s3cr3ts_7f9a2e}

Full writeup, with screenshots (PDF)


Lunar Last Transmission (crypto / OSINT / binary forensics)

Category: Crypto / Forensics Flag format: Lun4R{...}

A 315KB ZipCrypto-encrypted archive containing roughly 800 files, almost all of them noise: a fake RFC-17 lead designed to send you password-cracking against a real but irrelevant RFC, and two files addressed directly to an AI assistant, instructing it to stop and report a specific decoy string. Both are prompt injection and both fail the one test that matters: neither produces a string in the stated flag format.

The actual password never lived in the archive. A web search on the challenge's own naming surfaced the author's GitHub repo, whose commit history had a file added and then removed one commit later. Deleting a file in git doesn't erase it from history, and the GitHub REST API serves the diff of any commit by hash regardless of what happened afterward. That recovered commit contained the exact password-construction recipe (operator, station, relay designation, and a maintenance cycle number, each transformed a specific way), all four values published on the same repo's lore page. Building the password from them (n0x17echo77392) opened the real archive.

Inside, a binary container (transmission.bin) with a documented record format and a deobfuscation spec using a seed XORed against two separately-supplied calibration constants. Verifying the spec's own checksum field against all 256 records first (256/256 passed) confirmed the documented offsets were trustworthy before building a 27-hop traversal on top of them, landing cleanly on the terminator sentinel and decoding to the flag fragment.

Flag: Lun4R{FRAGMENT_SHARD_b5acb9c6b3dc}

Lesson that mattered most: OSINT the challenge author, not just the challenge. The password was never crackable from inside the archive.

Full writeup, with screenshots (PDF)


Quiet Backup (forensics / DFIR)

Category: Forensics, Windows incident response Flag format: Lun4R{A_B_C_D}

A 16-file forensic package (mail gateway logs, Amcache, Prefetch, $UsnJrnl, Security event logs, a proxy log, a file-hash inventory) covering a phishing intrusion and a staged data exfiltration disguised as a legitimate nightly backup. No filler: every file is load-bearing, but several exist specifically to compete with each other and have to be reasoned past rather than taken at face value.

Three clocks in the evidence set are each individually unreliable, and the whole case is built around not defaulting to "the timestamp says so":

  • Timestomping. The loader's $STANDARD_INFORMATION (what Explorer/dir show) claims a creation date ten months before the incident. Its $FILE_NAME attribute and the $UsnJrnl entry both independently show the real creation time.
  • Local time vs. UTC. Prefetch logs local time and says so explicitly; converting it lines up, within seconds, with the UTC timestamps from the journal and Amcache, confirming the conversion rather than the raw local time.
  • An unsynchronized server clock. One server's time service had been failing to sync since a reboot nine days before the incident, so every local timestamp it recorded afterward, including the key logon event, needs the same caveat applied.

The flag's four components each required ruling out a competing, more obvious answer: the compromised host (stripping a hyphen the clue calls "scars"), the real foothold date (cross-confirmed in UTC by two independent log sources), which of two similarly-named executables was the actual loader (one was legitimately pushed by SCCM; the other was unsigned, living in a user-writable path, impersonating a known vendor name), and, hardest, that a suspicious overnight logon attributed to one named user was actually Logon Type 9 (NewCredentials), the Windows signature of credential injection or pass-the-hash, not a real interactive session by that person, corroborated by badge logs and VPN logs that placed them off-site the whole time. A staged backup archive (a small, hand-picked subset of files, built by a process that never appears in the legitimate backup agent's own telemetry) matched byte-for-byte against the same outbound destination IP the original workstation had already beaconed to.

Flag: Lun4R{WKSDEV04_20250908_9f2c8a41_9SVC-BACKUP}

Full writeup, with screenshots (PDF)


Also attempted, not solved

A Moon Knight-themed pwn challenge ("Afterimage", a custom heap allocator with a real but unexploited object-ID overflow bug), a KumoSec EDR telemetry-gateway reverse-engineering challenge (framing protocol and signing scheme never recovered after roughly 15,000 attempts across symmetric and asymmetric candidates), a KumoVault supply-chain/phishing-lure challenge, a Nightwatch web challenge (SOC agent platform, hash-based auth), and a pwn challenge built around a Meltdown-style cache side channel on a custom VM (methodology worked out, exploit not completed in time).

written by wahid khan (@0xAnon)

all writeups