Helix
Executive summary — Helix is a Medium Linux box with an ICS/SCADA theme. A hidden vhost exposes Apache NiFi 1.21.0 in anonymous mode with full permissions → CVE-2023-34468 (RCE via a malicious H2 JDBC URL in a
DBCPConnectionPool) asnifi. AnoperatorSSH key forgotten in a NiFi «support bundle» gives SSH access (user flag).sudois restricted to a maintenance console gated by a state file only a «safety controller» writes — a simulated reactor gets manipulated over OPC UA (faking the temperature withCalibrationOffset) to force the maintenance window open and reach root.
| Platform | Hack The Box |
| Operating system | Linux — Ubuntu 22.04 (nginx 1.18.0 + Apache NiFi 1.21.0 + a simulated reactor over OPC UA) |
| Difficulty | Medium |
| Status | Retired |
| Target IP | <TARGET_IP> |
Attack map
[1] Recon -- vhost fuzzing -> flow.helix.htb (Apache NiFi 1.21.0, anonimo, canWrite:true)
|
[2] RCE -- CVE-2023-34468: DBCPConnectionPool con URL JDBC H2 sin validar ->
INIT=RUNSCRIPT FROM <url> -> CREATE ALIAS (Java) -> Runtime.exec
+-> reverse shell como nifi
|
[3] Lateral -- clave SSH de operator en /opt/nifi-.../support-bundles/
+-> ssh operator -> user.txt
|
[4] Gate -- sudo NOPASSWD helix-maint-console, gateado por
/opt/helix/state/maintenance_window (lo escribe helix-safety.service, root)
|
[5] Root -- tunel SSH al OPC UA (127.0.0.1:4840) + HMI (8081) -> Mode=MAINTENANCE +
TestOverride=True + CalibrationOffset gradual hasta cruzar 295C SIN trip ->
safety controller abre la window
+-> sudo helix-maint-console -> root.txt
Methodological note: an external hint (a high-level chain summary) avoided having to blindly discover that an industrial protocol (OPC UA) was involved in the final escalation.
1. Reconnaissance and discovering the NiFi vhost
nmap -sC -sV -T4 <TARGET_IP>
22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.15
80/tcp open http nginx 1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://helix.htb/
nmap -p-showed a dozen scattered, patternless high «filtered» ports — noise/rate-limiting, not real services.
echo "<TARGET_IP> helix.htb" | sudo tee -a /etc/hosts
A static single-page site → vhost fuzzing via the Host header:
BASESIZE=$(curl -s -o /dev/null -w "%{size_download}" \
-H "Host: zzznonexistent999.helix.htb" http://<TARGET_IP>/)
ffuf -u http://<TARGET_IP>/ -H "Host: FUZZ.helix.htb" \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
-fs "$BASESIZE" -mc all -t 60
# flow [Status: 200, Size: 1068]
echo "<TARGET_IP> flow.helix.htb" | sudo tee -a /etc/hosts
curl -s http://flow.helix.htb/nifi-api/flow/about # Apache NiFi 1.21.0
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.