The Ultimate Python Script Protection System
Cerberus v3.0 is the most advanced Python obfuscator that combines multi-layer encryption, hardware fingerprinting, and real-time protection to secure your Python scripts from reverse engineering and AI-based decryption attempts.
- AES-256-GCM: Advanced Encryption Standard with Galois/Counter Mode
- ChaCha20: High-performance secure stream cipher
- Salsa20: Cryptographically secure stream cipher
- XOR with Extended Key: Final layer with 256-byte key
- Universal Compatibility: Scripts run on any compatible system
- Strong Key Derivation: Using scrypt with N=2^16
- Entropy-Based Security: Multiple entropy sources for key generation
- Python debugger detection (
sys.gettrace
) - Frame inspection and trace analysis
- High-precision timing analysis (multi-measurement)
- Memory landscape analysis
- Environment variable inspection
- Process analysis and parent checking
- VMware, VirtualBox, QEMU, Xen, Parallels
- Hyper-V, KVM, Bochs, Wine, Docker
- Kubernetes, Sandboxie, Cuckoo, Anubis
- JoeBox, ThreatExpert, CWSandbox
- Hardware timing tests for virtualization
- File system artifacts detection
- Background Security Daemon: Continuous monitoring
- Thread Synchronization: Multi-threaded protection
- Canary System: 12 integrity canaries for tamper detection
- Session Time Limits: Maximum 48 hours per session
- GitHub Gist Integration: One-time execution with automatic deletion
- Time Bomb Protection: Script expires on specified date
- Usage Limit Enforcement: Limit number of executions
- Nuitka Binary Compilation: Compile to executable binary
- Ultra-Confusing Names: Variable names using O0oIl patterns
- Multi-Stage Execution: 4 different execution patterns
- Decoy Functions: 4 fake functions to confuse analyzers
- Random Delays: Random timing to avoid pattern analysis
- Fake Metrics: False entropy and compression data
pip install pycryptodome
# For GitHub Gist integration
pip install requests
# For enhanced protection
pip install psutil
# For binary compilation
pip install nuitka
python cerberus.py -i script.py -o protected.py
python cerberus.py -i script.py -o protected.py --token YOUR_GITHUB_TOKEN
python cerberus.py -i script.py -o protected.py --time-bomb 2025-12-31 --usage-limit 10
python cerberus.py -i script.py -o protected.py --binary
python cerberus.py -i script.py -o protected.py \
--token YOUR_GITHUB_TOKEN \
--time-bomb 2025-12-31 \
--usage-limit 5 \
--binary
Level | Features | AI Decrypt Success Rate | Use Case |
---|---|---|---|
Basic | Quad-layer encryption + Portable | <5% | Standard protection |
Advanced | + Time bomb + GitHub Gist | <3% | Temporary deployment |
Maximum | + Usage limit + Binary + All features | <1% | Critical applications |
Obfuscator | Encryption Layers | Portability | Anti-Debug | VM Detection | AI Resistance |
---|---|---|---|---|---|
Cerberus v3.0 | 4 (AES+ChaCha+Salsa+XOR) | β Universal | 6 vectors | 10+ platforms | <5% |
PyArmor | 1 (AES) | β Limited | Basic | Limited | ~40% |
Pyinstaller | 0 (ZIP) | β | None | None | ~90% |
Standard Base64 | 0 | β | None | None | ~95% |
usage: cerberus.py [-h] -i INPUT -o OUTPUT [--token TOKEN] [--binary]
[--time-bomb TIME_BOMB] [--usage-limit USAGE_LIMIT]
arguments:
-i, --input Input Python file to protect
-o, --output Output protected file
--token TOKEN GitHub token for Gist-based one-time execution
--binary Compile to binary with Nuitka
--time-bomb DATE Expiration date (YYYY-MM-DD)
--usage-limit N Maximum execution count (0 = unlimited)
π‘οΈ Cerberus Ultra-Secure Obfuscator v3.0
=======================================================
π Loaded source file: example.py (156 bytes)
π§ Initializing ultra-secure protection systems...
π‘οΈ Ultra-Security Features Enabled:
β Quad-layer encryption (AES-256-GCM + ChaCha20 + Salsa20 + XOR)
β Advanced anti-debug protection (6 vectors)
β VM/Sandbox detection (10+ platforms)
β Real-time process monitoring
β Background security daemon
β Ultra-confusing variable name obfuscation
β Self-tamper detection and integrity checking
β Portable protection (universal compatibility)
β Time bomb: expires 2025-12-31
β Usage limit: maximum 10 executions
π Starting Ultra-Secure Obfuscation Process...
π Applying ultra-secure quad-layer protection...
β
Ultra-secure obfuscation completed successfully!
π Protected script saved: protected.py
π Protection Statistics:
Original size: 156 bytes
Protected size: 9,847 bytes
Size expansion: 63.1x
Estimated AI decryption success rate: <5%
Protection strength: MAXIMUM
π Your script is now ultra-secured and ready for deployment!
β οΈ Keep this obfuscator safe for future obfuscation needs
β
The protected script can run on any compatible system
# Entropy-based key generation
master_entropy = secrets.token_bytes(64)
# Multi-purpose key derivation
key_material = master_entropy + optional_github_token
derived_key = scrypt(key_material, salt, N=2**16, r=8, p=1)
# Layer 1: AES-256-GCM
aes_encrypted = AES.encrypt_and_digest(data)
# Layer 2: ChaCha20
chacha_encrypted = ChaCha20.encrypt(aes_encrypted)
# Layer 3: Salsa20
salsa_encrypted = Salsa20.encrypt(chacha_encrypted)
# Layer 4: XOR with extended key
final = XOR(salsa_encrypted, extended_key)
# Background monitoring daemon
def security_monitor():
while True:
check_debugger()
check_vm_environment()
verify_integrity()
mutate_canaries()
sleep(random_interval)
- Can run on any compatible system with required dependencies
- Keep your obfuscator safe for future obfuscation needs
- Backup obfuscator configuration safely
- Missing Library: Install
pycryptodome
- VM Detection: Some VMs may trigger protection (intended behavior)
- Time Bomb: Check if expired
- Usage Limit: Reached execution limit
- Dependencies: Ensure all required packages are installed
- Nuitka Missing:
pip install nuitka
- System Resources: Compilation requires sufficient RAM and storage
- Permissions: Ensure write permission to output directory
Metric | Value |
---|---|
Encryption Speed | ~500KB/s |
Size Expansion | 50-80x |
Startup Overhead | <100ms |
Memory Usage | +5-10MB |
CPU Overhead | <2% |
- AES-256-GCM: NIST approved, 128-bit authentication tag
- ChaCha20: RFC 7539, 256-bit key, 96-bit nonce
- Salsa20: Bernstein cipher, 256-bit key, 64-bit nonce
- XOR: Extended key up to 256 bytes for large files
- Algorithm: scrypt (RFC 7914)
- Parameters: N=2^16, r=8, p=1
- Salt: SHA-256 of purpose string
- Input: Master entropy + Optional GitHub token
- Anti-Debug: 6-vector detection system
- VM Detection: 15+ platform signatures
- Integrity: 12 canary system with random mutations
- Timing: Multi-measurement analysis
This project is licensed under the MIT License - see the LICENSE file for details.
- PyCryptodome team for excellent cryptographic library
- Nuitka project for Python-to-binary compilation
- Security researchers who helped identify vulnerabilities
If you have questions or issues:
- Check troubleshooting guide above
- Ensure all dependencies are installed
- Test with simple script first
- Backup your obfuscator and environment
β‘ Cerberus v3.0 - Ultimate Python Protection