Analysis of CVE-2019-0708 (BlueKeep)
The RDP service in Windows allowed a client to bind the internal MS_T120 channel a second time, creating two references to the same channel object. Closing one reference left a dangling pointer, so an attacker could trigger a use-after-free and crash the system (denial of service).
malwaretech.com
Published on malwaretech.com
Vulnerability Research
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The vulnerable code bound the internal MS_T120 channel a second time under a different ID, so two references existed to one channel object and closing one left a dangling pointer (use-after-free).
Impact
An attacker could crash the affected Windows system (denial of service); the text notes that double-free mitigations make exploitation harder but does not demonstrate remote code execution in this part.
What the attacker needed
Network access to RDP; custom RDP client
The fix
The patch adds a check so that when the channel name is MS_T120, IcaBindChannel is called with a fixed parameter (31), preventing the second binding under a different ID.
How it was found
- Diff the patched and unpatched TermDD.sys to find the changed channel-binding functions.
- Set a breakpoint on IcaBindVirtualChannels and connect with a normal RDP client to see which channels are opened.
- Capture a legitimate RDP connection to learn how channels are requested after connect.
- Implement a basic RDP client and add MS_T120 to the requested channel list.
- Send data to the MS_T120 channel to reach the internal channel handler.
- Send the data that triggers MCSCloseChannel, then disconnect to cause the double free and kernel crash.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Remote Desktop lets a client ask the server to open extra data channels. One channel, called MS_T120, is meant to be internal and is normally opened only by the server itself. The bug let a client open that same channel a second time, so the server ended up with two handles to one object; closing one left the other pointing at freed memory, and using it crashed the machine.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.