root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat blocky.md
// writeups

Blocky

21 Jul 2017 · 11 min read · root access
Blocky - maquina de Hack The Box

Executive summary — Blocky is an Easy Linux box with a great lesson about secrets in code. A Minecraft-blog WordPress mentions user notch in a post, and gobuster finds a /plugins directory holding two downloadable .jar files, plus an exposed /phpmyadmin panel. Decompiling one of the .jar files reveals hardcoded MySQL credentials. That password doesn't work on the WordPress login, but it does unlock phpMyAdmin — from there an alternate path exists (rewriting notch's hash in wp_users and planting a reverse shell in the theme template) that lands as www-data, without direct access to the user flag. The clean route is simpler: notch reuses that same database password directly over SSH. Once in, unrestricted sudo gives root immediately. A WordPress → .jar → credentials → SSH → sudo → root path.

PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.10.10.37

Attack map

[80] WordPress (Minecraft blog) → a post reveals user «notch»
   │  gobuster → /plugins (two downloadable .jar files), exposed /phpmyadmin
   ▼
[.jar]  decompiled BlockyCore.jar → MySQL credentials: root:8Ysqf...
   │  don't work on wp-login, DO work on /phpmyadmin
   ├─▶ (alt route) phpMyAdmin → MD5 hash in wp_users → wp-admin →
   │     reverse shell in the 404.php template → www-data (no user.txt)
   ▼
[SSH]  notch reuses that same .jar password → user.txt
   │  sudo -l → (ALL : ALL) ALL, no NOPASSWD
   ▼
[ROOT]  sudo su

1. Reconnaissance with Nmap

First, a quick full-port scan so nothing outside the usual service list slips by:

nmap -p- --min-rate=1000 -T4 -Pn 10.10.10.37 -oN nmap_all_ports.txt

-p- scans all 65535 ports, --min-rate=1000 speeds up packet sending, -Pn skips ping discovery (in case the host blocks ICMP) and -T4 raises the timing aggressiveness.

With the open ports already located, a detailed scan against those specific ports:

nmap -p21,22,80,25565 -sC -sV -A 10.10.10.37 -oN nmap_detailed.txt
21/tcp     open  ftp
22/tcp     open  ssh
80/tcp     open  http
25565/tcp  open  minecraft

-sC runs the default NSE scripts, -sV detects service versions and -A adds OS detection and traceroute. Port 25565 (Minecraft) confirms the site's theme before we even open a browser; FTP (21) and SSH (22) give up nothing without credentials, so HTTP (80) is the mandatory entry point.

🔒 Clearance required

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

No account? Create one free then upgrade from your console.