Flight
Executive summary — Flight is a chain built on lateral movement via NTLM hash theft and password reuse, finished off with a privilege escalation through service token abuse. An LFI on a secondary vhost (
school.flight.htb) turns into credential theft by forcing a UNC path to an attacker-controlled SMB server: Windows authenticates on its own, handing over thesvc_apachehash. That password, reused byS.Moon, grants write access on a share that allows planting a maliciousdesktop.ini— another forced authentication, this time leakingC.Bum's hash. With C.Bum's credentials a PHP webshell goes up on Apache's docroot (RCE assvc_apache, user.txt), followed by an.aspxdropped into the docroot of a second, internal site running under the IIS AppPool identity — whose SeImpersonatePrivilege is exploited with GodPotato up to SYSTEM. The whole final stretch is a race against the box's own cleanup script, which deletes uploaded webshells and binaries within roughly a minute.
| Platform | Hack The Box |
| Operating system | Windows Server 2019 (Build 17763) — Domain Controller for flight.htb |
| Difficulty | Hard |
| Status | Retired |
| Target IP | 10.129.228.120 |
Attack map
[80/HTTP] school.flight.htb -- LFI (view=) -> forced UNC path
| Responder captures svc_apache NTLMv2 hash -> rockyou -> S@Ss!K@*t13
v
[SMB] svc_apache -- share/user enumeration -> password spray
| reused password -> S.Moon (WRITE on \\Shared)
v
[SMB] malicious desktop.ini on \\Shared -- forced authentication
| C.Bum NTLMv2 hash -> rockyou -> Tikkycoll_431012284
v
[SMB] C.Bum -- WRITE on \\Web (C:\xampp\htdocs)
| PHP webshell -> RCE as svc_apache -> user.txt (via \\Users)
v
[HTTP :8000] internal site C:\inetpub\development -- C.Bum WRITE
| .aspx (via RunasCs) -> RCE as iis apppool\defaultapppool
v
[SeImpersonate] GodPotato -> SYSTEM -> root.txt
1. Reconnaissance
A ttl=127 on ICMP/TCP responses points to Windows. Full port scan followed by a targeted one with version detection and scripts:
sudo nmap -p- --min-rate 3000 -T4 -Pn -oN nmap-allports.txt 10.129.228.120
sudo nmap -p53,80,88,135,139,389,445,464,593,636,3268,9389 -sCV -Pn -oN nmap-services.txt 10.129.228.120
The port set (53, 88, 389, 445, 464, 636, 3268, 9389) is the textbook fingerprint of an Active Directory Domain Controller (flight.htb). What stands out is 80/HTTP: it serves Apache/PHP 8.1.1 on XAMPP, out of place on a DC and, precisely for that reason, the real attack surface. There's no exposed 5985 (WinRM) and no 443. A +7h clock skew was noted but turned out irrelevant to the solve.
echo "10.129.228.120 flight.htb g0.flight.htb school.flight.htb G0" | sudo tee -a /etc/hosts
SMB rejects a null session (STATUS_ACCESS_DENIED) and the guest account is disabled — the DC requires real authentication, so the web app is the only unauthenticated way in. A response-length vhost fuzz reveals a second site:
ffuf -u http://10.129.228.120/ -H "Host: FUZZ.flight.htb" \
-w subdomains-top1million-5000.txt -mc all -fs 7069
# school
Methodology note: filtering out the fuzzer's noise by response size (
-fs 7069,flight.htb's default "not found" response) is what letsschoolstand out among hundreds of misses.
Resumen ejecutivo — Flight es una cadena de movimiento lateral por robo de hashes NTLM y reutilización de contraseñas, rematada con una escalada de privilegios por abuso de token de servicio. Un LFI en un vhost secundario (
school.flight.htb) se convierte en robo de credenciales al forzar una ruta UNC hacia un servidor SMB propio: Windows se autentica solo, entregando el hash desvc_apache. Esa contraseña, reutilizada porS.Moon, da escritura en un share que permite plantar undesktop.inimalicioso — otra autenticación forzada, esta vez con el hash deC.Bum. Con las credenciales de C.Bum se sube una webshell PHP al docroot de Apache (RCE comosvc_apache, user.txt) y, después, un.aspxal docroot de un segundo sitio interno que corre bajo el AppPool de IIS — cuyo SeImpersonatePrivilege se explota con GodPotato hasta SYSTEM. Todo el tramo final se libra contra un script de limpieza de la propia máquina que borra webshells y binarios subidos en cuestión de un minuto.
| Plataforma | Hack The Box |
| Sistema operativo | Windows Server 2019 (Build 17763) — Domain Controller de flight.htb |
| Dificultad | Hard |
| Estado | Retired |
| IP objetivo | 10.129.228.120 |
Mapa del ataque
[80/HTTP] school.flight.htb -- LFI (view=) -> ruta UNC forzada
| Responder captura hash NTLMv2 de svc_apache -> rockyou -> S@Ss!K@*t13
v
[SMB] svc_apache -- enumeracion de shares/usuarios -> password spray
| contrasena reutilizada -> S.Moon (WRITE en \\Shared)
v
[SMB] desktop.ini malicioso en \\Shared -- forced authentication
| hash NTLMv2 de C.Bum -> rockyou -> Tikkycoll_431012284
v
[SMB] C.Bum -- WRITE en \\Web (C:\xampp\htdocs)
| webshell PHP -> RCE como svc_apache -> user.txt (via \\Users)
v
[HTTP :8000] sitio interno C:\inetpub\development -- C.Bum WRITE
| .aspx (via RunasCs) -> RCE como iis apppool\defaultapppool
v
[SeImpersonate] GodPotato -> SYSTEM -> root.txt
1. Reconocimiento
Un ttl=127 en las respuestas ICMP/TCP apunta a Windows. Escaneo completo seguido de uno dirigido con detección de versión y scripts:
sudo nmap -p- --min-rate 3000 -T4 -Pn -oN nmap-allports.txt 10.129.228.120
sudo nmap -p53,80,88,135,139,389,445,464,593,636,3268,9389 -sCV -Pn -oN nmap-services.txt 10.129.228.120
El conjunto de puertos (53, 88, 389, 445, 464, 636, 3268, 9389) es la huella clásica de un Domain Controller de Active Directory (flight.htb). Lo llamativo es el 80/HTTP: sirve Apache/PHP 8.1.1 sobre XAMPP, algo fuera de lugar en un DC y, precisamente por eso, la superficie de ataque real. No hay 5985 (WinRM) expuesto ni 443. Se anotó un desfase de reloj de +7h que no resultó relevante para la resolución.
echo "10.129.228.120 flight.htb g0.flight.htb school.flight.htb G0" | sudo tee -a /etc/hosts
SMB rechaza sesión nula (STATUS_ACCESS_DENIED) y la cuenta guest está deshabilitada — el DC exige autenticación real, así que la web es la única puerta de entrada disponible sin credenciales. Un fuzzing de vhosts por longitud de respuesta revela un segundo sitio:
ffuf -u http://10.129.228.120/ -H "Host: FUZZ.flight.htb" \
-w subdomains-top1million-5000.txt -mc all -fs 7069
# school
Detalle de metodología: descartar el ruido del fuzzer por tamaño de respuesta (
-fs 7069, la respuesta "no existe" por defecto deflight.htb) es lo que deja verschoolentre cientos de intentos fallidos.
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.