> For the complete documentation index, see [llms.txt](https://last-kyubi.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://last-kyubi.gitbook.io/home/menu/ctf-writeups/hackthebox-underpass-writeup.md).

# \[HackTheBox] UnderPass WriteUp

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FmTQFsrM7tM9W04QDZZ9L%2FScreenshot%202025-01-10%20alle%2000.53.00.png?alt=media&amp;token=44b589a9-2dcd-4188-8256-6ad60b12c7c9" alt="" width="375"><figcaption><p>HackTheBox - UnderPass</p></figcaption></figure>

Tonight target easy box is called *UnderPass*, what will we find?

Let's start with an *Nmap* scan:

&#x20;

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2Ff88x91MNuTO6N6d2fjV8%2FScreenshot%202025-01-09%20alle%2022.59.48.png?alt=media&amp;token=fade8f98-93f1-40b3-b409-607db08140b4" alt=""><figcaption></figcaption></figure>

We see the port 80 opened. Let's check! (:

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2F2DQ3b2usZQC2CrcqZyEM%2FScreenshot%202025-01-09%20alle%2023.01.50.png?alt=media&amp;token=3a9f4a45-ee2c-49a8-89af-afc07dc8ac26" alt=""><figcaption></figcaption></figure>

There's an apache2 web server: now we start digging.

After various enumeration activities including fuzzing, we see that no files or diretory were found.

Let's start again, trying to enumerate other services that can be abused.

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FHljQYLIUAKRdcKBWhzHp%2FScreenshot%202025-01-09%20alle%2023.37.11.png?alt=media&amp;token=fe7bfc30-bb7b-4c5d-ab1a-38e2613e379f" alt=""><figcaption></figcaption></figure>

We see that there's an SNMP opened port (161), so let's gather more info:

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FQVrVAcFBx6Wbk4eai9zb%2FScreenshot%202025-01-09%20alle%2023.39.53.png?alt=media&amp;token=08877851-acef-46a5-8f9a-d2adb9e1ae05" alt=""><figcaption></figcaption></figure>

We collected the username *steve* and the *daloradius* installation. Let's check!

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FEtQhEcCkmIRziN2RtF0m%2FScreenshot%202025-01-10%20alle%2000.00.01.png?alt=media&amp;token=87d4e9cf-83c1-44e9-b296-37b23e1a3918" alt=""><figcaption></figcaption></figure>

Fuzz more and more:

![](https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FXbYZX1qRwK4GkGSEmK48%2FScreenshot%202025-01-10%20alle%2000.02.57.png?alt=media\&token=3ccd7508-9ad9-442b-b822-903b2602631c)![](https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2F7XiJBdT0dljlueYKfN5K%2FScreenshot%202025-01-10%20alle%2000.01.44.png?alt=media\&token=8e0c6569-881d-44ac-8600-b46aacfcfd88)

Gotcha! (:

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2F8f2xCKhTRwXe1iYDPyB3%2FScreenshot%202025-01-10%20alle%2000.04.17.png?alt=media&amp;token=edb47b9d-1746-4bb8-9453-c7ae06d44062" alt=""><figcaption></figcaption></figure>

Once googled, I tried default credentials *administrator/radius,* but them not worked. Let's enumerate more...

Possible hints for fuzzing are:

-common/

-users/

-operators/

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FTpyjUAxUnYdfrOI5nFvL%2FScreenshot%202025-01-10%20alle%2000.10.59.png?alt=media&amp;token=7d23244b-1ca6-434a-ad7e-b744aa034af7" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FQZGZvaKB5lQFNgczJ55i%2FScreenshot%202025-01-10%20alle%2000.35.01.png?alt=media&amp;token=c3d30a57-7098-4302-b835-f908a35fc4ab" alt=""><figcaption></figcaption></figure>

We have successfully logged in with default credentials in /operators/login.php, so now we continue digging around, figuring out something that can give us a reverse shell or login informations to access ssh! (:

Looking around users lists, we found *svcMosh* with respective encrypted possible md5 password:

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FITZu8hzw0cdD3ov2kREn%2FScreenshot%202025-01-10%20alle%2000.36.34.png?alt=media&amp;token=d52765ea-b8db-4539-a34a-7b635bbfbab7" alt=""><figcaption></figcaption></figure>

Let's fire up our hashcat an decrypt this sheeeeet!! (:

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2F2z5mLOuTOtykzDY7wKaz%2FScreenshot%202025-01-10%20alle%2000.40.07.png?alt=media&amp;token=551d6899-5b2b-47dc-9d0d-c21c07de97b7" alt=""><figcaption></figcaption></figure>

Leeeeeesgoooo! We now login via ssh and start enumerating privileges with "sudo -l" (but do not forget to cat user.txt):

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FX6Sq4CdV75TGQBvNTCF2%2FScreenshot%202025-01-10%20alle%2000.43.27.png?alt=media&amp;token=e2f6df21-4321-4f98-a802-652d99819cea" alt=""><figcaption></figcaption></figure>

To escalate privileges, we need to use mosh to spawn a shell as super user, let's try:

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FwCtCYNflicGHm6ijhyF5%2FScreenshot%202025-01-10%20alle%2000.48.26.png?alt=media&amp;token=9da3240d-f748-415c-8016-66404c5d2e66" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2757105280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnZbAVJD115uDdr5hrn1b%2Fuploads%2FgRrscD277L4tu6lm4t6e%2FScreenshot%202025-01-10%20alle%2000.49.42.png?alt=media&amp;token=22e3d6db-164e-44f9-a857-1cee32ef3163" alt=""><figcaption></figcaption></figure>

Good game, we just finished this box! (:

Happy exploiting ^-^
