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
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
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
This revealed the presence of a daloRADIUS server.
HTTP Enumeration
Accessing the daloRADIUS endpoint returned a 403 Forbidden.
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
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
Inside /app, I found users and operators directories. Proceeded to explore futhur
Credential Hunting
Visiting /users showed a login page:
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
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
This time, the credentials worked.I was successfully logged in.
Looting User Data
Inside the dashboard, I found a user list:
One entry contained a password hash:
I cracked it using CrackStation and retrieved the plaintext password:
Initial Shell
With SSH open, I tried the credentials and logged in successfully–Got the user flag
Privilege Escalation
Checking sudo permissions:
1
sudo -l
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:
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!














