Microsoft included a fix for a serious RDP remote code execution vulnerability known as BlueKeep in the May patch Tuesday update.
The vulnerability, which has become known as BlueKeep or CVE-2019-0708, remains unpatched on millions of internet connected systems. It affects all Windows-NT based operating systems ranging from Windows 2000 and Windows XP up to Windows Server 2008 R2.
According to Microsoft’s Director of Incident Response Simon Pope:
This vulnerability is pre-authentication and requires no user interaction. In other words, the vulnerability is ‘wormable’, meaning that any future malware that exploits this vulnerability could propagate from vulnerable computer to vulnerable computer in a similar way as the WannaCry malware spread across the globe in 2017.
The BlueKeep vulnerability exists because the RDP protocol performs significant processing before the client is required to authenticate to the server. The RDP protocol manages the data exchange between the client and the server over 32 virtual channels. The protocol exchanges initialisation data over a pre-determined virtual connection named “MS_T120” which is bound to virtual channel 31. If a malicious client forms a connection to MS_T120 on any channel other than 31, it causes a heap memory corruption in the RDP driver which can then be leveraged to force a remote code execution.
A detailed explanation is available on the McAfee blog.
How to protect your network against BlueKeep
Consider these mitigation steps:
- Apply the patches from Microsoft as soon as possible
- It is good practice to reduce the attack surface of your servers by disabling any services which are not required. If RDP is not needed, turn it off by disabling the service on the server
- Block port 3389 on your internet firewall to prevent external access or only allow access through a VPN
Your routine vulnerability scans should identify unpatched systems on your network which are vulnerable (you do run automated vulnerability scans at least once a month don’t you?). However, for additional reassurance, you can make use of the RDPscan tool which will check a given IP address range for vulnerable systems.
This free tool is available for download from security researcher Robert Graham’s GitHub account.