Overview
Expressway is an Easy Linux box centered around IPsec VPN exploitation and a sudo privilege escalation CVE. The machine exposes only SSH (filtered behind the VPN) and IKE on UDP 500. By probing IKE in Aggressive Mode, we leak the server identity ike@expressway.htb and capture the PSK authentication hash. Cracking it with psk-crack reveals a weak pre-shared key that doubles as the SSH password. However, SSH is only accessible after establishing an IPsec tunnel – the IKE Security Association acts as a port-knock. Once inside, we find a SUID Exim binary (a red herring), a Cisco router config on the TFTP server, and crucially, a custom sudo binary at /usr/local/bin/sudo running version 1.9.17, vulnerable to CVE-2025-32463. This “chwoot” vulnerability allows local privilege escalation through improper chroot handling, giving us a root shell.
Key Attack Chain:
- UDP scan discovers IKE on port 500
- Aggressive Mode IKE scan leaks identity and captures PSK hash
psk-crackrecovers the weak PSK:freakingrockstarontheroad- IPsec tunnel established via strongswan with careful XFRM policy management to avoid breaking the HTB VPN
- SSH opens after IKE SA establishment – credentials
ike:freakingrockstarontheroad - CVE-2025-32463 in
/usr/local/bin/sudo1.9.17 escalates to root
Enumeration
Nmap Scan
|
|
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 10.0p2 Debian 8 (protocol 2.0)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Only SSH on TCP. An easy box with one port usually means UDP is hiding something. Let’s scan that:
|
|
PORT STATE SERVICE
500/udp open|filtered isakmp
UDP 500 – IKE (Internet Key Exchange) for IPsec VPN negotiation.
IKE Enumeration
|
|
10.129.5.232 Aggressive Mode Handshake returned
SA=(Enc=3DES Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration=28800)
ID(Type=ID_USER_FQDN, Value=ike@expressway.htb)
VID=09002689dfd6b712 (XAUTH)
VID=afcad71368a1f1c96b8696fc77570100 (Dead Peer Detection v1.0)
Key findings:
- Aggressive Mode is enabled – leaks identity information
- Identity:
ike@expressway.htb - Auth: Pre-Shared Key (PSK) with 3DES/SHA1/MODP1024
- XAUTH vendor ID present – server supports extended authentication
PSK Cracking
Capture the PSK hash in crackable format:
|
|
Crack it:
|
|
Running psk-crack with dictionary "/usr/share/wordlists/rockyou.txt"
Key "freakingrockstarontheroad" matches hash
Foothold
IPsec Tunnel Setup
The tricky part of this box is establishing the IPsec tunnel without breaking your HTB VPN connection. Using strongswan with policies = no prevents automatic XFRM policy installation that would hijack all traffic through the tunnel.
Install strongswan and configure:
|
|
Create the swanctl config:
|
|
Start the tunnel:
|
|
[IKE] IKE_SA expressway[1] established between 10.10.14.157[ike@expressway.htb]...10.129.5.232[ike@expressway.htb]
[IKE] CHILD_SA expressway{1} established with SPIs ... and TS 10.10.14.157/32 === 0.0.0.0/0
initiate completed successfully
Adding Narrow XFRM Policies
With policies = no, no traffic actually flows through the tunnel. We manually add XFRM policies scoped only to the target IP – this encrypts traffic to the box through the IPsec SA while leaving HTB VPN, LAN, and all other routing untouched:
|
|
Important caveats:
- The
reqidmust match the SA’s reqid (check withip xfrm state show) - If the CHILD_SA is rekeyed, the XFRM state gets new SPIs and you need to re-add policies
- Never use
remote_ts = 0.0.0.0/0with automatic policy installation – it will route ALL traffic through the tunnel and kill your HTB VPN
SSH Access
After the IKE SA is established, SSH opens up (it acts as a port-knock):
|
|
PORT STATE SERVICE
22/tcp open ssh
The cracked PSK is reused as the SSH password:
|
|
ike@expressway:~$ id
uid=1001(ike) gid=1001(ike) groups=1001(ike),13(proxy)
ike@expressway:~$ cat user.txt
fd98161b3d9433114102c619a3486e34
Privilege Escalation
Enumeration
Several interesting findings on the box:
|
|
/usr/sbin/exim4 # SUID root - red herring (v4.98.2, patched)
/usr/local/bin/sudo # Custom SUID sudo - suspicious!
/usr/bin/sudo # Standard sudo
|
|
Sudo version 1.9.17
A custom sudo installation at /usr/local/bin/sudo running version 1.9.17 – this is vulnerable to CVE-2025-32463.
Other findings (not needed for exploitation):
- TFTP server at
/srv/tftp/containsciscortr.cfg– a Cisco router config with VPN group keysecret-passwordand internal subnets (10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24) - Exim 4.98.2 SUID – patched against CVE-2025-30232, not exploitable
- Squid proxy config and logs exist but squid is not running
/etc/systemd/system/systemd-networkd.serviceis writable but empty (no obvious trigger)
CVE-2025-32463 – sudo “chwoot” Exploit
CVE-2025-32463 is a local privilege escalation in sudo versions up to 1.9.17. It exploits improper handling of the chroot environment – sudo’s -h (host) flag can trigger an alternate code path that bypasses security checks, allowing escalation to root.
Download the public PoC exploit:
|
|
Transfer to the target and execute:
|
|
|
|
For an interactive root shell:
|
|
# id
uid=0(root) gid=0(root) groups=0(root)
# cat /root/root.txt
9fc7e85b46304042a1d54cc55c9cd18a
Lessons Learned
- Always scan UDP ports – this box only shows SSH on TCP. The entire attack chain starts from IKE on UDP 500, which is invisible to default TCP-only scans
- IKE Aggressive Mode is dangerous – it leaks identity information and allows offline PSK cracking. Servers should use Main Mode or IKEv2 to prevent this
- IPsec tunnel routing requires care – blindly installing XFRM policies for
0.0.0.0/0can hijack all traffic and break existing VPN connections. Usepolicies = noand manually add narrow policies scoped to specific IPs - Credential reuse is common – the IKE PSK was reused as the SSH password, a pattern seen frequently in real environments where VPN and system credentials share the same password
- Custom binary installations are a red flag – the non-standard sudo at
/usr/local/bin/sudowas the privesc vector. Package-managed binaries receive security updates; custom installations often don’t - Not every SUID binary is the path – Exim 4.98.2 with SUID looked promising but was a red herring. The real target was the overlooked custom sudo binary