1. Why Plain PyInstaller & Basic AST Obfuscation Fail Instantly
PyInstaller is a bundler, not an obfuscator. Its CArchive embeds standard zlib-compressed .pyc files with recognizable 0x78 0x9c magic headers. Running python pyinstxtractor.py app.exe dumps your entire package tree in under two seconds.
Historically, legacy decompilers like uncompyle6 struggled with newer Python 3.12–3.14 opcodes (such as inline comprehensions and zero-cost exception tables). Neural sequence-to-sequence decompilers like PyLingual and updated pycdc erased that gap—translating raw Python 3.12+ bytecode straight back into clean Python source. Worse, renaming variables to _0x1a2b no longer slows down attackers: LLMs effortlessly rename _0x1a2b back to calculate_margin() from surrounding API calls and string literals.
2. The Rise of MCP Binary Agents (GhidraMCP & REA)
Even when teams compile Python to C via Cython or Nuitka, autonomous reverse-engineering frameworks such as ReverseEngineerAnything (REA) and GhidraMCP expose disassembly, cross-references, exported symbols, and string tables as Model Context Protocol (MCP) tools. An LLM agent walks the call graph starting from exported __pyx_pw_* symbols and summarizes your proprietary logic automatically.
3. Breaking Every Link of the Kill-Chain (pykevlar --anti-llm)
Defeating both deterministic extractors and probabilistic LLM agents requires coordinated defense across the archive, bytecode, native C, and runtime VM layers:
pykevlar build proprietary_service.py -F --anti-llm --enable-bcc --outer -O dist
- SPZ2 Stream-Encrypted Archive: Replaces standard zlib archives with a SplitMix64 stream cipher keyed per build.
binwalk,strings, andpyinstxtractorsee zero zlib headers and zero module names. - ChaCha20-Poly1305 Vectorcall Function Vault: Each function body is sealed under its own HMAC-SHA256 subkey. Using CPython 3.12+
PyFunction_AddWatcherand custom vectorcall trampolines, functions decrypt in C memory only for the microseconds of execution and immediately re-lock to a 4-byte barren stub. - CREAM Adversarial Renaming + 64-bit MBA Predicates: Instead of random gibberish (
a1, b2) that LLMs treat as blank variables, PyKevlar rewrites local identifiers into plausible, domain-contradictory vocabulary paired with volatile Mixed Boolean-Arithmetic opaque predicates. - Stripped C Extensions + Honey-Functions: Native
pyarmor_bcc.soandpyarmor_runtime.socompile with-fvisibility=hidden -Wl,-xalongside realistic decoy cipher state machines that trap automated MCP call-graph crawlers. - PEP 669
sys.monitoring& Frida Blocking: PyKevlar sweeps all PEP 669 tool slots and checks for Frida /LD_PRELOAD/DYLD_INSERT_LIBRARIESinjection inside C before deriving subkeys.