Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Network Security

// // //
1/28/2020
12:15 PM
Larry Loeb
Larry Loeb
Larry Loeb

RDG Gets Fooled by UDP

Security researchers have found that the implementation in Remote Desktop Gateway of string segmentation lays it open to memory corruption vulnerabilities.

Remote Desktop Gateway (RDG) (which has also been called Terminal Services Gateway) is a Windows Server component that provides address routing for Remote Desktop (RDP). Users connect and authenticate to the gateway instead of directly to an RDP server. RDG will forward remote RDP traffic to an address that is specified by the user. The idea here is that the exposed-to-the-Internet RDG provides much less of an attack surface than the RDP server itself.

But security researchers have found that the implementation in RDG of string segmentation lays it open to memory corruption vulnerabilities. This means that a remote, unauthenticated attacker can execute arbitrary code by sending specially crafted requests that will invoke segmentation in a particular way.

The vulnerabilities affect Windows Server 2012, 2016 and 2019. MSFT has since patched them, but -- as always -- the patches may not end up universally applied.

Marcus Hutchins took a look at the evolving situation from a technical standpoint in the Kryptos Logic blog.

While RDG supports three different protocols (HTTP, HTTPS, and UDP), he saw that only one protocol had been changed by the MSFT patches. It was UDP, and CVE-2020-0609 was involved.

The RDG UDP protocol is there to allow for large messages to be split across multiple separate UDP packets. They have to be reassembled when they arrive at the target, since they may arrive out of order. It's in the re-assembler that RDG can get fooled and where the vulnerability lives.

Hutchins says: "This vulnerability is much more flexible than a typical linear heap overflow. It allows us to not only control the size of the data written, but the offset to where it's written. With the extra control, it's easier to do more precise writes, avoiding unnecessarily data corruption."

A rifle, not a cannon then.

Combined with the handling of arrays in the packet handler (CVE-2020-0610), an attacker will find fertile ground for exploits in the unpatched server.

Hutchins decided to help the vulnerable by developing and publishing the source code for an RDG scanner. This open-sourced scanner will look for vulnerable RDG gateways on a network and report back.

Mitigating the threat of an unpatched server can be simpler and more direct than might be apparent. Since only UDP is involved in both of the vulnerabilities, stopping the UDP traffic by disabling it should stop the vulnerability's effect as well.

Alternatively, firewalling the UDP port (usually port 3391) may serve the same mitigation function.

— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
Edge-DRsplash-10-edge-articles
I Smell a RAT! New Cybersecurity Threats for the Crypto Industry
David Trepp, Partner, IT Assurance with accounting and advisory firm BPM LLP,  7/9/2021
News
Attacks on Kaseya Servers Led to Ransomware in Less Than 2 Hours
Robert Lemos, Contributing Writer,  7/7/2021
Commentary
It's in the Game (but It Shouldn't Be)
Tal Memran, Cybersecurity Expert, CYE,  7/9/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
Black Hat USA 2022 Attendee Report
Black Hat attendees are not sleeping well. Between concerns about attacks against cloud services, ransomware, and the growing risks to the global supply chain, these security pros have a lot to be worried about. Read our 2022 report to hear what they're concerned about now.
Flash Poll
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2022-35942
PUBLISHED: 2022-08-12
Improper input validation on the `contains` LoopBack filter may allow for arbitrary SQL injection. When the extended filter property `contains` is permitted to be interpreted by the Postgres connector, it is possible to inject arbitrary SQL which may affect the confidentiality and integrity of data ...
CVE-2022-35949
PUBLISHED: 2022-08-12
undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to SSRF (Server-side Request Forgery) when an application takes in **user input** into the `path/pathname` option of `undici.request`. If a user specifies a URL such as `http://127.0.0.1` or `//127.0.0.1` ```js con...
CVE-2022-35953
PUBLISHED: 2022-08-12
BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next. Some links in BookWyrm may be vulnerable to tabnabbing, a form of phishing that gives attackers an opportunity to redirect a user to a malicious site. The issue was patche...
CVE-2022-35956
PUBLISHED: 2022-08-12
This Rails gem adds two methods to the ActiveRecord::Base class that allow you to update many records on a single database hit, using a case sql statement for it. Before version 0.1.3 `update_by_case` gem used custom sql strings, and it was not sanitized, making it vulnerable to sql injection. Upgra...
CVE-2022-35943
PUBLISHED: 2022-08-12
Shield is an authentication and authorization framework for CodeIgniter 4. This vulnerability may allow [SameSite Attackers](https://canitakeyoursubdomain.name/) to bypass the [CodeIgniter4 CSRF protection](https://codeigniter4.github.io/userguide/libraries/security.html) mechanism with CodeIgniter ...