UnderPass

GrimTheRipper
3 min readDec 25, 2024

--

Nmap scanned the target IP and found ports 22 and 80 open.

nmap

Access Port 80.

port 80

Go back and check again, then start a UDP scan and find port 161.

UDP scan

enumerating with NSE

NSE

enumerating using snmpbulkwalk.

retrieve a subtree of management values using SNMP GETBULK requests

https://linux.die.net/man/1/snmpbulkwalk

snmpbulkwalk

https://github.com/lirantal/daloradius

STRINGS steve@underpass.htb and UnDerPass.htb refer to a single daloradius server. After researching daloradius servers on Google, we discovered that we can log in via http://underpass.htb/daloradius/app/operators/login.php using the default credentials:

http://underpass.htb/daloradius/app/operators/login.php

Username: administrator

Password: radius

Login with default credentials

Successfully logged in.

The credentials are valid!

It was found that there is already a list of users, and we discovered an MD5 hashed password and usernames.

User : svcMosh
password

Then, we can use the username along with the decrypted password to connect via SSH.

ssh

Privilege Escalation:
The first thing we check when attempting privilege escalation is
sudo -l:

sudo -l

When encountering a new command or service for the first time, reading the manual is always a good practice:

Description
mosh-server is a helper program for the remote terminal application mosh(1).

mosh-server connects on a high UDP port and selects an encryption key to secure the session. The program outputs both the port and key information to standard output, detaches from the terminal, and waits for a mosh client to establish a connection. The program will terminate if no client connects within 60 seconds.

mosh-server

Reading examples can help guide you.

Add the mosh-server command by specifying port 61113, obtain the MOSH_KEY, and then run mosh_client with localhost and the port we added.

Privilege Escalation

Root shell!

root
Passed

--

--

GrimTheRipper
GrimTheRipper

Written by GrimTheRipper

You get the best out of others when you give the best of yourself

No responses yet