Skip to content

Instantly share code, notes, and snippets.

@EdoardoVignati
Created October 25, 2018 10:54
Show Gist options
  • Save EdoardoVignati/f81ab212d6b73a2cc27cd21e838accb5 to your computer and use it in GitHub Desktop.
Save EdoardoVignati/f81ab212d6b73a2cc27cd21e838accb5 to your computer and use it in GitHub Desktop.
Compile with gcc in "static" mode for buffer overflow
# Compile in "static" mode (for buffer overflow)
$ gcc -g -fno-stack-protector -z execstack -mpreferred-stack-boundary=2
# -g : debug options
# -fno-stack-protector : remove protections of the stack
# -z execstack : set stack executable
# -mpreferred-stack-boundary=2 : align stack pointer on dword boundary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment