Skip to content

Instantly share code, notes, and snippets.

@0xswitch
Created October 3, 2019 06:28
Show Gist options
  • Save 0xswitch/65faf1acd26ae03a3b09ee50922fc7e6 to your computer and use it in GitHub Desktop.
Save 0xswitch/65faf1acd26ae03a3b09ee50922fc7e6 to your computer and use it in GitHub Desktop.
Find offset for buffer overflow vulnerability with pwntools
from pwn import *
elf = ELF("./vuln")
p = process("./vuln")
p.sendline(cyclic(200, n=8))
p.wait()
core = p.corefile
print cyclic_find(core.read(core.rsp, 8), n=8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment