test_your_nc_1
IDA PRO查看主函数
发现system("/bin/sh"),从主函数进入则执行getshell,所以直接nc或者写一个交互程序都可以getshell。
gdb动态分析,b main下主函数断点,r运行,看一下跳转到system函数后具体的执行过程
n单步执行,将程序调整到运行system函数之前
n单步执行,运行system(“/bin/sh”),观察getshell
本地gdb调试成功后,运行exp拿到flag
exp.py
```
#!/usr/bin/env python
from pwn import *
from LibcSearcher import LibcSearcher
p = remote('node4.buuoj.cn',27347)
p.interactive()
```