A retro Linux box running a Minecraft-themed WordPress site — a forgotten plugin file hiding in plain sight contains the keys to the whole machine.
Recon
Nmap
1 | |
Four ports of interest:
21/tcp— FTP, open but unversioned22/tcp— OpenSSH 7.2p280/tcp— Apache 2.4.18 redirecting toblocky.htb25565/tcp— Minecraft 1.11.2 server
Foothold
Hosts File
1 | |
WordPress Fingerprinting
The site is a WordPress blog. whatweb confirms the version:
1 | |
Directory Enumeration
1 | |
The plugins/ directory is publicly accessible and contains BlockyCore.jar — a compiled Minecraft plugin.
JAR Decompilation — Hardcoded Credentials
Download and extract the JAR:
1 | |
Decompile the bytecode with jadx:
1 | |
The decompiled source exposes hardcoded SQL credentials:
1 | |
phpMyAdmin — WordPress User Discovery
The phpmyadmin directory found during enumeration is accessible. Logging in with root:8YsqfCTnvxAUeduzjNSXe22 works and reveals the wordpress database. The wp_users table exposes one account:
1 | |
The hash uses WordPress’s MD5-based format. Cracking it with rockyou.txt fails, but the SQL password itself turns out to be reused for SSH.
SSH Access
1 | |
The user flag is accessible from here.
Privilege Escalation
Unrestricted Sudo
1 | |
notch can run any command as root. Escalate directly:
1 | |