The Planets:Venus

靶场下载

The Planets: Venus ~ VulnHub

信息收集

# arp-scan -l
Interface: eth0, type: EN10MB, MAC: 00:0c:29:43:7c:b1, IPv4: 192.168.1.60
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.1.1     00:50:56:c0:00:08       VMware, Inc.
192.168.1.2     00:50:56:fe:b1:6f       VMware, Inc.
192.168.1.84    00:0c:29:99:d4:0c       VMware, Inc.
192.168.1.254   00:50:56:f1:7f:c5       VMware, Inc.

靶机的IP地址为192.168.1.84

# nmap -sT --min-rate 10000 -p- 192.168.1.84 -oN port.nmap         
Starting Nmap 7.94 ( https://nmap.org ) at 2024-01-08 09:12 CST
Nmap scan report for 192.168.1.84
Host is up (0.0060s latency).
Not shown: 65513 filtered tcp ports (no-response), 20 filtered tcp ports (host-unreach)
PORT     STATE SERVICE
22/tcp   open  ssh
8080/tcp open  http-proxy
MAC Address: 00:0C:29:99:D4:0C (VMware)

开放端口信息为22 和 8080端口

# nmap -sT -sC -sV -O -p22,8080 192.168.1.84 -oN details.nmap
Starting Nmap 7.94 ( https://nmap.org ) at 2024-01-08 09:13 CST
Nmap scan report for 192.168.1.84
Host is up (0.00053s latency).

PORT     STATE SERVICE    VERSION
22/tcp   open  ssh        OpenSSH 8.5 (protocol 2.0)
| ssh-hostkey: 
|   256 b0:3e:1c:68:4a:31:32:77:53:e3:10:89:d6:29:78:50 (ECDSA)
|_  256 fd:b4:20:d0:d8:da:02:67:a4:a5:48:f3:46:e2:b9:0f (ED25519)
8080/tcp open  http-proxy WSGIServer/0.2 CPython/3.9.5
|_http-server-header: WSGIServer/0.2 CPython/3.9.5
| fingerprint-strings: 
|   GetRequest, HTTPOptions: 
|     HTTP/1.1 200 OK
|     Date: Mon, 08 Jan 2024 01:13:14 GMT
|     Server: WSGIServer/0.2 CPython/3.9.5
|     Content-Type: text/html; charset=utf-8
|     X-Frame-Options: DENY
|     Content-Length: 626
|     X-Content-Type-Options: nosniff
|     Referrer-Policy: same-origin
|     
|     
|     Venus Monitoring Login
|     
|     
|     
|     

Venus Monitoring Login

|

Please login:

| Credentials guest:guest can be used to access the guest account. |
| | | | | |
| |_ |_http-title: Venus Monitoring Login

开放的服务相关信息可以看到 22端口上的openssh版本信息为8.5 同时http服务是WSGIServer/0.2 CPython/3.9.5 跟我们同系列的上一个靶场是相同的(Mercury)

# nmap -sT --script=vuln -p22,8080 192.168.1.84 -oN vuln.nmap 
Starting Nmap 7.94 ( https://nmap.org ) at 2024-01-08 09:13 CST

PORT     STATE SERVICE
22/tcp   open  ssh
8080/tcp open  http-proxy
| http-slowloris-check: 
|   VULNERABLE:
|   Slowloris DOS attack
|     State: LIKELY VULNERABLE
|     IDs:  CVE:CVE-2007-6750
|       Slowloris tries to keep many connections to the target web server open and hold
|       them open as long as possible.  It accomplishes this by opening connections to
|       the target web server and sending a partial request. By doing so, it starves
|       the http server's resources causing Denial Of Service.
|       
|     Disclosure date: 2009-09-17
|     References:
|       http://ha.ckers.org/slowloris/
|_      https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6750
MAC Address: 00:0C:29:99:D4:0C (VMware)

nmap的默认漏洞脚本信息探测结果没什么有价值的信息~

渗透测试

首页情况如下:

The Planets:Venus_第1张图片

首页就是登录的页面,同时给出了我们一个账号和密码信息,guest用户可以访问该用户!

The Planets:Venus_第2张图片

没错,guest用户确实是能够正确的登录进来的!此时看到回显数据包中的cookie字段:

The Planets:Venus_第3张图片

auth的值是base64编码的,尝试解密拿到:

The Planets:Venus_第4张图片

感觉后面的thrfg便是一个用户名吧? 例行的目录扫描还是要做一下的:

The Planets:Venus_第5张图片

找了一个登录的界面:

The Planets:Venus_第6张图片

但是不管你输入什么东西,都会出现服务器错误,报500错误~ 没有其他的任何界面;回到了第一个登录的界面,发现当输入用户名正确,密码不正确的时候,出现提示“密码不对”;当用户名直接不对的时候,提示“用户名错误”!那么这里可以去爆破一下用户名信息了!

hydra -L /usr/share/wordlist/rockyoou.txt -p pass -s 8080 192.168.1.84 http-post-form "/:username=^USER^&password=^PASS^:invaild username."

The Planets:Venus_第7张图片

拿到了一个用户venus!密码不知道;这里先不去爆破密码,因为上面可以看到cookie字段可能存在伪造~所以先去尝试一下伪造cookie:

The Planets:Venus_第8张图片

这里将cookie字段替换之后,发现还是没什么变化!无奈只能去爆破密码:

The Planets:Venus_第9张图片

拿到了密码,尝试登录进去看看有什么其他的功能嘛? 或者我们直接去ssh登录看看是否成功?

The Planets:Venus_第10张图片

没什么多的功能,只能是去尝试ssh登陆啦!

The Planets:Venus_第11张图片

登陆不成功? 除了第一个venus monitor界面能够登陆成功之外,其他的地方均无法成功登录;不知道这个用户有什么用处~ 感觉还是在cookie上面进行突破呢? cookie看起来很奇怪!再次尝试将cookie变为:venus:venus 然后编码发送看一下:

The Planets:Venus_第12张图片

发现回显的cookie怎么不一样呢?尝试解密:

The Planets:Venus_第13张图片

一直没明白:后面的字符串是什么?看起来不像是乱码;在迷茫的时候,hydra又出来了一个用户名:

The Planets:Venus_第14张图片

又得到了一个账号,再次替换cookie,看看是不是又能得到什么“乱码"

The Planets:Venus_第15张图片

真的不一样哈,再次解密:

The Planets:Venus_第16张图片

直接晕了,尝试了ssh登录也不对;这里看了大佬的wp;说是rot13???

magellan:irahfvnatrbybtl1989
guest:thrfg
venus:irahf

The Planets:Venus_第17张图片

真的很无奈了,这里下面的两个肯定ssh登陆不成功,因为我早就试过了~ (哎~ 这里的rot13真没想到,看起来就不是乱码,是有意义的字符串,但是没想到是这种加密)

最终拿magellan这个用户和密码登陆成功!

The Planets:Venus_第18张图片

拿到了user的flag:

The Planets:Venus_第19张图片

提权

没有sudo权限:

The Planets:Venus_第20张图片

存在两个可用的用户:

suid权限的文件:

The Planets:Venus_第21张图片

看到了pkexec,想到CVE-2021-4034,这里还尝试了其他的提权路径,无奈又利用了这个漏洞:

The Planets:Venus_第22张图片

尝试下载漏洞利用脚本,进行编译执行:

The Planets:Venus_第23张图片

提权成功~ 读取root中的flag文件!

The Planets:Venus_第24张图片

你可能感兴趣的:(Vulnhub,网络安全,安全,学习,web安全,安全威胁分析)