Post

UnderPass(Easy) | Hack the Box

UnderPass(Easy) | Hack the Box

HackTheBox — UnderPass Write-Up

Recon

I started with a quick TCP scan using RustScan to identify open ports:

1
sudo rustscan -a 10.10.11.48

My profile photo

Only two TCP ports were open. They didn’t reveal anything interesting, so I moved to a UDP scan to look for additional services:

1
sudo nmap -sU 10.10.11.48 -T4

My profile photo

The scan revealed UDP port 161 (SNMP). The service banner also disclosed the hostname:

1
UnDerPass.htb

SNMP Enumeration

Using snmpwalk, I enumerated the SNMP service:

1
snmpwalk -v 2c -c public 10.10.11.48

My profile photo

This revealed the presence of a daloRADIUS server.

HTTP Enumeration

Accessing the daloRADIUS endpoint returned a 403 Forbidden.

My profile photo

I decided to brute-force directories under /daloradius using Gobuster:

1
2
sudo gobuster dir -u http://10.10.11.48/daloradius \
-w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 50

My profile photo

The app directory looked interesting, so I enumerated it further:

1
2
sudo gobuster dir -u http://10.10.11.48/daloradius/app \
-w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 50

My profile photo

Inside /app, I found users and operators directories. Proceeded to explore futhur

Credential Hunting

Visiting /users showed a login page:

My profile photo

Searching online for default daloRADIUS credentials gave:

administrator: radius

However, these didn’t work for /users. I moved to the /operators directory and repeated enumeration:

1
2
sudo gobuster dir -u http://10.10.11.48/daloradius/app/operators \
-w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 50 -x .php

My profile photo

The /operators directory also had a login page which included a version number, and for that version, the same default credentials were listed online:

administrator: radius

My profile photo

This time, the credentials worked.I was successfully logged in.

Looting User Data

Inside the dashboard, I found a user list:

My profile photo

One entry contained a password hash:

My profile photo

I cracked it using CrackStation and retrieved the plaintext password:

My profile photo

Initial Shell

With SSH open, I tried the credentials and logged in successfully–Got the user flag

My profile photo

Privilege Escalation

Checking sudo permissions:

1
sudo -l

My profile photo

It allowed running mosh-server with sudo. Did some research online and found this article by Hacking Dream.

and came up with this payload:

1
mosh --server="sudo /usr/bin/mosh-server" localhost

What This Does

1
2
3
4
5
mosh: A mobile shell client for responsive, persistent terminal sessions.

--server="sudo /usr/bin/mosh-server": Runs the mosh server with root privileges.

localhost: Connects back to the local machine.

This escalated my privileges, and I obtained root access:

My profile photo

Summary

1
2
3
4
5
Initial Access: SNMP enumeration → daloRADIUS default credentials

User Shell: Cracked password hash from operator dashboard → SSH login

Privilege Escalation: Sudo permissions abuse with mosh-server

✅ Rooted!

This post is licensed under CC BY 4.0 by the author.