C snippet to test the shellcode
replace your shellcode with your custom payload
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
gcc shellcode.c -o shellcode -fno-stack-protector -z execstack
gdb ./shellcode




Leave a Comment