Shellcode validation via C pointer
Date: October 15, 2018
Categories: Uncategorized
C snippet to test the shellcode
replace your shellcode with your custom payload
1 2 3 4 5 6 7 |
char shellcode[] = "\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc"; int main(int argc, char **argv){ int (*target)(); target = (int(*)())shellcode; (int)(*target)(); } |
compile options
1 |
gcc shellcode.c -o shellcode -fno-stack-protector -z execstack |
1 |
gdb ./shellcode |
Leave a Reply