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) ← interesting
    • griefprevention-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 = root
  • sqlPass = 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
  • strings on a JAR is the fastest way to find plaintext secrets without a decompiler
  • WordPress author enumeration via /?author=1 reveals valid usernames instantly
  • Database credentials are very often reused as system user passwords β€” always try them on SSH
  • (ALL : ALL) ALL in sudo -l = instant root with sudo 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.

Find us elsewhere

Merch, stickers, and moreSupport the work at the Solvere Labs shop