How to hide an archive in an audio spectrogram and find hidden data with one command
If you've ever played in a CTF or analyzed suspicious files in forensics, you probably remember the pain. For images you run zsteg or stegsolve, for audio you open Sonic Visualiser, for LSB analysis you search for an old Python 2 script, and for JPEG you remember steghide. In the end, your desktop ends up cluttered with a dozen utilities of varying degrees of abandonment.
A project called StegoForge by developer Nour833 recently appeared on GitHub. The author tried to combine all popular steganography and steganalysis techniques into a single tool with a convenient CLI and local web interface. Moreover, the utility can work not only with familiar PNG files but also with MP4, Office documents, PDFs, binaries, and even network packets.
Let's figure out how this thing works and what useful features you can get out of it.
What's inside StegoForge
Under the hood it's a modular Python framework, but it's also distributed as ready-made binaries for Windows, macOS, and Linux. So you don't necessarily need to set up an environment and manage dependencies if you need to quickly check a file on a virtual machine.
The repository covers two tasks at once: packing hidden data into a carrier file (steganography) and searching for hidden payloads in unknown files (steganalysis).
The container can be almost any popular format:
- Raster images: PNG, JPEG, WebP, GIF, BMP. Various methods are supported, from classic LSB to frequency-based embedding via DCT and adaptive algorithms.
- Audio: WAV, MP3, FLAC, OGG. Data can be embedded in the least significant bits of samples, phase shifting, or drawing an image directly on the spectrogram.
- Video: MP4 and WebM via keyframe and motion vector embedding.
- Documents: hiding in invisible Unicode characters (zero-width), PDF streams, and XML structures of Office files.
- Executables: packing into slack space and overlay sections of PE and ELF.
All data is encrypted via AES-256-GCM with Argon2 key derivation before embedding, so an attacker won't be able to simply spot meaningful text in a hex editor.
Main features in practice
Competition mode and blind analysis
In CTF challenges, it's rarely known in advance exactly how the flag is hidden. Usually you have to manually iterate through methods. StegoForge has a dedicated command ctf for this.
stegoforge ctf -f suspicious.mp3
The command runs the file through heuristics, statistical tests (chi-square, RS analysis), and tries to detect characteristic signatures or encrypted blocks. For images, the utility can connect convolutional neural networks in ONNX format, which are downloaded from HuggingFace on first launch and evaluate the probability of steganographic embedding.
Spectrograms and visual sound
One of the most illustrative techniques in audio steganography is embedding an image into the frequency spectrum. StegoForge does this in one line:
stegoforge encode -c track.wav -p logo.png --method spectrogram
The output is a regular audio file. When listening, you hear noise, but if you open the track in any spectrum analyzer, the embedded image will clearly appear on the screen.
Double bottom for plausible deniability
An interesting implementation of the decoy mode. You can write two different payloads with different passwords into one carrier file:
stegoforge encode -c photo.png \
-p secret.pdf -k "main-password" \
--decoy fake_notes.txt --decoy-key "fake-password"
If you're asked to decrypt the container, you enter the decoy password fake-password and hand over an innocent text file. Proving the existence of a second hidden archive without knowing the main password is mathematically difficult.
Checking data survivability on social networks
Most platforms like Telegram, Discord, or Twitter recompress uploaded images, destroying the least significant bits. StegoForge has built-in Reed-Solomon error correction and ready-made social media compression profiles. You can directly in the terminal check whether the payload will remain readable after platform-side optimization:
stegoforge encode -c photo.png -p text.txt -k "pass" --target twitter --test-survival
How the project is structured
The architecture is divided into independent layers:
- The core
core/contains encoders for each type of carrier (image, audio, video, document, binary, network). - The
detect/module is responsible for mathematical analysis, entropy calculation, and running ONNX models. - The
crypto/module encapsulates cryptographic primitives (Argon2, AES-GCM, X25519). - Interfaces are separated: there's a CLI with an interactive menu and a web interface on Flask.
The web interface is launched locally with the command stegoforge web. In it you can visually view pixel change heatmaps, compare the original with the stego container, and click through methods without memorizing terminal flags.
What to pay attention to
The project is still young, the repository has about six hundred stars, but the codebase is tidy. Some nuances:
- On the first launch of the neural network detector, the script will reach out to the network to download model weights to
~/.stegoforge/models. If you're working on an isolated machine without internet, you should preload the weights into the cache in advance. - Some complex embedding methods in video and compressed JPEG take noticeably more time and CPU resources than simple LSB in uncompressed PNG.
Who will find it useful
StegoForge is worth bookmarking for CTF participants, digital forensics specialists, and students studying information security. The tool eliminates the zoo of scattered utilities and provides a clear platform for experimenting with data hiding and detection.
You can clone the repository or grab a ready-made binary from the project page on GitHub.
Related projects