The challenge hands you beach.png. Preview opens it. The browser opens it. Your phone opens it.
Blue water, blown-out clouds, nothing weird in the histogram. The write-up category says steganography.
You zoom to 400% and stare at sand until your eyes hurt.
That stall is familiar. A “clean” PNG usually means the decoded image is fine — not that the file on disk is only an image. CTF authors love that gap: viewers render the valid prefix and silently ignore extra bytes, alternate chunks, or bit patterns your eyes were never built to read.
This checklist is deliberately file-first. You stay in hex, lengths, and structure until the bytes force you into pixels. It pairs with deeper walkthroughs on LSB, trailing data, and bit planes and on decode-first encoding when the payload is text wrapped in Base64 or friends — but the order here is what saves time under the clock.
What “Clean” Actually Promises (and What It Doesn't)
A normal viewer promises: given these PNG chunks, I will show you a bitmap. It does not promise:
- the file ends exactly at
IEND - every chunk is innocent metadata
- pixel low bits still match the original photograph
- the filename extension matches the only format inside the blob
Treat “opens fine” as step zero passed, not as evidence that the puzzle lives in the picture content. Most false starts come from skipping straight to LSB because the category label said stego.
Rule 0: Work on a Copy
Before any checklist step: duplicate the file. Never open the challenge original in an editor that re-encodes on save. Preview crops, GIMP exports, and “optimize PNG” all destroy trailing data and LSB payloads. If you already mutated the file, re-download and reset.
The File-First Checklist (About Five Minutes)
Run these in order. Each step has a stop condition: either you found something worth decoding, or you check the box and move on. Do not loop a step because you're bored — move down the list.
1. Magic bytes and polyglot sniffing (~20 seconds)
Confirm what you're actually holding:
xxd -l 16 beach.png
file beach.png
A PNG should start with 89 50 4E 47 0D 0A 1A 0A. If you see 50 4B (ZIP) or
FF D8 (JPEG) at offset zero, you're not in PNG land — switch mental models. Polyglots exist:
a file that validates as PNG while also embedding ZIP, PDF, or script content elsewhere. Suspicious but
valid magic just means keep going, not open Stegsolve yet.
Stop if: file reports a different primary type than you expected, or
multiple types. Carve or extract the non-image portion before touching pixels.
2. Size versus dimensions (~30 seconds)
Compare on-disk size to what the header claims:
ls -l beach.png
file beach.png # reports pixel dimensions
exiftool beach.png | egrep -i 'Image Size|File Size'
A 200×150 thumbnail at a few KB is plausible. The same dimensions at 3 MB is not “high quality” — it's usually extra chunks, uncompressed experimental encoding, embedded archives, or a blob of appended data. You don't need the exact byte math yet; you need a mental flag that says something else is in here.
Stop if: size is wildly mismatched. Prioritize trailing-data and chunk inspection (steps 4–5) before LSB.
3. Strings and metadata skim (~45 seconds)
Cheap text wins still happen on “clean” files:
strings -n 6 beach.png | tail -30
strings -n 6 beach.png | grep -iE 'flag|key|password|hint|CTF'
exiftool -a -G1 beach.png
Read tEXt, iTXt, and zTXt chunks in ExifTool output — CTF authors
hide hints in comment fields. Compare with our
EXIF reality check: social-style
metadata is rare on raw challenge files, but deliberate Comment or Description
tags are not.
Stop if: you see flag{, a password, or an obvious second-stage filename inside
strings. Decode or follow that lead before pixel work.
4. Chunk structure and ordering (~60 seconds)
PNG is chunk soup. Viewers hide weirdness; parsers sometimes don't:
pngcheck -v beach.png
# or:
python3 -c "
import struct, sys
data = open(sys.argv[1],'rb').read()
assert data[:8] == b'\\x89PNG\\r\\n\\x1a\\n'
off = 8
while off < len(data):
if off + 8 > len(data): break
length = struct.unpack('>I', data[off:off+4])[0]
ctype = data[off+4:off+8]
print(f'{off:08x} {ctype.decode(errors=\"replace\")} len={length}')
if ctype == b'IEND': break
off += 12 + length
" beach.png
Look for duplicate IHDR, odd IDAT placement, or custom chunk types
(puNk, prIv, anything four ASCII letters). Unknown chunk types are allowed by
spec; viewers skip them; CTF payloads love them. An IHDR that doesn't match what you see when
opened can mean multiple embedded images — only one gets rendered by default.
Stop if: pngcheck errors, or you find a nonstandard chunk with large length.
Extract that chunk's data and run step 7 (encoding) on it.
5. Trailing data after IEND (~45 seconds)
Find the end-of-image marker and look past it:
grep -abo IEND beach.png
xxd beach.png | tail -20
binwalk beach.png
Standard PNG ends with the IEND chunk (often visible in hex as
49 45 4E 44 AE 42 60 82). Bytes after that are not part of the rendered bitmap — but they're
still in the challenge file. Concatenated ZIPs, second PNGs, and raw flags live here more often than inside
the sand texture.
Stop if: non-zero tail length. Carve from the offset after IEND, try
file on the carved blob, or let binwalk extract candidates.
6. Quick entropy sanity (~optional 30 seconds)
Not every player runs entropy on day one, but on bloated files it's a fast compass:
# binwalk -E beach.png # if available
# or visually: hex editor, jump to middle of file — repeating patterns vs high-entropy noise
Uniform high entropy in a region that isn't compressed IDAT suggests encrypted or compressed
payload — decode the container first, not individual channels. Low entropy ASCII-ish regions in a “photo"
often mean cleartext or Base64 waiting for
layered decoding.
Stop if: you isolated a high-entropy block inside a custom chunk or tail — treat it as a file to identify, not as noise to XOR blindly.
7. Encoding pass on anything textual (~60 seconds)
Anything that looks like text but not a flag shape goes through the encoding workflow: Base64, hex, URL encoding, ROT, reversed strings, nested combinations. This step belongs in the file-first path because trailing data and chunk comments often deliver encoded flags, not cleartext. Only after this fails should you assume the answer requires bit extraction.
8. Pixel domain — last, not first
If steps 1–7 are honestly empty, now you earn LSB extraction, bit-plane views, and channel-order
permutations. That's the territory covered in
CTF Steganography 101. The only
addition at this stage: confirm you didn't miss a palette or transparency trick (tRNS,
indexed color) that stores data outside classic RGB LSB walks.
Stop if: extracted bytes start with PK (ZIP) or known magic — you're back in
file-first land. Unzip and restart the checklist on the inner file.
Decision Tree in One Screen
When someone asks “what do I do with this normal-looking PNG?” — point them here:
- Copy file → magic + size sanity.
- Strings + ExifTool comments.
- Chunk list /
pngcheck. - Tail after
IEND+binwalk. - Decode any text-like hits.
- LSB + bit planes only if the file layer is dry.
If you're stuck in a loop on step 6 without running step 5, you're probably fighting the wrong layer.
When to Quit a Branch
Timeboxed CTF work needs exit criteria, not hope:
- Trailing data: no tail after
IEND,binwalksilent → check off and leave. - Metadata: empty comments and no chunk anomalies → check off.
- LSB defaults: one row-major RGB pass, first 512 bytes look random, LSB planes look like photo noise on all channels → vary order once, then escalate or seek hint.
- Not stego at all: sometimes the PNG is a QR code, a spectrogram screenshot, or a download wrapper. If the checklist is clean and the category is broad forensics, search the whole disk image or companion files — the PNG was never the payload.
Mistakes That Make a Clean File Stay “Clean”
Opening the original in a re-encoding tool and “just checking” filters. Running Instagram-style compression
on a challenge download. Assuming stego means visual steganography — many “picture” challenges are
append-only or comment-only. Spending twenty minutes on red-channel LSB when strings would have
shown flag{ after byte 140,000.
The checklist is boring on purpose. Boring steps catch the hides that look like perfect beach photos.
Putting It Together
A PNG that looks innocent is doing its job. Your job is to ask what else shares the filename. File-first triage — magic, size, strings, chunks, tail, encoding — clears most Jeopardy stego without touching a single slider in a GUI. Pixel techniques still matter, but they're step eight, not step one.
If you want the same order baked into a mobile workflow — tail hex preview, chunk awareness, LSB and bit planes when the bytes finally point there — StegInsight follows that progression on iPhone, iPad, and Mac, locally on device. Use whatever stack you like; keep the checklist order anyway.
Next time a “clean” PNG lands in your downloads folder, resist zooming the sand. Scroll to the end of the file first. The flag is often already sitting past the part the beach photo needed.