Steganography: Finding Hidden Data in Files part 2

Depov

Moderator
Staff member
MODERATOR
ULTIMATE
SUPREME
PREMIUM
MEMBER
Joined
Feb 18, 2025
Messages
790
Reaction score
1,510
Hidden Data in Audio: Spectrograms and DTMF

Audio steganography is a category that Russian-language resources barely cover. Meanwhile, audio-based problems are becoming increasingly common in CTF tournaments, and if you only solve images, you'll barely cover half the steganography category.

Spectrogram. Text or an image is encoded in the frequency spectrum of an audio file. Open the WAV file in Sonic Visualizer (Layer → Add Spectrogram) or Audacity (switch the track to Spectrogram mode) and you'll see a text or QR code drawn using frequencies. From the command line: sox audio.wav -n spectrogram -o spectro.pnggenerates PNG with spectrogram without launching GUI.

DTMF tones. Two-tone signals from a telephone keypad. If you hear a beeping sound, it could be a number or a code. Decoding: multimon-ng -t wav -a DTMF audio.wav.

Morse code. Visually detected in Audacity as alternating beeps and pauses. Decoded manually or using online decoders. There's no magic involved—just dots and dashes.

LSB to WAV. steghide works with WAV, so the standard workflow applies: steghide info audio.wav, then extract or stegseek. WavSteg also extracts LSB data from WAV files, specifying the number of bits to analyze.

SSTV (Slow-Scan Television). An image encoded in an audio signal—a technology from amateur radio. It's decoded using qsstv on Linux or RX-SSTV on Windows. If the CTF outputs an audio file with a characteristic "hissing" sound, it's most likely SSTV. The sound is unmistakable: it sounds like a fax modem from the 1990s trying to transmit an image (which is pretty much what it sounds like).

A separate check: compare the declared audio data size in the WAV header with the actual file size. If the file is larger than expected, there is hidden data appended to the audio data, which binwalk or foremost can extract.
Steganography in Real-World Attacks: MITRE ATT&CK T1027.003

Steganography is cataloged by MITRE as technique T1027.003 —a subtechnique of Obfuscated Files or Information. In real campaigns, the pattern is simpler than in CTFs: the first stage downloads an image from a regular hosting service, extracts the payload at a specific offset, and runs the result in memory.

The payload wasn't embedded in the pixels—it was simply appended to the file with a delimiter. The goal was to bypass the mail gateway and endpoint scanner, which check executable files more aggressively than images. Essentially, the attacker isn't exploiting a vulnerability, but rather the assumption that "images are safe."

To protect against MITRE, D3FEND offers : File Integrity Monitoring (D3-FIM) to detect modified files, Executable Allowlisting (D3-EAL) to block unknown executable files, Local File Permissions (D3-LFP) to restrict access to potentially dangerous media files.

The attacker's motivation: steganography is not a standalone attack, but a delivery wrapper. Images are trusted by default on corporate networks, and stego-techniques work only as long as this trust is not challenged through monitoring.
Forensics CTF Steganography Traps

A few things that participants consistently stumble over:

The extension is lying. File image.jpgmay be a PNG, ZIP, or text file. The first command is always file. Always.

Empty steghide password. Half of steghide problems can be solved with an empty string. Try this before brute-forcing—you'll save minutes.

False binwalk signatures. binwalk sometimes finds "attached files" that don't exist—false positives due to random matches with magic bytes. Check the extracted files for validity; don't get too excited.

Steghide plus PNG. Steghide doesn't work with PNG. If the task suggests steghide, but the file is a PNG, you may need to convert the format or look for a different file in the problem.

Multiple layers. Hidden data can be nested like a Russian doll: an archive within an image, and within that archive, another image with a steghide payload. Don't stop at the first artifact.

The file's tail is in hex. Sometimes it's useful to just open the file in a hex editor—HxD, 010 Editor, or via xxd | tail— and look at the last bytes. The flag can be appended to the end in pure ASCII, without any steganography. On one CTF, I spent about twenty minutes searching for the LSB embedding, and the flag was in the last 40 bytes in plaintext.

Steganography in CTF is a workflow discipline, not a collection of tools. I've run dozens of tournaments and see a consistent pattern: teams that solve ten stego problems per competition don't open StegSolve—six commands in the terminal cover everything faster. Binwalk, exiftool, and steghide work for years without updates because the file formats are stable. But there's a shift that many ignore: more and more problems are moving toward audio steganography, SSTV, and zero-width text characters, where the standard image workflow is useless. Solve only images and you'll cover half the category. Expand your arsenal to include Audacity. multimon-ngand Unicode
 
Top Bottom