Spectra
Executive summary — Spectra is an interesting Easy box because it doesn't run a standard Linux, but ChromiumOS. A forgotten directory listing at
/testing/exposeswp-config.php.save, a leftover backup with the database credentials. Those credentials don't work against MySQL remotely (the server restricts the source host), but the admin reuses them as their WordPress account password: we log into the panel and edit an inactive theme's404.phptemplate for RCE. With LinPEAS we find a ChromiumOS-specific autologin file holdingkatie's password in plaintext (SSH, user.txt). katie can run/sbin/initctlvia sudo —the Upstart job manager, which isn't listed on GTFOBins— and the test job/etc/init/test.confis editable: we inject a payload that runs as root. Path: wp-config.save -> WP RCE -> autologin -> katie -> initctl -> root.
| Platform | Hack The Box |
| Operating system | Linux (ChromiumOS) |
| Difficulty | Easy |
| Status | Retired |
| Target IP | 10.10.10.229 |
Attack map
[80] /testing/ with directory listing -> wp-config.php.save (DB creds)
| the DB refuses remote connections, but the admin reuses that
| password on WordPress
v
[WP admin] edit 404.php on an inactive theme -> reverse shell (www-data)
| ChromiumOS (not standard Linux) -> LinPEAS -> plaintext autologin
| passwd file -> katie password
v
[SSH] katie (user.txt)
| sudo NOPASSWD /sbin/initctl (Upstart, not on GTFOBins) ->
| editable /etc/init/test.conf job
v
[ROOT] inject reverse shell into the job -> initctl start test
1. Nmap reconnaissance
Before running a heavy scan with version detection and scripts, it's worth quickly finding which ports are open, to avoid scanning all 65535 with -sC -sV (much slower):
sudo nmap -p- --min-rate=10000 -oA allports 10.10.10.229 -v
-p- sweeps all 65535 TCP ports; --min-rate=10000 forces a high send rate (more false negatives on high-latency networks, but works fine on HTB); -oA saves the output in all three formats with the given prefix.
With the list of open ports (22, 80, 3306), we run a detailed scan against just those:
sudo nmap -sC -sV -Pn -T4 -p22,80,3306 10.10.10.229 -oN nmap_detailed.txt
| Port | Service | Detail |
|---|---|---|
| 22 | SSH | OpenSSH |
| 80 | HTTP | Web server |
| 3306 | MySQL | Database, restricted access |
Without credentials yet for either SSH or MySQL, the entry vector can only be port 80.
Resumen ejecutivo — Spectra es un Easy curioso porque no corre un Linux estandar sino ChromiumOS. Un directory listing olvidado en
/testing/exponewp-config.php.save, un backup residual con las credenciales de la base de datos. Esas credenciales no sirven contra MySQL en remoto (el servidor restringe el host de origen), pero el administrador las reutiliza como contraseña de su cuenta de WordPress: entramos al panel y editamos la plantilla404.phpde un tema inactivo para conseguir RCE. Con LinPEAS encontramos un fichero de autologin propio de ChromiumOS con la contraseña dekatieen texto plano (SSH, user.txt). katie puede ejecutar/sbin/initctlpor sudo —el gestor de trabajos de Upstart, que no aparece en GTFOBins— y el job de prueba/etc/init/test.confes editable: inyectamos un payload que se ejecuta como root. Recorrido wp-config.save -> WP RCE -> autologin -> katie -> initctl -> root.
| Plataforma | Hack The Box |
| Sistema operativo | Linux (ChromiumOS) |
| Dificultad | Easy |
| Estado | Retired |
| IP objetivo | 10.10.10.229 |
Mapa del ataque
[80] /testing/ con directory listing -> wp-config.php.save (creds de la BD)
| la BD no acepta conexiones remotas, pero el admin reutiliza esa
| password en WordPress
v
[WP admin] editar 404.php de un tema inactivo -> reverse shell (www-data)
| ChromiumOS (no Linux estandar) -> LinPEAS -> fichero passwd de
| autologin en texto plano -> password de katie
v
[SSH] katie (user.txt)
| sudo NOPASSWD /sbin/initctl (Upstart, no esta en GTFOBins) ->
| job /etc/init/test.conf editable
v
[ROOT] inyectar reverse shell en el job -> initctl start test
1. Reconocimiento con Nmap
Antes de lanzar un escaneo pesado con deteccion de versiones y scripts conviene identificar rapido que puertos estan abiertos, para no perder tiempo escaneando los 65535 con -sC -sV (mucho mas lento):
sudo nmap -p- --min-rate=10000 -oA allports 10.10.10.229 -v
-p- recorre los 65535 puertos TCP; --min-rate=10000 fuerza un ritmo de envio alto (mas falsos negativos en redes con latencia, pero en HTB funciona bien); -oA guarda la salida en los tres formatos con el prefijo indicado.
Con la lista de puertos abiertos (22, 80 y 3306), lanzamos el escaneo detallado solo sobre esos:
sudo nmap -sC -sV -Pn -T4 -p22,80,3306 10.10.10.229 -oN nmap_detailed.txt
| Puerto | Servicio | Detalle |
|---|---|---|
| 22 | SSH | OpenSSH |
| 80 | HTTP | Servidor web |
| 3306 | MySQL | Base de datos, acceso restringido |
Sin credenciales todavia ni para SSH ni para MySQL, el vector de entrada solo puede ser el puerto 80.
This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.
See Root Access plansNo account? Create one free then upgrade from your console.
Este contenido es solo para Root Access. Todo lo demás del sitio — el nivel gratuito, toda la biblioteca pública — sigue abierto.
Ver planes de Root Access¿Sin cuenta? Crea una gratis y luego mejora desde tu consola.