DC-1 Box, Proving Grounds
好的,我现在要帮用户总结这篇文章的内容。首先,我需要仔细阅读用户提供的文章内容,理解其中的主要步骤和关键点。 文章主要讲述了一次渗透测试的过程。作者从信息收集开始,使用nmap扫描目标,发现了一个开放的HTTP端口80。接着,他识别出这是一个Drupal CMS版本7的网站,并通过searchsploit找到了相关的漏洞利用。尝试其中一个漏洞后,成功获得了初始访问权限。 接下来,作者使用gobuster进行枚举,发现了admin页面。然后,他利用metasploit中的Drupal漏洞成功植入了shell。获得初始立足点后,作者进入了特权提升阶段,使用linpeas工具发现了可以利用的find命令来获取root权限。 总结下来,整个过程包括信息收集、漏洞利用、枚举、初始访问、特权提升和最终获取root权限。用户要求控制在100字以内,并且不需要特定的开头。 我需要将这些步骤简洁地表达出来,确保涵盖所有关键点:nmap扫描、Drupal漏洞利用、gobuster枚举、metasploit植入shell、linpeas特权提升以及最终的root访问。 现在组织语言:文章描述了一次渗透测试过程,使用nmap发现Drupal CMS漏洞并利用metasploit植入shell。随后通过gobuster枚举和linpeas工具实现特权提升,最终获得root权限。 这样应该符合用户的要求。 </think> 文章描述了一次渗透测试过程:通过nmap扫描发现目标网站使用Drupal CMS 7.x版本,并利用searchsploit找到相关漏洞。随后使用gobuster枚举Web目录并发现admin页面。通过Metasploit自动化exploit获取初始 foothold,并利用linpeas进行Privilege Escalation最终获得root权限。 2026-2-26 13:38:30 Author: infosecwriteups.com(查看原文) 阅读量:6 收藏

Press enter or click to view image in full size

Cyb0rgBytes

Cyb0rgBytes here back again with another write up, As always and in every penetration testing engagement we start by the first phase which is information gathering.

our handy tool for this task is nmap, using the tool as follows:

Press enter or click to view image in full size

Scanning using nmap tool.

From the scan we get the following results:

Press enter or click to view image in full size

Nmap’s Scan Results.

I noticed that there is an open port on HTTP “port 80” by looking at the webpage I could find that there is a CMS to be precise a Drupal CMS, the version of that CMS is 7 so I searched with searchsploit with the following keyword: searchsploit Drupal I got the following exploits:

Press enter or click to view image in full size

Exploits found using searchsploit tool and exploitDB

From this screenshot, we have a variety of options to try out I tried one of them but it didn’t go through so moving on.

what really helps in these engagements is finding more and more about the target, right here enumeration plays a vital role in our strategy. by running gobuster “an Enumeration tool for scanning for web directories” we find the following web directories >

Press enter or click to view image in full size

Enumeration Results.

from this list we find an admin page which seems interesting

later on and after a bit of looking around, I found out as I mentioned before that the Drupal CMS version is 7 and there is an exploit that could be automated and used by metasploit that can be used to our advantage :

Press enter or click to view image in full size

Using the exploit to land a foothold.

the exploit exploits a Drupal property injection in the forms API, these versions are affected:

Get Cyb0rgBytes’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

Drupal 6.x, < 7.58, 8.2.x, < 8.3.9, < 8.4.6, and < 8.5.1 are vulnerable.

and there we go, shell initiated.

since we got our initial foothold on the box lets move on to our next stage in our attack, which is privilege escalation, where in that process we reach root!

lets use an automation tool for our strategy, it’s called linpeas

lets first go to the /tmp directory :

and from our box host a python server so we can grab the script directly from our box.

Spawning a python TTY Shell. and going to the /tmp directory.

Press enter or click to view image in full size

Hosting a python server on our own machine.

by scrolling around linpeas privilege escalation results we discovered a possible PE Vector, which is using “find” /usr/bin/find

by going to gtfobins.github.io we can find the right command to grant us the root shell we desire.

  • find . -exec /bin/sh \; -quit

Press enter or click to view image in full size

Finally gaining root!

Thanks for reading until now, you’re a legend!

I’d like to thank everyone for reading my content, I work really hard on documenting these writeups so it would be highly appreciated if you star my stories if you like them, feel free to check the other stories they are superb!

also I want to mention that im enrolled in Medium’s Partner program recently, thanks everyone for the support and see you in the next one!


文章来源: https://infosecwriteups.com/dc-1-box-from-offsecs-proving-ground-654222ee3152?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh