ExpressWay¶
Initial Scan¶
| Port | Service | Detail |
|---|---|---|
| 22/tcp | SSH | OpenSSH |
| 500/udp | ISAKMP | IPSec VPN |
Only SSH and an IPSec VPN endpoint are open.
Enumeration¶
IPSec VPN Discovery¶
Scanning for VPN identity using ike-scan:
This identifies the VPN gateway and captures the PSK hash for offline cracking.
PSK Cracking¶
Cracking the pre-shared key with RockYou:
The PSK is cracked successfully.
Exploitation¶
SSH Access¶
Using the IKE identity ike@expressway.htb and the cracked PSK as the SSH password:
The user flag is in the home directory:
Privilege Escalation¶
Squid Proxy Logs¶
The user has access to a Squid proxy group. Checking the Squid proxy logs reveals a hostname:
Sudo with Hostname¶
The user can run sudo commands, but only when targeting a specific hostname. The custom sudo binary at /usr/local/bin/sudo validates the -h parameter against the hostname found in the Squid logs:
This grants a root shell.
Flags¶
user.txt: 523a9fc683eb5988971edd3b36b7863f root.txt: ***