- Replace weak ECB encryption with AES-128-CBC + PKCS7 padding - Implement secure key derivation: SHA256(password + salt) - Add cryptographically secure random IV generation - Create standalone C++ decryptor for external binary decryption - Update stub to require external decryption workflow - Maintain cross-platform compatibility (Linux/Windows) - Add proper error handling and padding validation Security improvements: - AES-128-CBC instead of ECB (prevents pattern analysis) - Random IVs prevent identical plaintext producing identical ciphertext - Password-based key derivation with salt - PKCS7 padding with validation - External decryption prevents embedded keys |
||
|---|---|---|
| batch_output | ||
| crypt | ||
| stub | ||
| .gitignore | ||
| decryptor.cpp | ||
| LICENSE | ||
| README.md | ||
| simple_batch.sh | ||
Rust Crypter
x86-64 Malware Crypter built in Rust for Windows with Anti-VM, powered by memexec
Usage
Single File
- Put your .exe in
/crypt/ cd crypt && cargo run <filename.exe>mv encrypted_Input.bin key.txt ../stub/src/cd ../stub && cargo build --target x86_64-pc-windows-gnu --release- Your encrypted exe is in
stub/target/x86_64-pc-windows-gnu/release/stub.exe
Batch Processing (Multiple Files)
./simple_batch.sh /path/to/folder/with/exe/files
Output: batch_output/ folder with {filename}_encrypted.exe files
Supported targets
- Windows x86-64
- Windows x86
Limitations
- .NET not supported
- Files over 600MB not supported
TODO
- File dialogue choose file instead of renaming code strings/executable names
- Automatically move encrypted bytes and key into stub for compiling
- GUI
- Obfuscated Strings
Disclaimer
This is a tool used to test the Static + Dynamic detection capabilites of AV and EDR, use of this project is at your own risk
MITRE TTPs (Indicators)
- User Execution: Malicious File T1204.002
- Deobfuscate/Decode Files or Information T1140
- Embedded Payloads T1027.009
- System Checks T1497.001
- Reflective Code Loading T1620
- Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder T1547.001
References
https://crates.io/crates/memexec https://crates.io/crates/inside-vm