$ cat writeup.md…
$ cat writeup.md…
broncoctf2026
Task: a corrupted challenge.png that no viewer can open, with a wiped PNG signature, zeroed IHDR height, and invalid chunk CRCs. Solution: restore the 8-byte magic signature, derive the missing height (200) from the inflated IDAT scanline geometry, recompute every chunk CRC32, then OCR the repaired image for the flag.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
I rubbed this lamp and out came challenge.png. But, I can't open it for some reason. Help me out and maybe I'll grant you a wish (flag).
A file challenge.png is provided but cannot be opened by any image viewer. The
goal is to repair the corrupted PNG and read the flag rendered inside it.
The title "Magic Ways" is a semantic clue pointing at PNG magic bytes
(the file signature). The flag bronco{REDACTED} confirms this.
file challenge.png reports only data, not a PNG image, so the header is
broken. A hex dump of the first bytes reveals the exact damage:
$ xxd -l 64 challenge.png
00000000: dead beef 0000 0000 0000 000d 4948 4452 ............IHDR
00000010: 0000 01f4 0000 0000 0802 0000 00... ................
Findings:
de ad be ef 00 00 00 00
instead of the correct 89 50 4e 47 0d 0a 1a 0a. The deadbeef marker is a
classic "I was corrupted on purpose" tell.00 00 00 0d = 13, type IHDR.
00 00 01 f4 = 500.00 00 00 00 = 0 (zeroed — this is invalid, a PNG cannot have
height 0).02 (truecolor RGB).pngcheck still complains.00 00 19 3d = 6461 bytes, zlib header 78 9c.So three things must be repaired: the signature, the IHDR height, and every chunk CRC.
...
$ grep --similar