BlueKeep CVE-2019-0708 – Unauthenticated RDP RCE
BlueKeep is a use-after-free in termdd.sys triggered by binding a client-controlled virtual channel named MS_T120 — a channel the RDP server also uses internally. The resulting dangling pointer allows controlled kernel pool manipulation and arbitrary code execution without any authentication.
Affects Windows XP, 2003, Vista, 7, and Server 2008/2008 R2. Patched in May 2019 (KB4499175 for Windows 7). Appears regularly in OSCP labs and CTFs on older Windows machines. The primary public exploit is the Metasploit module, which is the most stable option available.
Warning
This may be restricted in exams such as OSCP. Verify exam rules before use.
Confirming Vulnerability
Safe detection methodology is covered in RDP Known Vulnerability Detection. The Metasploit auxiliary scanner is the standard check:
Or use the Metasploit scanner:
[+] 10.10.10.10:3389 - The target is vulnerable. The target attempted cleanup of the incorrectly-bound MS_T120 channel.
Exploitation with Metasploit
Warning
This may be restricted in exams such as OSCP. Verify exam rules before use.
The Metasploit module is rated Manual — it requires GROOMBASE to be set correctly for the target environment, otherwise it causes a BSOD instead of a shell. Automatic targeting works for basic cases but tuning improves reliability.
Target options:
0— Automatic fingerprinting (attempts to detect, unreliable)1— Windows 7 SP1 / Server 2008 R2 (VMware)2— Windows 7 SP1 / Server 2008 R2 (Hyper-V)3— Windows 7 SP1 / Server 2008 R2 (VirtualBox 6)4— Windows 7 SP1 / Server 2008 R2 (Bare metal)
If the target is a CTF/lab VM, start with VMware (1) then try VirtualBox (3) and Hyper-V (2) if you get BSODs.
Tuning GROOMBASE for Reliability
The exploit requires GROOMBASE — the Non-Paged Pool (NPP) start address for the target. An incorrect value causes a kernel crash. For lab VMs, the default values per target preset are often close enough. For bare metal or unusual configurations, extract the NPP start address from a memory dump.
Dump memory via a remote method (requires a prior low-privilege shell or WinRM access):
Or from a Meterpreter session:
Then extract the NPP start address using Rekall or Volatility:
Look for NPP Start in the output. Set it in the Metasploit module:
set GROOMBASE 0xfffffa8001800000
GROOMSIZE Tuning
GROOMSIZE controls the amount of kernel pool memory sprayed. The default is often too low for targets with more than 1GB RAM. Increase it:
Try values between 30 and 100 if the exploit runs but does not produce a shell or causes a BSOD.
Windows Server 2008 R2 Extra Requirement
Server 2008 R2 requires the following registry key to be set to 0 for the RDPSND channel to work, which the exploit uses for heap grooming:
HKLM\SYSTEM\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\fDisableCam
Set it remotely if you have another access path:
What You Get
BlueKeep executes in kernel context — the resulting shell runs as NT AUTHORITY\SYSTEM. On a standalone host this is full compromise. On a DC this means immediate domain takeover via secretsdump.
References
-
Metasploit – BlueKeep RCE Module Module source with target presetsgithub.com/rapid7/metasploit-framework/tree/master/modules/exploits/windows/rdp (opens in new tab)
GROOMBASE documentation, and payload constraints.
-
Microsoft MSRC Official advisory with affected versions and patch references.
Was this helpful?
Your feedback helps improve this page.