Collection of my NASM x86 SLAE course & exam code
You must have NASM installed for the code to compile.
How to compile on linux x86/x86_64:
- chmod +x compile.sh
- ./compile.sh [file] (without .nasm extension)
How to get shellcode from binary file:
How to encode shellcode with msfvenom:
-
For the C file:
echo -ne "YOUR_SHELLCODE" | sudo msfvenom -a x86 --format c --platform Linux -e x86/shikata_ga_nai -c 10
-
For the executable:
echo -ne "YOUR_SHELLCODE" | sudo msfvenom -a x86 --format elf --platform Linux -e x86/shikata_ga_nai -c 10 > payload && chmod +x payload