LinkVortex

Hack The Box | Penetration Testing Report

Table of Contents

1. Introduction 2. User flag 3. Root flag

1. Introduction

In this project, we will analyze the LinkVortex machine on Hack The Box. As the machine is still active on the platform, the most sensitive information will be censored in compliance with site policies.

first

The machine's address, as shown in the image, is 10.10.11.47.

2. User flag

First we will run nmap, to check the active ports.

first

As shown in the image, two ports are active: port 22 and port 80. We will access the web interface by navigating to http://10.10.11.47 in the browser.

The site on port 80 doesn’t seem to offer anything interesting at first glance, so I decided to use ffuf to dig a bit deeper and search for hidden directories.

first

None of the directories I found revealed anything useful, so I decided to reutilize ffuf to look for any subdomains that might be worth exploring.

first

As shown in the image above, ffuf reveals the dev subdomain. However, even the page at http://dev.linkvortex.htb doesn’t offer anything particularly useful. So, I’ll run ffuf again to search for directories on this subdomain and see if it reveals anything interesting.

first

ffuf reveals a .git directory on the subdomain. By navigating to http://dev.linkvortex.htb/.git, we can access the page shown below.

first

To extract all the files from the directory, we’ll use a tool like git-dumper. This allows me to download the repository's contents onto our machine for further analysis.

first

After extracting the files with git-dumper, I discovered a file named authentication.test.js. Upon inspecting it, the file contains various credentials, which might be useful for gaining further access.

first first first

Among the credentials found in authentication.test.js is one for admin@linkvortex.htb. By navigating to http://linkvortex.htb/ghost, one of the directories previously uncovered using ffuf, I was able to log in to the admin page using these credentials.

first

Once logged into the site with the administrator credentials, I can navigate to the settings section. Here, I'll be able to check the version of Ghost installed on the platform, which could help in planning further actions or updates.

first

As shown in the image above, the site is running Ghost version 5.58.0. I’ll search for vulnerabilities in this specific version, which led me to discover the exploit shown in the image below.

first

Running the exploit successfully grants me the credentials for the user bob@linkvortex.htb. This allows me to gain access to the account.

first

With the credentials for bob@linkvortex.htb, I can now use the SSH command ssh bob@linkvortex.htb to access the account.

first

Once inside Bob's account via SSH, I can navigate around and retrieve the user flag.

first

3. Root flag

Staying inside Bob's account, I can run the command sudo -l to check the sudo privileges. From the output, I can see that Bob has permission to execute the clean_symlink.sh script as root. This could be a potential vector to escalate privileges.

first

The script clean_symlink.sh is displayed in the image above. It could potentially allow me to exploit a vulnerability and escalate my privileges.

first

To escalate my privileges to root, I executed the commands shown in the image below, allowing me to modify the clean_symlink.sh script and achieve root access.

first

By successfully obtaining both the user and root flags, LinkVortex has been pwned.

first