Skip to content

Instantly share code, notes, and snippets.

@evandrix
Created July 6, 2011 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evandrix/1066975 to your computer and use it in GitHub Desktop.
Save evandrix/1066975 to your computer and use it in GitHub Desktop.
Advanced Format String Attacks Presented by Paul Haas (Linux only)
#include <stdio.h>
int main(int argc, char **argv){
printf(argv[1]);
}
# Compile and setup insecure environment
gcc printf.c -w -O0 -ggdb -std=c99 -static -D_FORTIFY_SOURCE=0 -fno-pie -Wno-format -Wno-format-security -fno-stack-protector -z norelro -z execstack -o printf
sudo sysctl -w kernel.randomize_va_space=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment