Overwriting Variables
Let's start easy
❯ ./overwrite
What is the password?❯ ./overwrite
What is the password?
idk
Output: Wrong!
12345%void auth(){
int pass = 0x12345;
char buffer[32];
printf("What is the password?\n");
fflush(stdout);
gets(buffer);
if (pass == 0xdead10cc){
printf("Output: That is correct!\n");
printf("%x", pass);
} else {
printf("Output: Wrong!\n");
printf("%x", pass);
}
}Final Exploit
Last updated