Simple implementation of Windows shellcode &loader written in C++.
sudo apt install git build-essential nasm g++-mingw-w64 python3-pefile
We need to compile both shellcode and loader on Linux using MinGW.
# 1. Compile shellcode
cd shellcode && make
file build/shellcode.bin
# 2. Compile loader
cd ldr && make
file build/ldr.exe
Transfer the generated shellcode and loader to Windows machine and execute as below:
.\ldr.exe <PID> <SHELLCODE_PATH>
# e.g.
.\ldr.exe 12345 .\shellcode.bin