voy# Nibbles - A Hack The Box machine
Results:
Visiting the IP:80 in the browser and reviewing source code there is a comment:
So, we have a website at http://10.129.96.84/nibbleblog/
Dirb enumeration reveals a login panel: http://10.129.96.84/nibbleblog/admin.php
Too many login attempts too quickly trigger a lockout with the message "Nibbleblog security error - Blacklist protection".
Also, dirb enumeration reveals some directories that are listable. Browsing around we get to this file: http://10.129.96.84/nibbleblog/content/private/users.xml where user "admin" is exposed.
Also CMS version is disclosed in http://10.129.96.84/nibbleblog/README:
A quick search for that version brings up this vulnerability:
https://github.com/dix0nym/CVE-2015-6967/blob/main/README.md
In the usage example we can read:
Default credentials are:
Also, reading the code of the exploit, we can see that the triggered endpoint for this CVE-2015-6967 is:
Knowing this, we can login into the panel http://10.129.96.84/nibbleblog/admin.php and go to Plugins>My Image> Configure.
In the browser, upload a file. In my case, I uploaded my pentesmonkey.
Now, we need to find where this file has been saved to. After browsing around, I ended up in http://10.129.96.84/nibbleblog/content/private/plugins/my_image/
There there was a file called image.php. Before clicking on it, we open in our attacker machine a netcat listener:
Click on the file image.php listed in http://10.129.96.84/nibbleblog/content/private/plugins/my_image/ and you will have a reverse shell.
Cat user.txt (under /home/nibbler).
Privilege escalation
Results:
At /home/nibbler, unzip the file personal.zip. Now you can even replace monitor.sh for a different monitor.sh. Mine has:
Now run:
And you are root. Remember to do a chmod if needed.
Some input from HTB walkthrough
You can run nmap script for nibbles service:
For privilege escalation:
Alternative way:
We need to set the admin username and password admin:nibbles and the TARGETURI to nibbleblog.
Last update: 2024-06-06 Created: May 23, 2023 19:56:20