Audio Steganography
Audio steganography hides information inside sound files by manipulating either the frequency domain (spectrogram) or the sample data (LSB).
In CTF challenges, hidden data may appear visually in a spectrogram or may need to be extracted from the waveform itself.
Common techniques:
- Spectrogram encoding: text or images are modulated into frequencies.
- Least Significant Bit (LSB): tiny bit changes inside PCM samples carry a binary payload.
- Appended data: extra files hidden after the audio data.
- View spectrogram: Audacity -> View -> Spectrogram
- View spectrogram (alternative): Sonic Visualiser -> Layer -> Add Spectrogram
- Extract LSB data:
stegolsb wavsteg -i input.wav -o output.txt -b 100 - Inspect with
binwalkfor appended files:binwalk sound.wav - Search raw strings:
strings sound.wav
| Tool | Purpose |
|---|---|
| Audacity | Free, cross-platform audio editor that can display frequency-domain spectrograms. Excellent for spotting hidden messages visually. |
| Sonic Visualiser | Dedicated waveform and frequency viewer for deeper spectral inspection and multichannel analysis. |
| stegolsb | Command-line utility to encode or decode information from audio using Least Significant Bit manipulation. Ideal for .wav files. |
strings, xxd, binwalk |
Raw data inspection and extraction of appended payloads. |
In many cases, the flag will appear as text or a visible structure in the spectrogram.
Method 1: Audacity
- Open the audio file (File -> Open).
- Click on the track name -> Spectrogram View.
- Adjust the scale via Spectrogram Settings for better contrast.
- Look for visible text, patterns, or QR codes.
Method 2: Sonic Visualiser
- Open file and select Layer -> Add Spectrogram.
- Use color maps to enhance visual clarity.
- Export frame regions if required.
If nothing appears in the spectrogram, check for bit-level payloads.
stegolsb can extract raw binary embedded in waveforms.
Example usage:
stegolsb wavsteg -i sound.wav -o output.txt -b 100
Options:
-i: input WAV file-o: output destination-b: number of bytes to extract
Once extracted, inspect the result with file, open it as text, or use xxd to interpret the data.
- Always check file metadata using
exiftool sound.wav, sometimes clues reside in metadata. - Spectrogram hints might direct you to LSB extraction or another method.