Athena Wiki

Audio Spectrograms

steganographybeginner

Find flags hidden in audio file spectrograms using Audacity, Sonic Visualiser, and Python.

steganographyaudiospectrogramaudacitysonic-visualiserwavmp3

Audio Spectrograms

Spectrogram steganography hides data (text, images, flags) in the frequency-time representation of an audio file. The flag is visually encoded in the spectrogram — invisible on a waveform view but clearly visible when displayed as a frequency plot. This is the most common hiding place in beginner audio CTF challenges.


How Spectrograms Work

Mermaid diagram

A spectrogram plots: X axis = Time, Y axis = Frequency, Color/brightness = Amplitude. By adding tones at specific frequencies and times, you can "draw" text in the spectrogram that is invisible to casual listening.


Step-by-Step Analysis

Basic file checks first

file suspicious.wav
exiftool suspicious.wav
strings suspicious.wav | head -30
binwalk suspicious.wav      # embedded files?
binwalk -e suspicious.wav   # extract if found

Open spectrogram in Audacity

  1. File → Import → Audio → select file
  2. In the track header (left side), click the dropdown arrow
  3. Select Spectrogram
  4. Press Ctrl+Shift+E → set window size to 2048 or 4096
  5. Look for visible text or images in the display

The flag is often clearly readable in the high-frequency range.

Try Sonic Visualiser for higher resolution

sudo apt install sonic-visualiser
  1. Open the file → Layer → Add Spectrogram
  2. Right panel: ColourWhite on Black (higher contrast)
  3. Increase Window to 8192 for fine frequency detail
  4. Switch Scale between Linear and Logarithmic

Check stereo channels separately

from scipy.io import wavfile
sample_rate, data = wavfile.read('suspicious.wav')
left  = data[:, 0]
right = data[:, 1]
# Plot spectrogram of each channel separately

Viewing Tools

sudo apt install audacity
  1. File → Import → Audio
  2. Dropdown on track → Spectrogram
  3. Ctrl+Shift+E → window size 2048 or 4096
  4. Zoom in on the frequency axis if needed
  5. Look in the 1000–8000 Hz range for text

Common CTF Variations


Checklist

  • file + exiftool + strings + binwalk
  • Open in Audacity → switch to Spectrogram view
  • Adjust window size (try 1024, 2048, 4096)
  • Sonic Visualiser for higher resolution
  • Check each stereo channel independently
  • Listen for DTMF (phone tones), Morse code, or SSTV noise
  • steghide extract -sf file.wav — sometimes applicable
  • Check metadata for hidden messages

Last updated on

On this page