UnderPass¶
Initial Scan¶
Port 22 is SSH, port 80 is HTTP.
Enumeration¶
The site runs daloRADIUS v0.9 at http://10.10.11.48/daloradius/.
Default credentials work:
The operator panel is at http://10.10.11.48/daloradius/app/operators/ and the user panel at http://10.10.11.48/daloradius/app/users/.
Exploitation¶
From the daloRADIUS interface, we find the user flag. The SSH user is svcMosh with the mosh-server configured for sudo.
User Flag¶
Privilege Escalation¶
mosh-server Sudo¶
The user svcMosh can run mosh-server as root without a password:
svcMosh@underpass:~$ sudo -l
User svcMosh may run the following commands on localhost:
(ALL) NOPASSWD: /usr/bin/mosh-serve
On the target:
This outputs a MOSH_KEY value. On the attacker machine, we connect using that key:
We now have a root shell.
Flags¶
user.txt: f6ecb2f4669430a32805385e3fab0b19
root.txt: 76b4f1c723a85f4edd6305ab90e110ba