HackTheBox - Sense Writeup
Box author | lkys37en
Nmap
Like always, I’m going to scan the IP Address by using nmap but I’m going to scan the full port first. Then, I’m going to scan the only open ports.
|
|
Well, only 2
ports are open, which is port 80
and 443
. Based on the port and service itself, looks like I’m dealing with the webserver this time. However, the scan results show me that the url
on port 80
has been redirected to port 443
which is the HTTPS
port.
Https: Pfsense
I’ve navigated to port 443
on my browser and accepted the SSL
certificates. I’ll check the certificate and nothing useful for me. Turn’s out, it is a Pfsense login page. Then, I’ll try login in with the default credentials which is admin:pfsense
and nothing unveil. By the look at the index
page extension, this is a PHP
webpage.
Gobuster
Then, I run the gobuster to enumerate more on this webserver. Unfortunately, I can’t find anything useful and it’s just found empty directories. So, I ended up putting a bunch of extensions such as php,txt,html,cgi
for the second scan, and it manage to find “gold”.
Https: /changelog.txt
The first file that caught my attention is called changelog.txt
. Upon expecting the file it says "2 of 3 vulnerabilities have been patched"
. This gives me an idea of this particular version having a severe flaw that hasn’t been patched. I have 1/3 luck here, to find which one of the flaws is.
Https: /system-users.txt
Anyways, I’ve navigated to another text file called system-users.txt
which leaks the username. However, the password says "company defaults"
. Then, it makes me think it could be the box name which is sense
just like nibbles box that I did before, or the default Pfsense credentials which is pfsense
.
Https: Pfsense/Dashboard
I’ll try both credentials and the correct one is pfsense
and it looks just like a generic pfsense dashboard, what do I expect :). However, it has the version number sitting in front of me which is 2.1.3-RELEASE
.
Foothold: CVE-2014-4688
Since this is an old box, I immediately find the exploit and cve with it. This vulnerability is assigned to CVE-2014-4688 and the description says "this CVE assign to 3 vulnerabilty found in pfsense"
. However, one of them did not patch as the changelog.txt
file expose to me. Luckily, I find this exploit on exploit-db. Which explores the vulnerability in post-authentication in the status_rrd_graph_img.php
page but again I want to be “l33t” and create my exploits by copying the existent exploits. (Why not? lol). Credited to Ryan McFarland aka absolomb and here are the results.
|
|
BOOM! root baby! this is because firewall applications tend to be installed under root privilege.