VulnHubEasy

VulnHub: Boot2root (Rick & Morty)

A CeWL-generated wordlist cracks Joomla admin, template editing gets a reverse shell, and hardcoded credentials in an automation script complete a sudo (ALL:ALL) escalation to root.

Nmap Scan

nmap -p- -sV -sC -A -vv 192.168.11.112

nmap scan results

Four ports open: 22 (SSH), 80 (HTTP), and 111 / 38717 (RPC).

Web Enumeration (Port 80)

The web server serves a Bootstrap-based landing page:

Bootstrap landing page

Directory Fuzzing

ffuf -u http://192.168.11.112/FUZZ -w /usr/share/wordlists/dirb/big.txt

ffuf directory fuzzing results

A /Joomla directory turns up quickly:

Joomla directory discovered

Fuzzing inside /Joomla/ and inspecting the source didn’t yield an immediate vulnerability — which points toward credential discovery as the way in, rather than an exploit.

Exploitation: Custom Wordlist & Brute Force

CeWL builds a custom wordlist directly from the site’s own content:

CeWL generating a wordlist from site content

That tailored dictionary successfully brute-forces the admin account:

admin credentials found via brute force

Gaining Admin Access

Joomla administrator login page Joomla admin control panel after login

Gaining a Shell: Template Manipulation

Joomla’s admin panel allows editing templates directly. Navigating to the Beez3 template and modifying one of its PHP files to include a reverse shell:

editing a template file to insert a reverse shell

After starting a local listener and previewing the modified template, the reverse shell connects back:

nc -lvnp 4444

reverse shell caught on the listener

Shell Stabilization

python -c 'import pty; pty.spawn("/bin/bash")'
# [CTRL+Z]
stty raw -echo; fg
export TERM=xterm

stabilizing the shell to a proper PTY

Privilege Escalation

Enumeration turns up a Python automation script with hardcoded credentials for another system user (redacted here — password and username both visible in the original find):

fileshare.py script containing hardcoded credentials, redacted

Lateral Movement

Those credentials pivot to a second user over SSH:

SSH login as tim using the discovered credentials

Vertical Escalation to Root

Checking sudo privileges reveals a critical misconfiguration — the user is granted (ALL : ALL) ALL:

sudo -l showing unrestricted root access, root shell obtained

TacticFinding
VulnerabilityMisconfigured sudoers (/etc/sudoers)
ImpactFull system compromise (EUID=0)

The flag is retrieved from /root with the newly obtained root shell.

Takeaways

  • No exploit code anywhere in this chain — every step was a configuration weakness: fuzzable content that fed a targeted wordlist, an admin panel that allows arbitrary PHP execution by design, and an automation script that hardcoded a password instead of using a credential store.
  • CeWL turning the site’s own words into the wordlist that cracked its own admin account is a good reminder that generic rockyou-style lists aren’t always the right first move — the target’s own content is often a better source.
  • (ALL : ALL) ALL in sudoers is about as close to “game over” as a misconfiguration gets; it’s worth being one of the first things checked on any foothold, not the last.