PNG Chunks & IHDRRutvij Khatri•8 min read•Published 2026-10-14

Detecting Ancillary PNG Steganography: tEXt, zTXt, and pHYs Exploits

Learn how to detect and extract hidden text, scripts, and embedded binaries concealed within PNG metadata chunks (tEXt, zTXt, iTXt).

Executive Verdict & Direct Answer
✓ 100% Client-Side In-Browser Engine

Learn how to detect and extract hidden text, scripts, and embedded binaries concealed within PNG metadata chunks (tEXt, zTXt, iTXt). tEXt and zTXt chunks can hold compressed binary archives without triggering visual rendering artifacts.

How Text Metadata is Stored in PNGs

The PNG specification provides three standardized chunks for storing textual metadata: `tEXt` (uncompressed Latin-1 text), `zTXt` (zlib-compressed Latin-1 text), and `iTXt` (internationalized UTF-8 text, optionally compressed).

Software like Adobe Photoshop, ImageMagick, and Stable Diffusion web UIs utilize these chunks to embed generation prompts, color space profiles, and author comments.

However, steganographers exploit these chunks because they can store arbitrary binary data or compressed archives disguised as text comments, without altering a single pixel on screen.

Key Investigative Takeaway

tEXt and zTXt chunks can hold compressed binary archives without triggering visual rendering artifacts.

The pHYs Chunk Dimensional Trick

The `pHYs` (Physical Pixel Dimensions) chunk specifies the intended aspect ratio and display resolution in pixels per meter.

In CTF challenges and visual spoofing attacks, modifying pHYs values forces certain viewers to stretch or compress the display aspect ratio, obscuring visual details when viewed on default monitors.

Extracting and Sanitizing Ancillary Chunks with OverlayCheck

OverlayCheck extracts, decompresses, and renders all text and ancillary chunk payloads in browser RAM, and provides a one-click "Strip Ancillary Chunks" button to generate a clean, minimal PNG.

PNG Metadata Extraction: OverlayCheck vs. ExifTool

Evaluating ancillary chunk decompression and extraction thoroughness.

Feature / DimensionOverlayCheck (Client-Side)ExifTool CLIBrowser Inspect Element
Decompress zTXt / iTXt Payloads
Automatic in-browser decompression
Extracts as text stringsCannot access internal chunks

Command-Line Automation & CLI Workflows

For security engineers and forensic examiners automating pipelines or conducting terminal audits, the equivalent low-level commands can be executed natively:

Extract All PNG Text Chunks via ExifTool
bash
exiftool -PNG:all suspect.png
Technical Breakdown: Extracts all PNG-specific textual tags including Title, Author, Description, Comment, and Software.

Frequently Asked Technical Questions

Q1:Does stripping ancillary chunks affect image quality?

No. Ancillary chunks contain only metadata and comments. The visual raster data resides entirely inside IDAT chunks and remains 100% bit-perfect.

#png text chunk steganography#ztxt hidden data#itxt metadata analysis#png stego detection#extract png comments
RK
Rutvij KhatriSecurity Analyst & Aspiring Security Engineer

Security Analyst and Aspiring Security Engineer passionate about client-side media verification, binary parsing, web application security auditing, CTF steganography challenges, and zero-knowledge privacy architecture.

Connect on LinkedIn

Companion Verification & Privacy Toolkits

Cross-Cluster Workflows

Related Deep Dives in PNG Chunks & IHDR