pwnc1

Binary Exploitation

triangle-exclamation

A vulnerable program could you lead to the flag.

By: @4nimanegra

file-download
869KB
file-download
546B
Arch:     amd64
RELRO:      Partial RELRO
Stack:      Canary found
NX:         NX enabled
PIE:        No PIE (0x400000)
Stripped:   No

A simple variable overwrite challenge, source code being given definitely makes this way easier.

void pwnme(){

	int number;
	char name[32];

	number=0;

	printf("Insert your name: ");

	scanf("%s",name);

	printf("Welcome home %s\n",name);

	if(number == 8){

		print_flag();

	}

	exit(0);

}

Find the offset using gdb until the if statement happens:

Offset was 44 bytes which allowed me to easily create an overwrite:

Last updated