Adhyan Agarwal logoadhyan agarwal
BACK TO ARCHIVE
HTB|2026.01.31

Facts — Camaleon CMS Arbitrary File Read to facter Root

OS

Linux

Difficulty

Easy

Category

WEB

Released

2026.01.31

Abused CVE-2024-46987 in Camaleon CMS for arbitrary file read, looted an encrypted SSH key for trivia and cracked its passphrase with John, then escalated to root through a NOPASSWD facter --custom-dir GTFOBin.

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

Web Enumeration

FFUF

FFUF found a subdirectory called admin. Browsing to the page, we find a login page.

Facts admin login page

There is a "create an account" function that allows new users to register.

Create-an-account registration form

After logging in, it appears to be an admin dashboard.

Camaleon CMS admin dashboard

Looking around, we find version info for Camaleon CMS version 2.9.0.

Searching online for a CVE, we find CVE-2024-46987 and this POC.

Using the exploit, we get arbitrary file read.

From /etc/passwd, we see there are 2 users: trivia and william.

Initial Foothold

We try to find SSH keys for trivia.

The authorized_keys file contains public keys that are allowed to SSH into the trivia user's account. If we have the matching private key for any public key listed here, we can authenticate and log in via SSH.

Looking for a private key, we find one, but it is encrypted.

We save it to a file to decrypt.

We use ssh2john to convert it to a hash.

We change the file permissions on the private key file.

We SSH into the machine as the user trivia.

The user flag can be found in William's home directory and does not require a password.

Privilege Escalation

We use the sudo -l command to see what commands can be run with escalated permissions without a password.

Looking at the binary:

Facter is a CLI tool that gathers basic facts about systems. It is written in Ruby.

Writing to the file /usr/bin/facter is not allowed.

Looking online for Facter, a GTFOBins entry exists.

Changing the FACTERLIB variable is not allowed.

Looking at the man page, the --custom-dir option can be used instead.

The root flag is in the /root directory. Root flag captured on Facts