34 lines
866 B
Plaintext
34 lines
866 B
Plaintext
USAGE
|
|
|
|
1. Prepare your payload in payload.nasm file or you can directly specify it in make.sh script (PAYLOADCODE= variable)
|
|
|
|
I'm using a symlink as follows
|
|
|
|
exam3$ ln -svf payload-execve-stack.nasm payload.nasm
|
|
`payload.nasm' -> `payload-execve-stack.nasm'
|
|
|
|
|
|
2. Compile the shellcode with a custom "egg" (must be 8 bytes in length)
|
|
|
|
exam3$ ./make.sh "egg.mark"
|
|
[I] Using custom EGG mark: egg.mark
|
|
[+] Compiling payload.nasm ...
|
|
[+] Compiling hunter.nasm ...
|
|
[+] Extracting PAYLOAD code from payload ...
|
|
[+] Adding EGG mark to PAYLOAD ...
|
|
[+] Checking PAYLOAD code for NULLs ...
|
|
[+] Extracting HUNTER code from hunter ...
|
|
[+] Checking HUNTER code for NULLs ...
|
|
[+] Compiling shellcode.c ...
|
|
-rwx------. 1 arno arno 5100 Mar 27 16:47 ./shellcode
|
|
[+] All done!
|
|
|
|
|
|
3. Run the shellcode
|
|
|
|
exam3$ ./shellcode
|
|
Hunter Length: 29
|
|
Payload Length: 36
|
|
sh-4.1$ exit
|
|
|