pwnc3
Binary Exploitation
My blog has migrated to https://wintertia.pages.dev/ ! This Gitbook will no longer be maintained.
A vulnerable program could you lead to the flag.
By: @4nimanegra
Arch: amd64
RELRO: Partial RELRO
Stack: Canary found
NX: NX enabled
PIE: No PIE (0x400000)
Stripped: NoAnother simple challenge that uses an actual canary this time. Since there isn't any visible variables to overwrite, I had to use the regular way to bypass canary, which requires me to leak it using Format String Exploits. Luckily, the program gives a lot of chances to scout the correct canary!
void pwnme(){
char name[32];
char surname[32];
printf("Insert your name: ");
scanf("%s",name);
printf("Welcome home ");
printf(name);
printf("\n");
printf("Insert your first surname: ");
scanf("%s",surname);
printf("Insert your second surname: ");
scanf("%s",surname);
printf("Your user has been added!!!\n");
}Since finding the correct canary takes time, I used a loop to fuzz through a lot of them at once:
Knowing the basics of what canary addresses look like based on https://ir0nstone.gitbook.io/notes/binexp/stack/canaries, I found the canary at $15p. And with that, just do the usual overwriting variables technique with the leaked canary and return to the win function:

Last updated