CIDADAXSEC CTF
← Back to CTF
SteganographyHard500 points

An archive inside the image

A ZIP is appended after IEND. Carve the archive and extract the flag.

This image looks normal. But it is slightly larger than it should be, and a ZIP signature is hidden after the end of the PNG. This is a simple polyglot: one file, two formats.

Objective

Find and extract the ZIP archive appended to the image, then read <code>flag.txt</code>.

Useful tools
binwalkforemostunzipPython
Files
layers.png
Download
Hints
Hint 1
Download layers.png. Run binwalk layers.png or foremost layers.png. Look for the PK signature (ZIP local file header).
Hint 2
If carving tools are unavailable, find the offset with Python: data.find(b"PK\x03\x04"), write data[offset:] to carved.zip, then unzip carved.zip.
Hint 3
The archive contains one file, flag.txt. It holds the flag. If unzip complains about prepended data, use binwalk -e or foremost.