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 | <TARGET_IP> |
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 <TARGET_IP>
sudo nmap -p53,80,88,135,139,389,445,464,593,636,3268,9389 -sCV -Pn -oN nmap-services.txt <TARGET_IP>
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 "<TARGET_IP> 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://<TARGET_IP>/ -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.
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.