HTB — UnderPass
HTB #3
Nmap scan
Accessing the target via HTTP on port 80 revealed the default Apache landing page.
A subsequent UDP scan identified port 161/UDP as open, which is typically associated with the SNMP (Simple Network Management Protocol) service
An snmpwalk enumeration of the SNMP service revealed references to ‘underpass’ being associated with a daloradius server. This suggested the presence of a web-based login interface related to the radius management service.
To identify hidden directories or files on the web server, I conducted directory enumeration using both gobuster and ffuf with common wordlists.
During directory enumeration, I discovered a potential login interface located at:
http://underpass.htb/daloradius/app/operators/login.php. This endpoint is associated with the daloradius management portal.
We were able to login with default daloradius logins.
‘Administrator@radius’
We were able to gain access to the console as seen below
Navigating through the console we managed to find a user and a hash.
Get Brian’s stories in your inbox
Join Medium for free to get updates from this writer.
User: ‘svcMosh’
Hash: ‘412DD4759978ACFCC81DEAB01B382403’
With the recovered hash, I initiated a password cracking attempt using Hashcat. The attack was successful, revealing the plaintext password associated with the svcMosh user account
Now with a username and password we can try to ssh.
We successfully gained initial access.
Now we can try to gain root access.
Utilizing ‘sudo -l’ we manage to find the following hidden and allowed command:
I always like running the hidden command as sudo to see if we discover any hidden messages. In this case, we did. We discover a port and some sort of key.
After using ChatGPT I utilized the following command to generate a new key
‘sudo /usr/bin/mosh-server new -p 65000’
We are utilizing a random high port to compliment the mosh server.
Lastly, we then initiate the task with the following command and if done correctly we should gain root access:
‘MOSH_KEY=PxlXxqkamhZJT+E4qgJubg mosh-client 127.0.0.1 65000’
Success! We gained root access.






