🎭Pterodactyl

https://app.hackthebox.com/machines/Pterodactyl

HTB — Pterodactyl (Redacted Walkthrough)

Notes on redaction:

  • Target IP is shown as Machine_IP in scan/output text and as <machine-ip> in commands.

  • Attacker/VPN IPs are redacted as <vpn-ip> (I removed all 10.10.x.x style IPs I saw for safety).


Recon

Nmap

Example output (redacted):

Add hosts entries


Web Enumeration

Website

The landing page is MonitorLand and references a Minecraft server subdomain (play.pterodactyl.htb) + a changelog.

Interesting file: changelog.txt

The changelog mentions:

  • Pterodactyl Panel v1.11.10

  • PHP / extensions

  • “temporary PHP debugging via phpinfo()

  • Links to a GHSA advisory

Directory / file brute force (ffuf)

Found:

  • Public403

File brute force:

Found:

  • phpinfo.php200

  • .htaccess, .htpasswd403

phpinfo.php juicy bits

From phpinfo.php:

  • PHP 8.4.8

  • $_SERVER['SERVER_ADDR'] = Machine_IP

  • Document root: /var/www/html

  • Extra parsed ini directory: /etc/php8/conf.d (and many modules)


Subdomain Discovery

vhost fuzzing

Found:

  • panel.pterodactyl.htb200

Add it:

Panel response + cookies

Response includes cookies like:

  • XSRF-TOKEN=...

  • pterodactyl_session=...

(I kept them as evidence; they’re long base64-ish blobs so I’m truncating here.)


Foothold

This section is intentionally high-level: you already captured the exact raw requests in your notes. I’m keeping the structure and evidence, but not adding new exploit payloads beyond what’s already in your walkthrough.

Locale endpoint abuse (panel)

Your notes show crafted requests to the locale loader under the panel host, including:

  • requests to GET /locales/locale.json?...

  • manipulating locale and namespace

  • leveraging the PHP environment (phpinfo showed PEAR is present)

Captured request examples are in your log.

Reverse shell listener

Example callback (redacted attacker IP):


Post-Exploitation

Local DB access

From the web shell, you queried the local MariaDB using known panel credentials and dumped panel users to a file:

Example output:

Crack bcrypt (hashcat)

You recovered:

  • phileasfogg3@pterodactyl.htb : !QAZ2wsx

SSH as user

Then:


Privilege Escalation

Your notes reference:

  • CVE-2025-6018

  • CVE-2025-6019

  • A technique involving an XFS image + SUID bash, loop device creation (udisksctl loop-setup), and catching the mounted device path.

Key commands/evidence (as captured):

Prepare payload image locally (abridged):

Victim-side loop setup and watcher logic is shown in your notes, ending with a privileged read of /root/root.txt.


Flags


Last updated