Windows 10 security: Microsoft dismissed RDP flaw until it saw Hyper-V was affected

Microsoft details a nasty and apparently completely unexpected side-effect of using RDP in its Hyper-V virtualization software.

Microsoft just dumped password expirations and other companies should too

Microsoft recently reversed a decision not to patch a flaw in its Remote Desktop Protocol (RDP) client after realizing the same flaw could be used to target its Hyper-V virtualization software in Windows 10 and Azure.   

Special feature

Special report: IT Jobs in 2020: A leader's guide (free PDF)

ZDNet and TechRepublic looks at the dramatic effect of AI, big data, cloud computing, and automation on IT jobs, and how companies can adapt.

Read More

Last October, Check Point researcher Eyal Itkin informed Microsoft of a flaw in its RDP client but was told his finding "is valid but does not meet our bar for servicing", so it didn't warrant a patch. 

However, Microsoft recently reversed its decision and released a patch for the remote code execution bug CVE-2019-0887 in July, which corrects "how Remote Desktop Services handles clipboard redirection".

SEE: Cloud v. data center decision (ZDNet special report) | Download the report as a PDF (TechRepublic)

The patch came after Itkin discovered an attacker could use the flaw in Microsoft's RDP client for a sandbox escape or a "guest-to-host" virtual machine (VM) escape in Microsoft's Hyper-V Manager. 

Microsoft security software engineer Dana Baril and Itkin detail the connection between the RDP client and Hyper-V in an aptly titled presentation at Black Hat on Wednesday, called 'He Said, She Said – Poisoned RDP Offense and Defense'. The presentation covers a design flaw Hyper-V inherited from the RDP client. Check Point has also posted a blog explaining the connection

The connection is found in Microsoft's use of RDP in Hyper-V 'Enhanced Sessions', which is on by default, and is designed to improve the experience when viewing virtual machines. Enhanced Sessions enables extra capabilities including sharing clipboard data between a guest and the host. 

Itkin's earlier research probed multiple RDP clients to find out if an RDP server can gain control over a computer it's connected to via the RDP client. Normally, an RDP client can gain access to a remote server and, by using its clipboard-sharing feature, enable users to copy and paste files to another computer. 

But Itkin found a path-traversal vulnerability in Microsoft's RDP that allowed a malicious RDP server to send arbitrary files to a client and take it over through the clipboard-sharing feature. 

Leading up to Microsoft's July patch, he found the RDP flaw worked in precisely the same way in the Hyper-V GUI.

"It turns out that RDP is used behind the scenes as the control plane for Hyper-V," Itkin explains. "Instead of reimplementing screen-sharing, remote keyboard and synchronized clipboard features, Microsoft decided that all these features are already implemented as part of RDP, so why not use it in this case as well?"  

As the pair detail in a whitepaper, Microsoft designed clipboards to be used locally, and so that data should only be transferred to or from it in response to a user command. However, the assumptions this model makes about trust breaks down in an environment where machines share features. 

"Our research revealed this important design lesson, that when a feature was developed under certain circumstances, when the environment changes, features must be reconsidered," the pair write. 

Microsoft has also detailed some of the cloud-based methods it developed for the Microsoft Defender Advanced Threat Protection service for detecting when an attacker exploits this vulnerability.