Rex is a simple shellcode loader i developed for AV/EDR evasion tests. following techniques are implemented in this loader:
- RC4 encrypted payload
- Dynamic API calls
- String obfuscation
- MapView shellcode injection ( by default on explorer.exe )
- Sleep timer ( 5 secs, tick count )
- Sandbox check ( number of running processes and CPU cores )
msfvenom -p windows/x64/exec cmd=calc.exe exitfunc=thread -f raw -o calc.bin
⚠️ Exit function should be set to thread, otherwise the host process will crash and your shellcode won't get executed ⚠️
2. Use the rc4.py
script to generate a rc4 encrypted shellcode from a binary file (calc.bin for example) with a random key:
python3 rc4.py calc.bin