βββ ββ βββ ββββ β βββ ββββββ βββ ββ ββββββ βββ β ββ ββββ
ββββ ββββββββ ββ ββ β βββββββ β ββββ βββ ββββ ββ ββββ ββ βββββββββββ
βββ ββββββ βββ βββ ββ ββββββββ ββββ ββββββββ βββ β ββββ βββ ββββββββ βββ
βββ ββββββββββββ ββββ βββββββββ β ββββββ βββ ββββ ββββββββ βββ ββββββββββ
ββββ ββ ββββββββ βββββββββββββββββββββββββ β βββββ βββββββββββββββββ βββ βββ
β ββ ββ βββββ ββ β β ββ β βββ β β β βββββ β ββ β ββ βββ βββββ β β ββββββββ
β ββ β ββ ββ ββ β ββ β ββ ββ β β β βββ β β β β β β βββββ β β βββ β
ββ β β β β β β ββ β β β ββ β β β β βββ β β β β
β β β β β β β β β β β β β β β
β β β
Author: KTN (TrΖ°Ζ‘ng NhαΊt BαΊ£o Nam)
Version: 1.0
Status: Public Release (Outdated)
GitHub: github.com/ktn1703/Vanish-Obfuscator
"Don't Read This Code Because You Will Be Dizzy By My Magic!"
This is an outdated version of Vanish, released to the public.
A more powerful successor has already been built β this version is no longer maintained.
Use at your own discretion. For educational and authorized security research purposes only.
Vanish v1.0 is a military-grade Python obfuscator that transforms readable Python source code into virtually untraceable, tamper-proof bytecode. It combines a custom Bytecode Virtual Machine (BVM) with multi-layer cryptographic encryption and advanced anti-analysis techniques to create outputs that resist static analysis, decompilation, debugging, and reverse engineering.
A fully custom virtual machine that lifts Python bytecode into a proprietary format. The original opcodes are scrambled, encrypted, and reconstructed at runtime β making traditional decompilers completely useless.
Every payload is protected by five nested encryption layers, each using independently derived keys via HKDF-SHA256:
| Layer | Algorithm | Purpose |
|---|---|---|
| 1 | Byte Shuffle | Deterministic permutation of the entire payload |
| 2 | XOR-Shift Stream | Pseudo-random stream cipher with 64-bit state |
| 3 | ChaCha20 | Authenticated stream cipher (10-round) |
| 4 | AES-256-GCM | Authenticated encryption with GHASH integrity |
| 5 | zlib Compression | Maximum compression (level 9) before encryption |
- String Encryption β 5 different XOR-based schemes (positional, reversed, split, RC4-like, modular addition)
- Integer Obfuscation β MBA (Mixed Boolean-Arithmetic) expressions, XOR decomposition, opaque predicates, trilinear transforms
- Variable Renaming β Confusable character pool (
I,l,1,O,0) for maximum confusion - Control Flow Flattening β Converts sequential logic into a state-machine
while/switchpattern - Junk Code Injection β 14β22 dead functions with opaque predicates and try/except noise
| Protection | What It Blocks |
|---|---|
| Anti-Debug | pdb, debugpy, pydevd, winpdb, frida, VS Code / PyCharm debuggers |
| Anti-Hook | Function hooking, import interception, monkey-patching |
| Anti-Frame | Stack inspection, frame walking, file descriptor monitoring |
| Anti-VM | VMware, VirtualBox, QEMU, Hyper-V, Docker, Parallels, KVM |
| Anti-Proxy | mitmproxy, Charles, Fiddler, Burp Suite, HTTP Toolkit |
| Anti-Decompiler | Crashes pycdc, recursion bombs, corrupted marshal data |
| Tamper Guard | SHA-256 integrity checks, header validation, burn-on-modify |
| Hardware Binding | Optional machine-locked execution (HW fingerprint) |
| Python Version Lock | Optional lock to specific Python minor version |
If any tampering, debugging, or hooking is detected, the program immediately burns β consuming all CPU cores, spawning infinite loops, and force-killing itself via TerminateProcess / os._exit(137).
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β SOURCE CODE β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β AST Transformation β
β ββββββββββββββββββββββ β
β β Rename Variables β β
β β Encrypt Strings β β
β β Obfuscate Ints β β
β β Inject Junk Code β β
β β Flatten Control β β
β ββββββββββββββββββββββ β
ββββββββββββββ¬βββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β BVM Engine (bvm.py) β
β ββββββββββββββββββββββ β
β β Opcode Scramble β β
β β Const Encryption β β
β β Custom Packaging β β
β ββββββββββββββββββββββ β
ββββββββββββββ¬βββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β 5-Layer Crypto Chain β
β β
β Shuffle β XOR β ChaCha β
β β AES-GCM β Compress β
ββββββββββββββ¬βββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β Loader Generation β
β ββββββββββββββββββββββ β
β β Anti-Debug β β
β β Anti-Hook/VM β β
β β Tamper Guards β β
β β Self-Destruct β β
β ββββββββββββββββββββββ β
ββββββββββββββ¬βββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β OUTPUT (.py) β
β Obfuscated Payload β
βββββββββββββββββββββββββββ
- Python 3.8+
- Optional:
pystyle(for colored terminal output)
git clone https://github.com/ktn1703/Vanish-Obfuscator.git
cd Vanish-Obfuscator
pip install pystyle # optionalpython aevanish.pyThe tool will guide you through a beautiful terminal interface with gradient banners and step-by-step prompts.
python aevanish.py --file input.py --output output.py| Flag | Description |
|---|---|
--file, -f |
Input Python file path |
--output, -o |
Output file path (default: input_obf.py) |
--no-anti-debug |
Disable anti-debug protection |
--no-anti-hook |
Disable anti-hook protection |
--no-anti-frame |
Disable anti-frame / GC wipe |
--no-junk |
Disable junk code injection |
--hw-bind |
Enable hardware-key binding |
--py-lock |
Lock to current Python version |
--no-anti-vm |
Disable anti-VM/sandbox detection |
--no-anti-proxy |
Disable anti-proxy/MITM detection |
--no-anti-httptoolkit |
Disable anti-HTTP Toolkit detection |
--no-anti-pydc |
Disable anti-decompiler crash |
--silent |
No output |
--banner |
Show banner |
python aevanish.py --file my_script.py --output protected.py --hw-bindWhen you run Vanish, your output file will contain:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ALWAYS ON β
β βββ 5-Layer AES-GCM + ChaCha20 + XOR + Shuffle β
β βββ HKDF-SHA256 Key Derivation β
β βββ BVM v8 Poly-Opcode Engine β
β βββ MBA Integer Obfuscation β
β βββ Multi-Scheme String Encryption β
β βββ Tamper-Burn Integrity Guard β
β β
β CONFIGURABLE (all ON by default) β
β βββ Anti-Debug Detection β
β βββ Anti-Hook / Anti-Import β
β βββ Anti-Frame / Stack Inspection β
β βββ Anti-VM / Sandbox Evasion β
β βββ Anti-Proxy / MITM Detection β
β βββ Anti-HTTP Toolkit β
β βββ Anti-Decompiler Crash (pycdc) β
β βββ Junk Code Injection (14-22 dead functions) β
β βββ Control Flow Flattening β
β βββ Hardware Binding (optional) β
β βββ Python Version Lock (optional) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββ aevanish.py # Main obfuscator (CLI, AST transforms, loader builder)
βββ bvm_engine.py # BVM bytecode virtual machine engine
βββ README.md # This file
- Parse β Source is parsed into an AST (Abstract Syntax Tree)
- Transform β Variables renamed, strings encrypted (5 schemes), integers obfuscated (MBA expressions), junk code injected, control flow flattened
- Lift β Transformed AST is compiled and lifted into BVM's custom binary format with opcode scrambling
- Encrypt β The BVM payload passes through 5 nested encryption layers with independently derived keys
- Wrap β A self-protecting loader is generated containing anti-debug, anti-hook, tamper checks, and a self-destruct mechanism
- Output β A single
.pyfile that runs independently with zero dependencies
All cryptographic primitives are implemented from scratch in pure Python with zero external dependencies:
- AES-256-GCM β Full S-Box, key expansion, GF(2^128) multiplication, GHASH
- ChaCha20 β Quarter-round operations, 10-round block function
- HKDF β Extract-then-expand with SHA-256
- XOR-Shift β 64-bit state PRNG with configurable seed
- Byte Shuffle β Deterministic Fisher-Yates with SHA-256 seeded RNG
- Custom opcode scrambling with reverse-map restoration
- XOR-based code encryption with 64-bit seed
- Full constant pool serialization (ints, floats, complex, strings, bytes, tuples, lists, dicts, sets, code objects)
- Multi-version
CodeTypereconstruction for Python 3.8β3.12+
| Version | Status |
|---|---|
| v1.0 | This release β public, outdated |
| v2.0+ | Private β significantly more powerful |
Built by KTN β 2026