$ cat writeup.md…
$ cat writeup.md…
hackthebox
Task: HackTheBox Full Pwn machine with openSUSE Leap 15.6 and Pterodactyl Panel v1.11.10. Solution: Chain of three CVEs — LFI via pearcmd.php for RCE, PAM environment injection for polkit bypass, XFS resize race condition for SUID root shell.
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
HackTheBox Full Pwn machine. openSUSE Leap 15.6 с Pterodactyl Panel v1.11.10. Три CVE в цепочке: LFI → RCE → polkit bypass → race condition → root.
Target: 10.129.4.204 (HTB VPN)
OS: openSUSE Leap 15.6 (Kernel 6.4.0-150600.23.65-default, Btrfs)
Services: SSH (22), nginx (80), PHP-FPM (9000), MariaDB (3306), Redis (6379), Postfix (25)
Web: Pterodactyl Panel v1.11.10 on panel.pterodactyl.htb
Flag format: 32-char hex hashes
Hard-level machine with a chain of three 2025 CVEs. Key characteristics:
user_readenv=1 by default allows environment variable injection (CVE-2025-6018)nosuid (CVE-2025-6019)targetpw in sudoers — trap: sudo (ALL) ALL is useless without root passwordHint for privesc — email from headmonitor about "Unusual udisksd activity".
nmap -sV -sC -p- 10.129.4.204 --open -T4
| Port | Service | Details |
|---|---|---|
| 22/tcp | SSH | OpenSSH |
| 80/tcp | nginx | Two vhosts: pterodactyl.htb (static), panel.pterodactyl.htb (Pterodactyl Panel) |
Pterodactyl Panel v1.11.10 identified on panel.pterodactyl.htb.
Pterodactyl Panel v1.11.10 has unauthenticated LFI via endpoint /locales/locale.json — parameters locale and namespace allow path traversal.
Key technique: including pearcmd.php (/usr/share/php/PEAR/pearcmd.php on openSUSE) allows using PEAR config-create to write arbitrary PHP files.
Exploit rce.py (two-stage):
#!/usr/bin/env python3 """ CVE-2025-49132 — Pterodactyl Panel LFI via pearcmd.php Stage 1: Write PHP payload via pearcmd config-create to /var/tmp/ Stage 2: Include the written file via LFI to execute commands """ import requests import sys TARGET = "http://panel.pterodactyl.htb" ...
$ grep --similar