Steganalysis — Detection Tactics
How to determine whether hidden data exists, where to look, and what signals to trust. This skill complements steganography-analyst (which handles extraction).
Core Principle
Steganalysis is observation-first. Before running any tool, ask: what about this file is unusual, inconsistent, or suspicious? The answer guides which extraction techniques to try.
1. Contextual Signals
The richest detection channel is often not the file itself but its context.
Challenge / Source Metadata
- Challenge descriptions frequently encode hints: "the answer is in the red," "look deeper than the surface," "not everything is as it appears"
- File names may be literal:
hidden.png, secret.wav, challenge_not_what_you_think.txt
- File provenance: Where did this come from? A "screenshot" that's 2MB is suspicious. A "photo" that's 300KB with no EXIF camera data is suspicious.
- Multiple files in a challenge: One may be the key/password for another. Look for relationships.
Size Anomalies
A file's size relative to its content is a strong signal:
| Observation |
What it might mean |
| PNG/BMP much larger than visual complexity suggests |
LSB payload, appended data, or hidden chunks |
| JPEG oddly large for its resolution |
Embedded files, EXIF bloat, or DCT steganography |
| Audio file much larger than expected duration |
Appended data after audio content |
| Text file larger than its visible content |
Zero-width characters, whitespace encoding |
| File size not a round number / doesn't match format norms |
Trailing data appended after format end marker |
Behavioral Signals
- A file that "works" as two different formats (open as image, also
unzip succeeds) — polyglot
- A file that crashes some viewers but not others — format manipulation
- Metadata that contradicts the file content (EXIF says "Photoshop" but the challenge says "raw screenshot")
2. Visual / Structural Anomalies
Images — What to Notice
Without any tools:
- Unusual color banding or noise patterns in specific bit planes — LSB stego often creates subtle grain
- Image looks "normal" but has a suspiciously large file size
- Thumbnail doesn't match the full image (EXIF thumbnail may predate stego modification)
- Transparency (alpha channel) in a format that shouldn't need it — data may be in the alpha
PNG-specific structural tells:
- Non-standard chunks (anything beyond IHDR/PLTE/IDAT/IEND) —
pngcheck -v reveals these
- Dimensions that seem wrong or are "magic numbers" (256x256, 512x512) — may have been cropped to hide rows/columns
- CRC mismatch on IHDR — dimensions were tampered with to conceal content
JPEG-specific tells:
- Multiple SOI (Start of Image) markers — embedded JPEG
- Data after the EOI (End of Image) marker — appended content
- Thumbnail in EXIF that shows different content than the main image
Audio — What to Notice
- Spectrogram shows visual patterns (text, QR codes, images) — visual steganography in frequency domain
- Unnatural silence gaps — Morse code or on/off encoding
- File size vs duration mismatch — data appended after audio
- DTMF tones that spell out digits — phone-number encoding
Text — What to Notice
- Lines that "feel" uneven or have invisible padding — whitespace encoding
- Copy-paste from a document that has odd character counts — zero-width Unicode
- Characters that look identical but aren't (Latin 'a' vs Cyrillic 'а') — homoglyph substitution
- Text that renders differently across viewers — encoding tricks
3. Statistical Tells
When context and visual inspection aren't enough, statistical analysis reveals what the eye can't see.
Entropy
- High entropy in unexpected places: Natural images have structured entropy. Random-looking regions in a smooth image suggest encrypted or compressed hidden data.
- Low entropy in expected-random regions: An encrypted payload that's been LSB-embedded may actually lower the entropy of the LSB plane compared to noise.
binwalk -E visualizes entropy — look for flat-line regions (encrypted data) or anomalies at specific offsets.
Bit Plane Analysis
The most revealing statistical technique for images:
- Clean images: Bit planes show structured, correlated patterns that follow the image content
- LSB-stego images: The least significant bit plane looks random/noisy instead of correlated
- Higher-bit stego: Bits 1-2 may show noise while bits 3-7 show clean image structure
Use bit_plane_extract.py --list to check the ratio of on/off pixels per plane. In clean images, lower bits should correlate with image content. In stego images, they approach 50/50 randomness.
Channel Correlation
- In natural images, R/G/B channels are correlated. LSB stego decorrelates the modified channel.
- XOR between channel bit planes: clean images show structure, stego images show noise.
4. Modern / AI-Based Steganography
Recent research uses neural networks to hide data in ways that defeat classical detection. Key tactics for identifying these:
What AI Stego Looks Like
- No LSB artifacts: Classical tools (zsteg, StegSolve) find nothing. The data is encoded in learned features, not bit planes.
- "Too clean": The image looks perfect — no noise, no artifacts, no structural anomalies. Natural images always have some imperfections.
- Consistent statistical profile: AI stego is trained to match the statistical distribution of clean images. It passes chi-square and RS tests.
- High capacity with no visible change: Papers report hiding entire images (23+ bpp) with only 0.76% pixel modification. If an image seems to contain more information than its visual complexity suggests, consider neural stego.
Detection Approaches (No Samples Needed)
- Ensemble steganalysis: Run multiple detection methods and look for disagreement. If chi-square says clean but SRM features say suspicious, investigate further.
- Feature-space analysis: Neural stego modifies learned features, not pixels. Tools that analyze deep features (not just pixel statistics) are more likely to detect it.
- Adversarial awareness: Modern stego can be adversarially trained to fool specific detectors. If one detector says clean, try a different one — transferability is limited.
Practical Implications for CTF
- If classical tools all come up empty on an image that contextually should contain hidden data, suspect AI stego
- Look for hints about the method in the challenge: "deep," "neural," "learned," "generated" suggest AI-based hiding
- Entropy analysis is still useful:
binwalk -E may reveal patterns even when LSB analysis doesn't
- Consider the challenge author's style — if they've used AI stego before, expect it again
5. Decision Framework
Is there hidden data?
│
├── Context says yes (challenge hint, file provenance, size anomaly)?
│ ├── YES → Start extraction (steganography-analyst skill)
│ └── MAYBE → Continue below
│
├── Structural anomaly? (wrong format, extra chunks, appended data)
│ ├── file + binwalk + xxd → format mismatch or embedded content?
│ └── pngcheck / exiftool → metadata inconsistencies?
│
├── Visual anomaly? (noise, banding, suspicious alpha)
│ ├── Bit plane analysis → LSB plane looks random?
│ └── Channel XOR → decorrelated channels?
│
├── Statistical anomaly? (entropy, bit distribution)
│ ├── binwalk -E → entropy spikes or flat regions?
│ └── bit_plane_extract.py --list → on/off ratio near 0.5?
│
├── All classical tests pass clean?
│ └── Suspect AI stego or no stego at all
│ ├── Context still says yes? → Try ensemble detection, deep feature analysis
│ └── Context says no? → Probably no hidden data
│
└── Found it → Switch to steganography-analyst for extraction
6. Common False Positives
- JPEG compression creates LSB noise that looks like stego — always check if the file is a re-saved JPEG
- Camera sensor noise in photos produces random-looking LSB patterns — this is normal
- PNG optimization tools may reorder chunks or add metadata — not stego
- Text encoding differences (UTF-8 vs Latin-1) can create apparent "hidden" characters — check the declared encoding
1---2name: steganalysis3description: Detection-first tactics for finding hidden data in images, audio, files, and text. Use when you need to determine WHETHER something is hidden, WHERE to look, and WHAT signals indicate steganographic content — before attempting extraction. Covers contextual analysis, structural anomalies, statistical tells, and modern AI-based steganography detection.4license: MIT5---67# Steganalysis — Detection Tactics89How to determine whether hidden data exists, where to look, and what signals to trust. This skill complements steganography-analyst (which handles extraction).1011## Core Principle1213Steganalysis is observation-first. Before running any tool, ask: **what about this file is unusual, inconsistent, or suspicious?** The answer guides which extraction techniques to try.1415## 1. Contextual Signals1617The richest detection channel is often not the file itself but its context.1819### Challenge / Source Metadata2021- **Challenge descriptions** frequently encode hints: "the answer is in the red," "look deeper than the surface," "not everything is as it appears"22- **File names** may be literal: `hidden.png`, `secret.wav`, `challenge_not_what_you_think.txt`23- **File provenance**: Where did this come from? A "screenshot" that's 2MB is suspicious. A "photo" that's 300KB with no EXIF camera data is suspicious.24- **Multiple files in a challenge**: One may be the key/password for another. Look for relationships.2526### Size Anomalies2728A file's size relative to its content is a strong signal:2930| Observation | What it might mean |31|-------------|-------------------|32| PNG/BMP much larger than visual complexity suggests | LSB payload, appended data, or hidden chunks |33| JPEG oddly large for its resolution | Embedded files, EXIF bloat, or DCT steganography |34| Audio file much larger than expected duration | Appended data after audio content |35| Text file larger than its visible content | Zero-width characters, whitespace encoding |36| File size not a round number / doesn't match format norms | Trailing data appended after format end marker |3738### Behavioral Signals3940- A file that "works" as two different formats (open as image, also `unzip` succeeds) — **polyglot**41- A file that crashes some viewers but not others — format manipulation42- Metadata that contradicts the file content (EXIF says "Photoshop" but the challenge says "raw screenshot")4344## 2. Visual / Structural Anomalies4546### Images — What to Notice4748**Without any tools:**49- Unusual color banding or noise patterns in specific bit planes — LSB stego often creates subtle grain50- Image looks "normal" but has a suspiciously large file size51- Thumbnail doesn't match the full image (EXIF thumbnail may predate stego modification)52- Transparency (alpha channel) in a format that shouldn't need it — data may be in the alpha5354**PNG-specific structural tells:**55- Non-standard chunks (anything beyond IHDR/PLTE/IDAT/IEND) — `pngcheck -v` reveals these56- Dimensions that seem wrong or are "magic numbers" (256x256, 512x512) — may have been cropped to hide rows/columns57- CRC mismatch on IHDR — dimensions were tampered with to conceal content5859**JPEG-specific tells:**60- Multiple SOI (Start of Image) markers — embedded JPEG61- Data after the EOI (End of Image) marker — appended content62- Thumbnail in EXIF that shows different content than the main image6364### Audio — What to Notice6566- Spectrogram shows visual patterns (text, QR codes, images) — **visual steganography in frequency domain**67- Unnatural silence gaps — Morse code or on/off encoding68- File size vs duration mismatch — data appended after audio69- DTMF tones that spell out digits — phone-number encoding7071### Text — What to Notice7273- Lines that "feel" uneven or have invisible padding — whitespace encoding74- Copy-paste from a document that has odd character counts — zero-width Unicode75- Characters that look identical but aren't (Latin 'a' vs Cyrillic 'а') — homoglyph substitution76- Text that renders differently across viewers — encoding tricks7778## 3. Statistical Tells7980When context and visual inspection aren't enough, statistical analysis reveals what the eye can't see.8182### Entropy8384- **High entropy in unexpected places**: Natural images have structured entropy. Random-looking regions in a smooth image suggest encrypted or compressed hidden data.85- **Low entropy in expected-random regions**: An encrypted payload that's been LSB-embedded may actually *lower* the entropy of the LSB plane compared to noise.86- `binwalk -E` visualizes entropy — look for flat-line regions (encrypted data) or anomalies at specific offsets.8788### Bit Plane Analysis8990The most revealing statistical technique for images:9192- **Clean images**: Bit planes show structured, correlated patterns that follow the image content93- **LSB-stego images**: The least significant bit plane looks random/noisy instead of correlated94- **Higher-bit stego**: Bits 1-2 may show noise while bits 3-7 show clean image structure9596Use `bit_plane_extract.py --list` to check the ratio of on/off pixels per plane. In clean images, lower bits should correlate with image content. In stego images, they approach 50/50 randomness.9798### Channel Correlation99100- In natural images, R/G/B channels are correlated. LSB stego decorrelates the modified channel.101- XOR between channel bit planes: clean images show structure, stego images show noise.102103## 4. Modern / AI-Based Steganography104105Recent research uses neural networks to hide data in ways that defeat classical detection. Key tactics for identifying these:106107### What AI Stego Looks Like108109- **No LSB artifacts**: Classical tools (zsteg, StegSolve) find nothing. The data is encoded in learned features, not bit planes.110- **"Too clean"**: The image looks perfect — no noise, no artifacts, no structural anomalies. Natural images always have some imperfections.111- **Consistent statistical profile**: AI stego is trained to match the statistical distribution of clean images. It passes chi-square and RS tests.112- **High capacity with no visible change**: Papers report hiding entire images (23+ bpp) with only 0.76% pixel modification. If an image seems to contain more information than its visual complexity suggests, consider neural stego.113114### Detection Approaches (No Samples Needed)1151161. **Ensemble steganalysis**: Run multiple detection methods and look for disagreement. If chi-square says clean but SRM features say suspicious, investigate further.1172. **Feature-space analysis**: Neural stego modifies learned features, not pixels. Tools that analyze deep features (not just pixel statistics) are more likely to detect it.1183. **Adversarial awareness**: Modern stego can be adversarially trained to fool specific detectors. If one detector says clean, try a different one — transferability is limited.119120### Practical Implications for CTF121122- If classical tools all come up empty on an image that contextually *should* contain hidden data, suspect AI stego123- Look for hints about the method in the challenge: "deep," "neural," "learned," "generated" suggest AI-based hiding124- Entropy analysis is still useful: `binwalk -E` may reveal patterns even when LSB analysis doesn't125- Consider the challenge author's style — if they've used AI stego before, expect it again126127## 5. Decision Framework128129```130Is there hidden data?131│132├── Context says yes (challenge hint, file provenance, size anomaly)?133│ ├── YES → Start extraction (steganography-analyst skill)134│ └── MAYBE → Continue below135│136├── Structural anomaly? (wrong format, extra chunks, appended data)137│ ├── file + binwalk + xxd → format mismatch or embedded content?138│ └── pngcheck / exiftool → metadata inconsistencies?139│140├── Visual anomaly? (noise, banding, suspicious alpha)141│ ├── Bit plane analysis → LSB plane looks random?142│ └── Channel XOR → decorrelated channels?143│144├── Statistical anomaly? (entropy, bit distribution)145│ ├── binwalk -E → entropy spikes or flat regions?146│ └── bit_plane_extract.py --list → on/off ratio near 0.5?147│148├── All classical tests pass clean?149│ └── Suspect AI stego or no stego at all150│ ├── Context still says yes? → Try ensemble detection, deep feature analysis151│ └── Context says no? → Probably no hidden data152│153└── Found it → Switch to steganography-analyst for extraction154```155156## 6. Common False Positives157158- **JPEG compression** creates LSB noise that looks like stego — always check if the file is a re-saved JPEG159- **Camera sensor noise** in photos produces random-looking LSB patterns — this is normal160- **PNG optimization** tools may reorder chunks or add metadata — not stego161- **Text encoding differences** (UTF-8 vs Latin-1) can create apparent "hidden" characters — check the declared encoding