Page cover

UnderPass

Synopsis

UnderPass is a linux easy machine created by dakkmaddyarrow-up-right. The UDP port 161 is running SNMP service. The enumeration to SNMP reveals the daloradius server is used in the website and enumerating daloradius github repositoryarrow-up-right the login page for users and operators are found. The default credential for daloradius gives us access to daloradius dashboard as an operator. The hash for user svcMosh is present in the user list. Crack the hash and login into system via ssh as svcMosh. The svcMosh user is privileged to use mosh-server as sudo which will be exploited for getting shell as root.

OS
Difficulty
Points
Release Date
Expire Date

Linux

Easy

20

21-12-2024

10-May-2025


Enumeration

Nmap

Started the nmap scan and found ssh and http services running.

nmap -Pn -sC -sV --min-rate=1000 10.10.11.48
Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-15 06:54 EDT
Nmap scan report for 10.10.11.48
Host is up (0.74s latency).
Not shown: 998 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 48:b0:d2:c7:29:26:ae:3d:fb:b7:6b:0f:f5:4d:2a:ea (ECDSA)
|_  256 cb:61:64:b8:1b:1b:b5:ba:b8:45:86:c5:16:bb:e2:a2 (ED25519)
80/tcp open  http    Apache httpd 2.4.52 ((Ubuntu))
|_http-title: Apache2 Ubuntu Default Page: It works
|_http-server-header: Apache/2.4.52 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 42.05 seconds

Scanning the UDP ports reveals the snmp service running.

SNMP - Port 161

snmpwalk reveals steve@underpass.htb mail and UnDerPass.htb is only the daloradius server.

Web - Port 80

The website shows the default apache2 server page.

Fuzzing - Directories and Pages

The fuzzing didn't give us much of the stuff. The snmp mentioned the daloradius server. Fuzzing directories and pages. So trying with adding daloradius server.

daloRADIUS is an advanced RADIUS web management application for managing hotspots and general-purpose ISP deployments. It features user management, graphical reporting, accounting, a billing engine, and integrates with OpenStreetMap for geolocation. The system is based on FreeRADIUS with which it shares access to the backend database.

The daloradius github repositoryarrow-up-right shows the users and operators login.php page and requesting the login.php gives us the daloradius login page.

daloradius github repository
daloradius operator login page

Foothold

Shell - svcMosh

Web surfing about daloradius default credentials presents Administrator:radius credential and the credentials is valid for operator.

Web surfing
Logging as operator

The daloradius dashboard provides the user list. Only svcMosh user and it's hash is present.

Cracking hash using hashcat.

Using the cracked password to login into svcMosh via ssh.

circle-info

The user.txt file contains the user flag 👏


Privilege Escalation

Pillaging - svcMosh [ user ]

The svcMosh user is privilege to run /usr/bin/mosh-server as sudo.

Shell - root

Mosharrow-up-right is a mobile shell tool used to connect from a client computer to a server over the Internet, similar to SSH but with additional features meant to improve usability for mobile users.

Running the mosh-server as sudo gives us port and mosh key.

Connecting to the port 60001 using mosh-client gives us MOSH_KEY environment variable not found error. Create the MOSH_KEY environment variable and running the mosh-client.

circle-exclamation
circle-info

The root.txt file contains the root flag 🎉


Proof of Concept

The below video provides the PoC of UnderPass machine.

Last updated