elder-plinius/ST3GG: How Vectorized Python Weaponized a 90s Spy Trick
By replacing fragile loops with matrix operations, this multi-modal toolkit makes data exfiltration invisible to modern EDRs, LLM filters, and social media compression.

Hide anything. In any file. Across every modality. Undetected.
- ST3GG abandons traditional Python loops for NumPy vectorization, achieving 100x speedups in encoding high-resolution payloads.
- The toolkit bypasses standard bit-plane analysis using the SPECTER cipher, which pseudo-randomly scatters data across color channels.
- By implementing F5 and custom DCT manipulation, ST3GG ensures hidden data survives aggressive social media image compression.
- Beyond images, ST3GG generates polyglot files that serve as valid PNGs in viewers but execute as ZIP archives or bypass LLM filters via Unicode obfuscation.
The Vectorized Engine
Traditional steganography tools iterate through image pixels one by one. This makes them prohibitively slow for modern high-resolution payloads. ST3GG abandons the for loop entirely. It relies on a vectorized NumPy engine to perform bitwise operations across millions of pixels simultaneously.
This architectural shift drops encoding times by orders of magnitude. The core logic in steg_core.py manages channel selection and bit depth, packing data into a 32-byte header containing magic bytes, versioning, and a CRC32 checksum. This makes the payloads self-describing, allowing the tool to auto-detect parameters during decoding.
SPECTER and the Matryoshka Protocol
Speed is useless if the payload is easily detected by standard bit-plane analysis. ST3GG implements a novel cross-channel hopping cipher called SPECTER. It pseudo-randomly scatters data across RGB and Alpha planes based on a seeded RNG.
The toolkit also supports nesting up to 11 layers deep. Operators can hide a payload inside a file, inside another file, using different algorithms at each layer. This "Matryoshka" mode complicates detection exponentially.
Surviving the Modern Web
A major historical flaw of LSB steganography is that simple JPEG compression destroys the hidden data. ST3GG counters this by implementing the F5 algorithm and custom Discrete Cosine Transform (DCT) manipulation.
This allows payloads to survive the aggressive compression algorithms used by platforms like X and Discord. Furthermore, its text-based modules use Unicode obfuscation to bypass LLM safety filters, turning steganography into a prompt injection vector.
The Polyglot Reality
ST3GG extends far beyond static images. It generates polyglot files that serve as valid PNGs in an image viewer but execute as valid ZIP archives when passed to extraction utilities. By supporting audio (WAV echo hiding) and network packets (PCAP timing channels), it provides a comprehensive suite for red teamers operating in heavily monitored environments.
| Feature | Traditional Tools | ST3GG |
|---|---|---|
| Speed | Python `for` loops | NumPy Vectorized operations |
| Evasion | Sequential LSB writing | SPECTER Cross-channel hopping |
| Resilience | Destroyed by JPEG compression | Survives via F5/DCT manipulation |
| Modality | PNG images only | Polyglot (Image, Audio, PCAP, Unicode) |