CSCTF 2026 · Reverse engineering · 198 pts
Operation Dawn: Radio Recovery.
A firmware's rootfs partition is zlib-compressed against a preset dictionary that is itself another partition of the same firmware.
| Event | CSCTF 2026, Operation Dawn (online jeopardy) |
|---|---|
| Category | Reverse engineering |
| Points | 198 |
| Status | Solved during the event |
| Target | firmware.bin, offline |
TL;DR. firmware.bin is a custom container with four partitions. The rootfs partition is zlib-compressed using a preset dictionary whose exact bytes are the firmware's own msgcat partition — confirmed by matching the dictionary's Adler-32 checksum. Inside the decompressed rootfs, an init script XORs an obfuscated admin token against the u-boot environment's MAC address — and there are two candidate MAC values, only one of which is the live one.
Challenge
Recover the administrative recovery token locked inside a field-radio firmware bundle.
Solution
firmware.bin is a custom "DWFW" container: a header (magic, version, entry count) followed by 20-byte entries (8-byte name, offset, size, CRC) naming four partitions — loader, ubootenv, msgcat, rootfs.
rootfs is zlib-compressed with the FDICT flag set, meaning decompression needs a preset dictionary identified only by its Adler-32 checksum (0x55d45a6c). That checksum matches the firmware's own msgcat partition exactly — the dictionary is the firmware's message catalog, hiding in plain sight as another partition. Decompressing rootfs with it yields a standard cpio archive.
Inside, /etc/config/radio holds an obfuscated admin_token, and /etc/init.d/S40admin shows it's decoded by XORing the token's hex-byte pairs against the u-boot environment's ethaddr MAC, cycling the 6 MAC bytes across the token. The ubootenv partition has two environment blocks: a decoy "recovery" block with a legacy placeholder MAC (00:11:22:33:44:55), and an active "ready" block with the real MAC. XORing with the active MAC decodes cleanly to the flag; the decoy MAC produces garbage.
Flag
CSCTF{05_train_kestrel_d48e1f}What I took from it
- A firmware bundle's own partitions can double as inputs to each other (here, one partition as a preset compression dictionary for another) — and a config file offering two candidate keys usually marks one as a decoy meant to fail quietly, not loudly.