
信息收集
通过nmap搜索到IP为:192.168.200.11  开启了80http、111RPC服务端口 先打开网页,然后进行目录爆破  contact.php  
攻击
经搜索没有发现可以攻击wheello和nginx的漏洞,只能burpsuite抓包看看 在thankyou.php的界面,可以看到最下方的版权标志的年份随着每次刷新都会有不同的变化  
这个点我是注意到了,但我是真的不知道为什么这就能说明有文件包含漏洞,在网上发现别人在目录爆破的时候爆出了footer.php,所以说明包含了footer.php文件 不管怎么样,存在文件包含漏洞就说明了可以通过漏洞将其他文件包含进来,所以,首先要找到文件包含对应的参数才行,根据其他人fuzz的结果,可以确定参数为file  当参数不为file时,响应包的长度为852  当参数为file时,长度为835
可以通过查看passwd文件来验证是否存在文件包含漏洞  我们的目的是为了拿到靶机的shell,但是这个web没有上传点,如果无法包含到webshell,那么文件包含漏洞就无法被利用,但是,如果服务器开启了访问日志的话,就可以使用日志文件包含
日志文件路径:
/var/log/nginx/error.log
/var/log/nginx/access.log
尝试文件包含access.log  当传入file=<?php phpinfo() ?>,观察是否有记录  理论上dc的靶机都是安装了python环境和netcat的,所以可以使用python反弹shell又或者是使用nc反弹到kali,但是为了模拟真实的渗透环境,在没有办法确定是否存在靶机含有python和netcat的情况下只能使用一句话木马,然后用蚁剑连接  打开shell,发现权限很低,打不开root,所以尝试提权
提权
 定时任务没有可以提权的点,只能看看suid 
发现有对应的漏洞,尝试把脚本上传到靶机运行 根据脚本的要求写入和上传文件,编译文件   在这里我运行了两次,发现了几个问题 首先,使用蚁剑的终端执行脚本是无法反弹回来一个新的高权限shell的 其次,第一次运行时没有反弹脚本,只好删除掉虚拟机重新安装并再按流程走一遍才可以 
|