The more permanent ways of disabling ASLR should be kept in a VM for obvious reasons.
to test the ability to overwrite stack frame return addresses etcetera, you'll need to compile without stack canaries -fno-stack-protector
, while to allow you to execute code on the stack you need to compile with -z execstack
, making
$ gcc -fno-stack-protector -z execstack -o <my_program> my_code.c