Hub/Blog/Binary File Carving
Binary File CarvingRutvij Khatri•6 min read•Published 2026-10-14

Zip in a JPEG: How to Detect and Carve Appended Files from Photos

Learn how polyglot files conceal archives past standard image EOF markers (FF D9) and how to carve them losslessly in your browser.

The Mechanics of Image Container EOF Markers

Standard image formats utilize strict delimiter markers to define the end of an image stream. In JPEGs, the end of image marker is always FF D9. In PNGs, it is the 8-byte IEND chunk sequence.

Standard photo viewing applications stop parsing once they reach this delimiter. Any data stitched after the EOF marker is silently ignored by viewers, but preserved on disk.

Key Investigative Takeaway

A JPEG file can contain an entire secret ZIP archive appended after FF D9 while still opening normally in every photo viewer.

1-Click In-Memory Carving

Our binary carver scans the byte stream for the true EOF marker. If trailing bytes are discovered, it checks for magic signatures (PK for ZIP, Rar! for RAR, %PDF- for PDF) and extracts the appended payload into a standalone downloadable file.

#extract zip from jpg#hidden files in picture#polyglot file forensics#carve trailing bytes jpeg
RK
Rutvij KhatriSecurity Analyst

Security Analyst and Aspiring Security Engineer passionate about digital image forensics, OSINT research, CTF steganography challenges, and client-side application security.

Related Guides in Binary File Carving