Skip to content
FossShelf
Home / Categories / For Security Teams

StegoForge

Hide and detect data across any file type

Replaces —

0.62K starsMITlast commit 1 Nov 2026

Who it's for

CTF competitor

Run `stegoforge ctf -f challenge.png` to execute every detector and extraction attempt against a challenge file and get a single ranked report. The blind extractor tries common parameter combinations and recovers unencrypted payloads in StegoForge's layout.

Digital forensics researcher

Analyse suspicious files with chi-square, RS, metadata, camera fingerprint, and ML detection in one pass. The `diff` command produces a pixel-level heatmap of changes between a clean carrier and a suspected stego file. Documented error rates in docs/DETECTOR-EVAL.md support reproducible reporting.

You need a tool with court-admissible chain-of-custody features.

Privacy-focused communicator

Embed encrypted messages in ordinary image or audio files using AES-256-GCM with Argon2id key derivation. The dead-drop commands (`stegoforge deadrop post/check/monitor`) move carrier files through HTTP endpoints, and X25519 key exchange with optional Ed25519 signatures handles session key setup.

You need a tool audited for production operational security use cases.

Security tooling developer

Import StegoForge's encoder and crypto modules directly as a Python library. Encoders subclass core.base.BaseEncoder, raise typed exceptions, and separate encryption from embedding so each layer can be used independently. JSON output schemas are available via `stegoforge schema --json`.

The problem

Security researchers, CTF competitors, and digital forensics practitioners typically need separate tools to embed hidden data and to detect it. Existing steganography tools rarely enforce encryption, rarely document what survives platform recompression, and rarely expose the same engine through both a CLI and a local web UI suitable for analysing untrusted files.

How it works

20 embedding methods across 9 carrier types

Supports lsb, adaptive-lsb, fingerprint-lsb, alpha, dct, palette, audio-lsb, phase, spectrogram, video-dct, video-motion, unicode, linguistic, pdf, docx, xlsx, elf, pe, tcp-covert, and timing-covert. Every method documents its capacity formula and what it does not survive in docs/METHODS.md.

AES-256-GCM encryption enforced by default

Every payload is sealed with AES-256-GCM under an Argon2id key (3 passes, 64 MiB, 2 lanes) with a fresh salt and nonce per embed. The envelope is bound to the embedding method, so a payload cannot be replayed into a different method. Plaintext embedding requires an explicit --allow-plaintext flag.

11 detection engines in one command

Running `stegoforge detect` or `stegoforge ctf` invokes chi-square, RS analysis, metadata, blind extractor, camera fingerprint (PRNU), binary padding, an ONNX ML model, and media anomaly checks. Results carry documented error bars from the bundled test corpus (docs/DETECTOR-EVAL.md).

Platform survival simulation

The `survive` command simulates 10 platform recompression profiles locally and tests whether the embedded payload survives. In the documented test (1200x780 photo, 50-byte payload), DCT survived 7 of 10 profiles; JPEG quality around 80 and below destroyed it.

Local web UI with security hardening

The web UI listens on 127.0.0.1 only, enforces Host and Origin checks against DNS rebinding and cross-site form posts, uses constant-time token comparison, rate-limits requests, serves downloads as attachments, escapes all file-derived content before rendering, and serves fonts from the package with no third-party requests.

Scriptable JSON output and library API

Every command accepts --json and prints exactly one JSON document to stdout with stable error codes on stderr. The core encoders and crypto layer are importable as a library; every encoder subclasses core.base.BaseEncoder and raises typed ValueError subclasses rather than raw parser exceptions.

Features

  • 20 embedding methods across 9 carrier types
  • AES-256-GCM encryption enforced by default
  • 11 detection engines in one command
  • Platform survival simulation
  • Local web UI with security hardening
  • Scriptable JSON output and library API

How to install

pipx install "stegoforge[web]" stegoforge doctor

Recommended for this setup

Strengths

  • Honest about what it cannot do: The documentation explicitly lists what each embedding method does not survive, detectors report inconclusive rather than false negatives, measured error rates are published with error bars in docs/DETECTOR-EVAL.md, and docs/THREAT-MODEL.md lists the full scope of what is and is not protected.
  • No network calls by default: StegoForge never downloads an executable or model at runtime. The web UI makes no third-party requests. The --offline flag and STEGOFORGE_OFFLINE=1 environment variable disable all network access entirely. The bundled ONNX model and its checksum are included in the package.
  • Deniability and header suppression: --decoy stores two payloads under two separate keys in equal-sized, header-less slots, providing protection against someone who has only the file. --no-magic removes the identifying header entirely. --pad-to hides the payload length.
  • Multiple install paths including no-Python binaries: Available as a PyPI package via pipx, a .deb for Debian and Kali that installs a man page, pre-built binaries for Linux x86_64, macOS arm64, and Windows x86_64, and a Docker image. CI tests on Python 3.10 and 3.12 with a blocking dependency audit.

Trade-offs

  • Video output plays in FFmpeg-based players only: Video payloads are written as lossless H.264 using the High 4:4:4 Predictive profile. Files play in VLC and mpv but not in most browsers. Any re-encode after embedding destroys the payload.
  • Detectors miss most small payloads: On the bundled test corpus, chi-square and RS analysis miss most small payloads, and the blind extractor cannot detect keyed embeds at all. Detection results are indicators, not proof, and a clean result does not prove a file is clean.
  • GIF and indexed PNG capacity is too small for encrypted payloads: The palette method for GIF and indexed PNG provides only a few bytes of capacity. The AES-256-GCM envelope alone is 50 bytes, making these carriers impractical for any keyed payload.
  • Network covert channels require root and explicit acknowledgement: The tcp-covert and timing-covert methods are marked experimental. Live send and capture mode requires root privileges and an explicit flag acknowledging the use. Trace-file mode does not require root.

Tech stack

Languages
Python, HTML, JavaScript, CSS, Shell, Dockerfile
Frameworks
Flask
Databases
—
Tooling
—

FAQ

Does StegoForge require Python to run?

No. Pre-built standalone binaries are available from the Releases page for Linux x86_64, macOS arm64, and Windows x86_64. A .deb package for Debian, Ubuntu, and Kali is also available and uses the system Python libraries. For Python users, `pipx install stegoforge` covers any OS running Python 3.10 or newer.

Is the web UI safe to leave running while analysing untrusted files?

The web UI is designed for that use case. It listens on 127.0.0.1 only, enforces Host and Origin header checks to block DNS rebinding and cross-site form posts, escapes all file-derived content before rendering, serves downloads as attachments, and makes no third-party requests including fonts.

What happens if decryption fails?

A wrong passphrase, a damaged file, and a file with nothing hidden in it all return the same error with the stable machine code `decryption-failed`. This prevents distinguishing between a wrong key and a clean file based on the error alone.

Will an embedded payload survive uploading to social media?

It depends on the method and platform. The `stegoforge survive` command simulates 10 platform recompression profiles locally and tests extraction. In the documented test, JPEG DCT survived 7 of 10 profiles; platforms applying quality around 80 or below (WhatsApp, Facebook, TikTok) destroyed it. Pixel LSB methods are destroyed by any lossy recompression.

How does StegoForge handle backward compatibility between versions?

Payloads, decoy containers, and key-exchange files written by StegoForge 1.1.5 and earlier still open in current versions via a distinct KDF profile. The `--require-v2` flag refuses older-format files. The reverse is not true: version 1.1.5 cannot open files produced by version 1.5 or later.

Similar tools

More in Security Teams