Turns out a patch Microsoft issued in February to address a previous — but improper — fix released last August for a security flaw in its Remote Desktop Protocol (RDP) doesn't fully do the job either.
As a result, attackers can still take advantage of the original underlying issue to access sensitive information on a system, modify critical files, steal password files, expose source code of Web applications, and carry out other malicious tasks.
Check Point, which uncovered the original vulnerability and also the problems in the two patches that Microsoft issued to address the flaw, on Thursday urged software developers and security researchers to be aware of the issue and ensure their own software projects are manually patched.
According to the company, while the February patch addresses the vulnerability in the RDP client itself, it does not fix the problem in an associated application programming interface (API) that triggered the problem in the first place. The security vendor said it had contacted Microsoft about the problem after analyzing the company's second patch, but it had not received any comment from the company.
"IT staff in large enterprises that use Windows should install Microsoft's February Patch (CVE 2020-0655) to make sure their RDP client is protected," Check Point said in a statement. Developers, meanwhile, need to understand that all programs that include the API function in question are still vulnerable to a path-traversal attack.
"We want developers to be aware of this threat, so that they could go over their programs and manually apply a patch against it," the security vendor noted.
The original bugs in RDP that Check Point first disclosed at Black Hat USA 2019 basically gave attackers a way to carry out what the security vendor described as a reverse RDP attack. RDP essentially gives Windows administrators and even individual users a way to connect to and control another Windows computer remotely for various legitimate and often used reasons. In a typical scenario, an RDP client system would connect with and control an RDP server. Check Point found the vulnerabilities could be used to reverse the flow so the RDP server controlled the RDP client, setting the scene for all sorts of mayhem.
If at First You Don't Succeed …
When Microsoft issued a patch for the issue (CVE-2019-0887), Check Point researchers found they could bypass the fix and re-create the reverse RDP situation all over again. This prompted Microsoft to issue a second fix for the problem as part of the company's monthly patch updates in February. Check Point discovered that while the second patch worked as advertised in mitigating the RDP reversal issue, it still left open the possibility for attackers to "traverse" the directories on a victim system and to access, read, and manipulate files to which they shouldn't normally have access.
The issue had to do with an API that Microsoft recommends, ironically enough, as a best practice for preventing path traversal, according to Check Point.
"In secure coding practices, when encountering a path to a file given by the user, the developer needs to make sure that path … is represented in a single way in order to validate that it refers to an allowed location," says Omri Herscovici, vulnerability research team leader at Check Point.
Windows developers do that by using a Microsoft recommended API called "PathCchCanonicalize." "We discovered that the Windows function "PathCchCanonicalize" can be easily bypassed when an attacker is using '/' instead of '\' when writing a path," Herscovici says.
Microsoft's failure to address this issue is what now gives threat actors an avenue for carrying out path-traversal attacks.
"In CVE-2019-0887, Microsoft tried to solve the path traversal with PathCchCanonicalize without realizing it can be bypassed," Herscovici notes. "In CVE-2020-0655, Microsoft addressed the '\' issue independently in the RDP handling code, without fixing the PathCchCanonicalize function."
Microsoft has so far not offered any reason why it hasn't fixed this issue though Check Point notified the vendor of it, he says.
In an emailed statement, a Microsoft spokeswoman said the update the company released in February resolved the issue in Remote Desktop Services. "We are looking into additional claims and will take appropriate action as needed to help keep customers protected," the statement said.
- RDP Bug Takes New Approach to Host Compromise
- Researchers Use Microsoft Terminal Services Client in New Attack Method
- Microsoft Patches Wormable RCE Vulns in Remote Desktop Services
- New Vulnerabilities Make RDP Risks Far from Remote
A listing of free products and services compiled for Dark Reading by Omdia analysts to help meet the challenges of COVID-19.