My First BoF
A very old guide I found one of my HDD's
Creating your first buffer overflow
sudo nano /proc/sys/kernel/randomize_va_spacenano overflow.c#include <stdio.h>
main() {
char *name;
char *dangerous_system_command;
name = (char *) malloc(10);
dangerous_system_command = (char *) malloc(128);
printf("Address of name is %d\n", name);
printf("Address of command is %d\n", dangerous_system_command);
sprintf(dangerous_system_command, "echo %s", "hello world!");
printf("whats your name?");
gets(name);
system(dangerous_system_command);
}



Last updated


