Adhyan Agarwal logoadhyan agarwal
BACK TO ARCHIVE
HTB|2018.01.13

Nibbles — Nibbleblog File Upload RCE to pkexec Root

OS

Linux

Difficulty

Easy

Category

WEB

Released

2018.01.13

Found a Nibbleblog install, leaked the admin user from users.xml and guessed the password. Abused the My Image plugin arbitrary file upload to drop a PHP reverse shell, then escalated to root with the polkit (pkexec) local privilege escalation.

Want to try this box yourself?

Spoiler-free mode is on by default — every solution stays hidden behind a reveal. Peek the hints, attempt each step, then unlock the answer when you're stuck. Turn it off to read every solution inline.

Nmap

Pasted image 20251101142812

Visiting the website shows a page that reads Hello World!.

Pasted image 20251101142937

Viewing the source code shows a /nibbleblog subdirectory.

Blog page

Pasted image 20251101143119

Checking the uncategorised page shows an interesting URL.

Pasted image 20251101143319

Looking at the nibbleblog GitHub page, we see the repo has an admin.php section.

Looking at it on the web app reveals a login page.

Pasted image 20251101144235

Looking at other pages from the GitHub repo, we find an install.php page that redirects to update.php.

Pasted image 20251101144641

The update page reveals a config file.

Pasted image 20251101144713

Pasted image 20251101144819

The config.xml file has a username admin@nibbles.com.

Searching online for Nibbleblog default credentials shows that the credentials are admin:demo, but they do not work.

Continuing enumeration and just visiting the /content page shows the directory list.

Pasted image 20251101151022

/content/users.xml shows that one of the users is admin.

After enumerating a lot, we could not find the password, so we looked at a writeup and found that people simply guess the password and it is nibbles.

Primary Foothold

Pasted image 20251101153200

Using a PoC we found online that exploits an arbitrary file upload vulnerability in Nibbleblog, we uploaded a PHP reverse shell from revshells.com.

Pasted image 20251101154000

We get a shell.

Privilege Escalation

linPEAS showed us that the machine was vulnerable to polkit.

Pasted image 20251101160546

We get a root shell.