Alert
Executive summary — Alert is an Easy Linux box with an elegant, very instructive web chain. A Markdown Viewer lets you upload
.mdfiles and share them; the viewer renders the Markdown without sanitising the resulting HTML, so a stored XSS fires when the administrator opens the link we send through the site's contact form. With that XSS we abuse an LFI inmessages.php?file=to read the.htpasswdof a hidden vhost protected with basic auth (statistics.alert.htb, found by subdomain fuzzing); we crackalbert's md5crypt hash with rockyou and SSH in. For the escalation,linpeasreveals that root runs a PHP development server on127.0.0.1:8080over/opt/website-monitor, whoseconfigdirectory is group-writable bymanagement(whichalbertbelongs to): we drop a PHP reverse shell there, trigger it through an SSH tunnel, and land a shell as root. Path: vhost fuzzing → stored XSS → LFI → md5crypt → SSH → root's local PHP server with a writable config directory.
| Platform | Hack The Box |
| Operating system | Linux |
| Difficulty | Easy |
| Status | Retired |
| Target IP | 10.129.231.188 |
Attack map
[80] Markdown Viewer → vhost fuzzing reveals statistics.alert.htb (basic auth)
│ uploading a .md with <script> → stored XSS, fires when the admin opens the shared link
▼
[LFI] messages.php?file=../../.. → exfiltrates the statistics vhost .htpasswd
│ albert : $apr1$... (md5crypt) → cracked with rockyou → manchesterunited
▼
[SSH] albert (user.txt)
│ root serves PHP on 127.0.0.1:8080 over /opt/website-monitor; config/ is group-writable (management)
▼
[ROOT] reverse shell via shell.php in config/ + SSH -L tunnel → root.txt
1. Reconnaissance
Before touching anything, we map what's exposed. A full
nmapscan avoids surprises later on (e.g. a third port that only shows up when scanning everything).
nmap -sC -sV -oN nmap.txt 10.129.231.188
22/tcp open ssh OpenSSH 8.2p1 Ubuntu
80/tcp open http Apache httpd 2.4.41 (Ubuntu)
Port 80 serves a Markdown Viewer: an app that lets you upload .md files, render them as HTML and share the result via a link.
Resumen ejecutivo — Alert es un Linux Easy con una cadena web elegante y muy didáctica. Un Markdown Viewer permite subir
.mdy compartirlos; el visor renderiza el Markdown sin sanear el HTML resultante, así que un XSS almacenado se dispara cuando el administrador abre el enlace que le enviamos por el formulario de contacto. Con ese XSS abusamos de un LFI enmessages.php?file=para leer el.htpasswdde un vhost oculto y protegido con autenticación básica (statistics.alert.htb, descubierto por fuzzing de subdominios); crackeamos el hash md5crypt dealbertcon rockyou y entramos por SSH. Para la escalada,linpeasrevela que root sirve un servidor PHP de desarrollo en127.0.0.1:8080sobre/opt/website-monitor, cuyo directorioconfiges escribible por el grupomanagement(al que pertenecealbert): soltamos ahí una reverse shell PHP, la disparamos a través de un túnel SSH y obtenemos una shell como root. Recorrido: vhost fuzzing → XSS almacenado → LFI → md5crypt → SSH → PHP local de root con directorio de configuración escribible.
| Plataforma | Hack The Box |
| Sistema operativo | Linux |
| Dificultad | Easy |
| Estado | Retired |
| IP objetivo | 10.129.231.188 |
Mapa del ataque
[80] Markdown Viewer → fuzzing de vhosts revela statistics.alert.htb (auth basica)
│ subida de un .md con <script> → XSS almacenado, se dispara cuando el admin abre el enlace compartido
▼
[LFI] messages.php?file=../../.. → exfiltra .htpasswd del vhost statistics
│ albert : $apr1$... (md5crypt) → crack con rockyou → manchesterunited
▼
[SSH] albert (user.txt)
│ root sirve PHP en 127.0.0.1:8080 sobre /opt/website-monitor; config/ escribible por el grupo management
▼
[ROOT] reverse shell vía shell.php en config/ + tunel SSH -L → root.txt
1. Reconocimiento
Antes de tocar nada, mapeamos qué hay expuesto. Un
nmapcompleto evita sorpresas más adelante (p. ej. un tercer puerto que solo aparece con todos los escaneados).
nmap -sC -sV -oN nmap.txt 10.129.231.188
22/tcp open ssh OpenSSH 8.2p1 Ubuntu
80/tcp open http Apache httpd 2.4.41 (Ubuntu)
El puerto 80 sirve un Markdown Viewer: una app que permite subir ficheros .md, renderizarlos como HTML y compartir el resultado por enlace.
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.