vlunhub笔记(四)drippingblues
(一)信息收集
查询目标靶机ip,目标机:192.168.241.142
arp-scan -l

照常扫一下端口,发现开放21(ftp服务),22(ssh服务),80(web服务)三个端口
nmap -A -T4 192.168.241.142

发现开放21ftp端口,尝试访问。发现一个压缩包,下载下来发现有两个加密文件是包含关系,那我们就需要解开第一层密码。
ftp://(目标机ip)
ftp://192.168.241.142
(注:我这里kali自带浏览器无法直接访问,用自己电脑的浏览器可以直接访问)

我们可以用Fcrackzip来进行密码爆破
fcrackzip -D -p /usr/share/wordlists/rockyou.txt -u respectmydrip.zip
密码为:072528035

输入密码后得到respectmydrip.txt文件,另外一个secret.zip暂时爆不出来密码。

(二)目录扫描
然后我们在扫一下目录,发现几个结果分别访问一下。

访问robots.txt

访问一下/dripisreal.txt

你好亲爱的黑客,
选择这首歌词:
https://www.azlyrics.com/lyrics/youngthug/constantlyhating.html
数一数n个单词,并排放置,然后md5求和
例如,md5你好你好
这是ssh的密码
这打开后就是一首歌,但我没有理解他这个怎么排列的。
然后我们在访问下 /etc/dripispowerful.html 发现无法访问

网上搜了一下发现是在index.php界面有文件包含漏洞
http://192.168.241.142/index.php?drip=/etc/dripispowerful.html

查看源码得到密码

(三)ssh远程登录
发现该密码还不是前面secret.zip的密码
前面端口扫描发现开放22端口,我们尝试ssh连接,成功登录
ssh thugger@本机ip
ssh thugger@192.168.241.142
密码:imdrippinbiatch

在该目录下找到第一个flag

(四)内网提权
ps -ef //查看当前进程情况

这里搜索知道polkitd漏洞,直接下载CVE-2021-3560.py
https://github.com/Almorabea/Polkit-exploit
然后将CVE-2021-3560.py直接拖入目标靶机(已知靶机密码:imdrippinbiatch)
可以看到靶机目录下有CVE-2021-3560.py,直接执行。
python3 CVE-2021-3560.py,获取到root权限。

进入~目录
cd ~
直接查看root.txt发现第二个flag

(五)靶机总结
1.开放ftp端口,可以进行访问。
2.Fcrackzip来进行密码爆破
3.polkitd漏洞,CVE-2021-3560
热门相关:亿万盛宠只为你 大妆 后福 后福 豪门情变,渣总裁滚远点!