Post

HTB Linux Easy: Devvortex

Devvortex is an Easy rated Linux machine on HTB.

HTB Linux Easy: Devvortex

Nmap

Pasted image 20240715101112.png

Add the devvortex.htb domain to the hosts file: Pasted image 20240715101108.png

Initial Foothold

Located the dev subdomain using ffuf (add the subdomain to the hosts file). Pasted image 20240715101103.png

In robots.txt we find the following entries. Pasted image 20240715101058.png

Version found in the README.txt file (Joomla! CMS 4.2). Pasted image 20240715101054.png

Looking for exploits we find an exploit that will give us credentials of users. Pasted image 20240715101049.png

We can use these credentials to log into the /administrator panel lewis:P4ntherg0t1n5r3c0n##. Pasted image 20240715101044.png

On the webpage, go to: system > extensions and upload the zip file from the github repo, next go to manage extensions and filter by date, you should now see your webshell. Pasted image 20240715101041.png

You should now have RCE. Pasted image 20240715101037.png

Gain a shell: step 1, start the Python server and create the payload file. Pasted image 20240715101033.png

Next, start a nc listener and run your exploit. Pasted image 20240715101029.png

You should now have a shell as www-data. Pasted image 20240715101025.png

Lateral Movement

Log in to the MySQL database. Pasted image 20240715101021.png

Find usernames and password hashes in the MySQL database. Pasted image 20240715101016.png

The password hash can be cracked using JohnTheRipper: tequieromucho. Pasted image 20240715101013.png

SSH into the box using: logan:tequieromucho. Pasted image 20240715101008.png

Priv Esc

Sudo -l output: Pasted image 20240715101005.png

Checking the version reveals the following version of apport-cli: Pasted image 20240715101001.png

Start by generating a crash file. Pasted image 20240715100956.png

Next up, run apport-cli as sudo and open the crash file. Pasted image 20240715100952.png

Here, we press V. After the file has opened, we can get a shell by typing !/bin/bash. Pasted image 20240715100948.png

User.txt

Pasted image 20240715100943.png

Root.txt

Pasted image 20240715100939.png

You have PWNED

Pasted image 20240715100934.png

Sources

This post is licensed under CC BY 4.0 by the author.