Skip to content
Pwnversity
CRYPTO-STEGOintermediate · 5 min · upd. 2026-10

Steganography

T1027.003

Steganography hides information inside another medium (image, audio, text, network) so that its very existence goes unnoticed —unlike encryption, which hides the content but not the fact that a message exists. It’s a CTF classic (forensics/stego category) and shows up in exfiltration and covert C2.

While cryptography makes the message unreadable (you can see something is encrypted), steganography makes it invisible (it looks like a normal photo or audio). Combining them —encrypt, then hide— gives confidentiality and, on top of that, raises no suspicion: it’s the robust option.

Cryptography Steganography
Hides The content The message’s existence
Can you tell something’s there? Yes No
Goal Confidentiality Concealment

In offense and in CTFs the challenge is to detect and extract: given a seemingly innocent file, determine whether it hides data and recover it. In defense, the inverse goal: detect covert channels and sanitize input before it’s used for exfiltration or C2. See Malware C2.

  • LSB (Least Significant Bit): alter the least significant bit of each pixel or sample; imperceptible changes that encode data.
  • Metadata/EXIF: text hidden in image fields (comments, GPS).
  • Append / data after EOF: attach a ZIP or file after the end of the JPEG/PNG (polyglot).
  • Audio spectrogram: draw text or an image visible when viewing the WAV spectrum.
  • Text stego: spaces, zero-width characters, capitalization, whitespace.
  • Network: data in headers or in packet timing (covert channel).
flowchart TD
    A[Suspicious file] --> B[file + exiftool + strings]
    B --> C{Anything embedded?}
    C -->|binwalk detects| D[binwalk -e / foremost to extract]
    C -->|no| E{Is it an image?}
    E -->|PNG/BMP| F[zsteg + stegsolve: LSB and planes]
    E -->|JPEG/WAV| G[steghide / stegseek with a wordlist]
    E -->|audio| H[Spectrogram: Audacity / sonic-visualiser]
    D --> I[Decode in CyberChef]
    F --> I
    G --> I
    H --> I
Ventana de terminal
# 1. Basic inspection
file suspicious.png
exiftool suspicious.png
strings -n 8 suspicious.png
binwalk suspicious.png # embedded files? -> binwalk -e to extract
# 2. Images: bit planes and LSB
zsteg suspicious.png # PNG/BMP: detects LSB and common payloads
steghide extract -sf image.jpg # JPEG/WAV with a passphrase

Red Team: breaking stego with a passphrase

Section titled “Red Team: breaking stego with a passphrase”
Ventana de terminal
# stegseek: very fast brute force of steghide with a wordlist
stegseek image.jpg rockyou.txt
# also try passphrases from the challenge context or the authorized engagement
  • Statistical steganalysis: detect anomalies in the LSBs (chi-square, tools like StegExpose).
  • Sanitization: recompress or normalize images and strip metadata on input (DLP controls).
  • Network: inspect covert channels (anomalous sizes or timing). See Malware C2.
  • Multiple malware campaigns hide payloads or C2 configuration in images (PNG/JPEG) to evade detection.
  • APTs use steganography for exfiltration and to hide configurations in images posted on legitimate sites (MITRE ATT&CK technique T1027.003, Steganography).
  • Recurring use in forensic CTFs as the first filter over the evidence.
  • file + exiftool + strings as a first pass
  • binwalk/foremost: embedded files or data after EOF?
  • Images: zsteg/stegsolve for LSB and bit planes
  • steghide/stegseek with a wordlist for JPEG/WAV
  • Audio: check the spectrogram (sonic-visualiser/Audacity)
  • Text: zero-width / whitespace stego
  • Decode what you find in CyberChef (it may be encrypted)