Proving Grounds Linux Lab Hub ( Road to OSCP )
好的,我现在需要帮用户总结一篇关于渗透测试的文章,控制在100字以内。首先,我得仔细阅读文章内容,抓住主要步骤和关键点。 文章讲的是一个渗透测试实验室,目标是Offsec的Proving Grounds中的Linux盒子Hub。作者首先进行信息收集,使用了rustscan和nmap扫描端口,发现了SSH、HTTP、blackice-alerts和abyss等服务。接着用gobuster枚举Web目录,找到了几个可能的路径。 然后作者转向8082端口,发现运行的是FuguHub CMS,并成功注册了一个用户。通过搜索sploit找到了针对FuguHub 8.1的远程代码执行漏洞。利用该漏洞上传了一个Lua脚本,最终获得了root权限。 总结时需要涵盖这些关键点:信息收集、端口扫描、枚举、漏洞利用以及成功获取权限。同时要保持简洁,不超过100字。 </think> 文章描述了对Offsec Proving Grounds中的Linux靶机Hub进行渗透测试的过程。首先通过信息收集和端口扫描发现目标开放的SSH、HTTP等服务。接着使用gobuster枚举Web目录,并利用FuguHub CMS的远程代码执行漏洞上传Lua脚本,最终获得root权限。 2026-3-17 04:52:59 Author: infosecwriteups.com(查看原文) 阅读量:5 收藏

Press enter or click to view image in full size

Proving Grounds Linux Box Hub Offsec ( Road to OSCP )

As always in every penetration testing engagements we start by reconnaissance and information gathering, in this step we try to get as much information about the target as possible.

We can achieve that by using various of tools and techniques to obtain foothold on the target, by using enumeration, scanning and other recon techniques.

In this lab we are tasked to pentest this Linux Lab : Hub on Offsec’s Proving grounds :

First step will be to check if the target is up and running, we could do so by sending ICMP requests to check if we can communicate with the target by running this command :

Press enter or click to view image in full size

Next I’ll initiate a scan using rustscan because it’s considered fast, afterwards I can run a full scan with nmap and investigate with other tools :

└─# rustscan -a 192.168.220.25 - ulimit 5000 

From the scan I can see the following open ports and services:

Port 22 running SSH
port 80 running HTTP
port 8082 running blackice-alerts
port 9999 running abyss

Lets run an nmap full scan and while I do that I’ll investigate the webpage on port 80…

From examining port 80, it seems like it’s running nginx 1.18.0 service but however it’s forbidden to access the webpage.

I’ll run gobuster for initial enumeration on port 80 and see if I find anything meaningful:

by running this command:

┌──(root💀CSEC)-[/home/cyborgbytes/Documents/PGWriteupsOffsec/Hub]
└─# gobuster dir -u http://192.168.220.25/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -o enum.txt

I can enumerate the possible web directories based on a wordlist I specify.

from enumeration I can see the following output :

Press enter or click to view image in full size

Possible web directories on port 80 are the following :

/themes
/data
/applications
/trace
/cache
/disk

Next I’ll investigate the webpage on port 8082:

Press enter or click to view image in full size

The webpage seems that is running a CMS called FuguHub, I was able to create a user on the webpage, so lets keep investigating.

Get Cyb0rgBytes’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

Results of the nmap full scan is the following :

Press enter or click to view image in full size

By running searchsploit to search for exploits on FuguHub, I can see that there is public exploit on exploitdb for FuguHub, a Remote Code Execution for version 8.1:

Press enter or click to view image in full size

Next I’d copy this exploit and try to use it to get initial foothold…

After some research I found out that the exploit method is a bit complex, going forward with the exploitation I’ll do the steps one by one :

first the concept of the vulnerability is that we have to upload a lua “lsp script” that gets us a reverse shell upon upload:

I’ll run a listener on port 9001 :

`nc -lvnp 9001 `

Next I’ll download and execute a script used for this CVE:

Before we run the exploit we need to install the dependent libraries for the exploit to work properly.

going back to the main terminal, I’ll run cadaver to open and put the reverse shell :

but before I do so I’ll go to the platform and make an account and get the URL Session of the /fs/ directory.

dav:!> open http://192.168.220.25:8082/fs/0682cdd29b0ca95eff361bd2/
dav:/fs/0682cdd29b0ca95eff361bd2/> cd ..
Authentication required for Web File Server on server `192.168.220.25':
Username: admin
Password:
dav:/fs/> put lua.lsp
Uploading lua.lsp to `/fs/lua.lsp':
Progress: [=============================>] 100.0% of 349 bytes succeeded.
dav:/fs/>

After uploading the lua reverse shell I will have to run the CVE python exploit and run the exploit, I actually had to edit the source code to align with the procedure:

Press enter or click to view image in full size

And THERE WE GO! a root shell directly without the need to escalate any privileges.

Press enter or click to view image in full size

And here we conclude the lab successfully…

on to the next ones! with dedication, commitment and resilience.

Feel free to Clap, share if you like my content! it helps me a lot and it’s appreciated too.


文章来源: https://infosecwriteups.com/proving-grounds-linux-lab-hub-road-to-oscp-e5d58a42530c?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh