gcc no stack protector code example
Example 1: how to turn off aslr in gcc
gcc -fno-stack-protector -z execstack -o bug bug.c
Example 2: how to turn off aslr in gcc
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
gcc -fno-stack-protector -z execstack -o bug bug.c
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space