HTB: Milkshake Challenge

Milkshake - HackTheBox Challenge Writeup

Challenge Information

FieldValue
Challenge NameMilkshake
CategoryMisc
DifficultyEasy
Authord3vn0mi

Description

Can you bring all the boys to the yard?

This challenge presents a single MP3 audio file and asks us to extract hidden information. The hint about “bringing boys to the yard” is a reference to the famous Kelis song “Milkshake,” suggesting the challenge involves audio steganography.

Solution Overview

This challenge uses spectrogram steganography—a technique where data is hidden in the frequency domain of an audio file. By visualizing the frequency spectrum of the MP3 file, we can see text or patterns embedded in the spectrogram image.

Key Steps

Step 1: Identify the Challenge Files

Terminal window
find <workdir> -maxdepth 3 | head -100
file Milkshake.mp3

The main artifact is Milkshake.mp3 along with a UUID-named file (a12c7365-014c-44d5-8afc).

Step 2: Examine Audio Metadata

Terminal window
# Check for hidden metadata using exiftool
exiftool Milkshake.mp3

Standard audio metadata tools don’t reveal obvious flag content, indicating the data is hidden in the audio spectrum itself rather than ID3 tags.

Step 3: Generate Spectrogram

The key insight is to convert the audio into a visual spectrogram representation. Using ffmpeg with the showspectrumpic filter:

Terminal window
ffmpeg -y -i Milkshake.mp3 -lavfi showspectrumpic=s=1920x1080:legend=0 spectrogram.png

Parameters:

  • -y: Overwrite output file without prompting
  • -i Milkshake.mp3: Input audio file
  • -lavfi showspectrumpic=s=1920x1080:legend=0: Apply spectrogram filter
    • s=1920x1080: Output resolution (1920×1080 pixels)
    • legend=0: Disable legend overlay for cleaner output
  • spectrogram.png: Output image file

Step 4: Analyze the Spectrogram

Terminal window
file spectrogram.png

The generated PNG image contains the flag hidden in the frequency visualization. The flag text appears in the low-frequency band during the first ~2 seconds of the audio, embedded as visual patterns in the spectrogram.

Step 5: Extract the Flag

By examining the spectrogram image, the flag is visible as text encoded in the frequency spectrum:

HTB{REDACTED}

Tools Used

ToolPurpose
ffmpegGenerate spectrogram visualization from audio
exiftoolExtract audio metadata
fileIdentify file types
bashCommand execution and scripting

Key Learnings

  1. Spectrogram Steganography: Audio files can hide data in their frequency domain, which becomes visible when rendered as spectrograms.

  2. FFmpeg Filters: The showspectrumpic filter is powerful for audio visualization and can reveal hidden patterns that are invisible to the human ear.

  3. Low-Frequency Analysis: The flag was embedded in the lower frequency bands during the initial seconds of the audio—a common placement strategy for audio steganography.

  4. Multi-Domain Analysis: When audio metadata is clean and unhelpful, consider analyzing the audio in the frequency domain as the next investigation step.

  5. Resolution Matters: The 1920×1080 resolution provides sufficient pixel density to render readable text in the spectrogram.

Challenge Completion

Status: Completed successfully
Turns Used: 19 / 80
Method: MP3 spectrogram steganography analysis


This writeup demonstrates how miscellaneous challenges often require thinking beyond traditional file analysis and considering alternative representations of data, particularly in the audio/visual domain.