If you’re learning about buffer overflows and shellcode, chances are you’re exploiting some stack-based vulnerabilities. If you’re like me you might also find that when you compile your programs they have stack execution disabled by default. So instead of getting excited as you see your shellcode blissfully running after smashing the stack, you might just see this instead:
Program received signal SIGSEGV, Segmentation fault. 0x0000000000601018 in shellcode ()
“Noooo! You can’t do this to me! I want to write exploits!”
Ok.. calm down.. we just need to turn on stack execution when compiling.