The Planets:Venus

文章描述了在VulnHub靶场Venus中进行的信息收集,包括使用arp-scan、Nmap探测开放端口和服务,发现22和8080端口开放,以及后续的渗透测试,如尝试登录、识别安全漏洞和提权的过程。
摘要由CSDN通过智能技术生成

靶场下载

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
|     <html>
|     <head>
|     <title>Venus Monitoring Login</title>
|     <style>
|     .aligncenter {
|     text-align: center;
|     label {
|     display:block;
|     position:relative;
|     </style>
|     </head>
|     <body>
|     <h1> Venus Monitoring Login </h1>
|     <h2>Please login: </h2>
|     Credentials guest:guest can be used to access the guest account.
|     <form action="/" method="post">
|     <label for="username">Username:</label>
|     <input id="username" type="text" name="username">
|     <label for="password">Password:</label>
|     <input id="username" type="text" name="password">
|     <input type="submit" value="Login">
|     </form>
|     </body>
|_    </html>
|_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的默认漏洞脚本信息探测结果没什么有价值的信息~

渗透测试

首页情况如下:

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

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

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

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

找了一个登录的界面:

但是不管你输入什么东西,都会出现服务器错误,报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."

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

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

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

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

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

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

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

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

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

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

magellan:irahfvnatrbybtl1989
guest:thrfg
venus:irahf

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

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

拿到了user的flag:

提权

没有sudo权限:

存在两个可用的用户:

suid权限的文件:

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

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

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

  • 24
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Y4y17

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值