Sitemap
Dhiasaid

Dhiasaid

cybersecurity and rammstein

Hackthebox: Facts

5 min readJun 6, 2026

--

Facts, an easy-rate hackthebox machine dealing with exposed s3 bucket misconfiguration that leads to leak to certain content from buckets, mainly caused by misconfiguration on s3 buckets , then doing the sudo -l to execute a bash script to escalate privilege

it’s been a while since i solved a machine on hackthebox , so i said to myself , let’s give it a try

first we do basic nmap scan

Press enter or click to view image in full size
nmap scan

we find some port 80 http open and ssh , so it means there is a website and the possibilty of a user that we might enumerate

so from here , let’s check the website

Press enter or click to view image in full size

nothing really useful, i tried enumerating directories that are there and i found something really interesting

Press enter or click to view image in full size

there are directories that lead to admin login , which means i can login as admin , let’s go there

Press enter or click to view image in full size

okay i need to login as admin , i put some default creds admin:admin and it was incorrect , but what i found is that you can create an account (does it mean i can create account as admin ?) we don’t know yet , so i created an account as bald with password BALD123 and i entered the website

Press enter or click to view image in full size

yup i am the admin panel of my site (not really) i found down there that we have a cms called camaleon (written in ruby) with version 2.9.0 , while googling the website i found a lot CVEs , one of them that caught my attention was this:

CVE-2025–2304

basically this version is vulnerable to extraction of s3 configuration from the admin settings page , which means i can fetch csrf token and login as full admin with my new account

Press enter or click to view image in full size
Press enter or click to view image in full size

okayy we entered as fully admin and we were able to see the plugins and all that stuff , also we were able to extract s3 configuration files as well as reverting to admin

we can use aws configure to add the keys

Press enter or click to view image in full size

now let’s try to dive

Get Dhiasaid’s stories in your inbox

Join Medium for free to get updates from this writer.

we go to the s3 bucket we find 2 important ones

dive more in internal , i found ssh keys , which is cool

and an id , we can convert it to id_ed255519.hash and use john the ripper to crack it

Press enter or click to view image in full size
Press enter or click to view image in full size

now let’s crack it

Press enter or click to view image in full size

okayy we have done it

we found a password , but what is the username that we will use , okayy while diving into the version of camaleon 2.9.0 , i found out that there is a cve from 2024 that we can do authenticated file read (LFI path traversal)

CVE-2024–46987

okayy by executing it i found two users that are really suspicious william and trivia

Press enter or click to view image in full size

so from here let’s try to go as trivia

Press enter or click to view image in full size

yes!!! we have done it , now we are logging in using ssh as user trivia but the flag wasn’t there , so i redirected myself and i found that i can go as william , interesting !

let’s go there

user flag

yup we found the user flag, cool

now can we go as root ??

YES!

performing privilege escalation was really easy , by doing sudo -l i found out that i can perform the command facter

facter is a a system inventory tool that collects basic information (facts) about a node (system), such as hardware details, network settings, and OS type, and displays them as key-value pairs

the version was important , it was 4.10.0 , so it uses the — custom-dir method

so we create the custom fact and run it with sudo

Press enter or click to view image in full size

yup it worked and we entered as root

from there we go to the / path and we will find the flag

Press enter or click to view image in full size
root flag

yup we pwned the machine , and i know i was late to the party (REALLY RALLY LATE) but thank god i won’t miss it

Press enter or click to view image in full size

it was an easy machine ik , but i love working on it to rework my muscle brains on hackthebox , till the next machine (very soon).

written by: Dhia Eddine Saïd (BALD)

--

--

Dhiasaid
Dhiasaid

Written by Dhiasaid

cybersecurity and rammstein