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

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

Viewing the source code shows a /nibbleblog subdirectory.
Blog page

Checking the uncategorised page shows an interesting URL.

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.

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

The update page reveals a config file.


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.

/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

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

We get a shell.
Privilege Escalation
linPEAS showed us that the machine was vulnerable to polkit.

We get a root shell.
