HTB: Milkshake Challenge
Milkshake - HackTheBox Challenge Writeup
Challenge Information
| Field | Value |
|---|---|
| Challenge Name | Milkshake |
| Category | Misc |
| Difficulty | Easy |
| Author | d3vn0mi |
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
find <workdir> -maxdepth 3 | head -100file Milkshake.mp3The main artifact is Milkshake.mp3 along with a UUID-named file (a12c7365-014c-44d5-8afc).
Step 2: Examine Audio Metadata
# Check for hidden metadata using exiftoolexiftool Milkshake.mp3Standard 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:
ffmpeg -y -i Milkshake.mp3 -lavfi showspectrumpic=s=1920x1080:legend=0 spectrogram.pngParameters:
-y: Overwrite output file without prompting-i Milkshake.mp3: Input audio file-lavfi showspectrumpic=s=1920x1080:legend=0: Apply spectrogram filters=1920x1080: Output resolution (1920×1080 pixels)legend=0: Disable legend overlay for cleaner output
spectrogram.png: Output image file
Step 4: Analyze the Spectrogram
file spectrogram.pngThe 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
| Tool | Purpose |
|---|---|
ffmpeg | Generate spectrogram visualization from audio |
exiftool | Extract audio metadata |
file | Identify file types |
bash | Command execution and scripting |
Key Learnings
-
Spectrogram Steganography: Audio files can hide data in their frequency domain, which becomes visible when rendered as spectrograms.
-
FFmpeg Filters: The
showspectrumpicfilter is powerful for audio visualization and can reveal hidden patterns that are invisible to the human ear. -
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.
-
Multi-Domain Analysis: When audio metadata is clean and unhelpful, consider analyzing the audio in the frequency domain as the next investigation step.
-
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.