Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
BlueGate-CVE-2020-0609 — BlueGate Exploit validator - RD Gateway validator for CVE-2020-0609 and CVE-2020-0610 (BlueGate) using OpenSSL DTLS over UDP/3391. | Kitploit
Tools/GitHubGitHub/bhanunamikaze/bluegate-cve-2020-0609
Vulnerability ScannersVulnerability AnalysisExploitationNetwork SecurityPenetration Testing
GitHubbhanunamikaze/bluegate-cve-2020-0609

BlueGate-CVE-2020-0609

BlueGate Exploit validator - RD Gateway validator for CVE-2020-0609 and CVE-2020-0610 (BlueGate) using OpenSSL DTLS over UDP/3391.

View Repository
13h 45m agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

RD Gateway BlueGate Validator

CVE-2020-0609 / CVE-2020-0610 Remote Validation Tool

A small check-only Python utility for remotely validating the patch behavior associated with the Microsoft Remote Desktop Gateway vulnerabilities:

  • CVE-2020-0609
  • CVE-2020-0610

The vulnerabilities, commonly associated with the BlueGate research, affect Microsoft Remote Desktop Gateway (RD Gateway) and can potentially allow an unauthenticated remote attacker to execute arbitrary code on an unpatched server.

This utility does not implement remote code execution, denial of service, persistence, or payload delivery.

It performs a single protocol-level validation request and evaluates the RD Gateway response.


Vulnerability Summary

PropertyDetails
CVEsCVE-2020-0609, CVE-2020-0610
ComponentMicrosoft Remote Desktop Gateway
Vulnerability TypeRemote Code Execution
Authentication RequiredNo
User InteractionNo
Attack VectorNetwork
SeverityCritical
CVSS v3.19.8
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary ProtocolRD Gateway UDP transport
Default UDP Port3391/UDP
Public NameBlueGate

Affected Windows Server families include:

root@kitploit:~
Windows Server 2012
Windows Server 2012 R2
Windows Server 2016
Windows Server 2019

Systems that have installed Microsoft's January 2020 security updates or later cumulative updates should contain the relevant fixes.


Why UDP/3391 Instead of HTTPS/443?

An RD Gateway deployment can expose multiple related services.

For example:

root@kitploit:~
                  Microsoft RD Gateway
                         |
            +------------+------------+
            |                         |
        TCP/443                     UDP/3391
            |                         |
      HTTPS / RDWeb             RD Gateway UDP
      RPC-over-HTTPS             DTLS transport

The RDWeb portal may be visible through a browser at:

root@kitploit:~
https://gateway.example/RDWeb/

and RD Gateway functionality may also be exposed through TCP/443.

However, the attack surface tested by this BlueGate-style validator is the RD Gateway UDP transport, normally listening on:

root@kitploit:~
UDP/3391

The scanner therefore uses DTLS over UDP/3391, not HTTPS over TCP/443.

Changing the script to port 443 would mean testing:

root@kitploit:~
UDP/443

which is not the same thing as:

root@kitploit:~
TCP/443

Confirming the RD Gateway UDP Service

Before running the vulnerability validator, UDP/3391 can be checked with Nmap:

root@kitploit:~
nmap -Pn -sU -p3391 --reason <TARGET>

Example:

root@kitploit:~
PORT     STATE SERVICE
3391/udp open  savant

The savant service label is simply Nmap's port-name mapping and does not necessarily identify the actual service.

The RD Gateway DTLS service can be confirmed more reliably with OpenSSL.

DTLS 1.0

root@kitploit:~
openssl s_client \
    -dtls1 \
    -connect <TARGET>:3391 \
    -state

DTLS 1.2

root@kitploit:~
openssl s_client \
    -dtls1_2 \
    -connect <TARGET>:3391 \
    -state

A successful handshake confirms that a DTLS service is responding on UDP/3391.

Typical successful output includes:

root@kitploit:~
SSL handshake has read ...
New, SSLv3, Cipher is ...
Protocol: DTLSv1

or:

root@kitploit:~
Protocol: DTLSv1.2

What This Tool Does

The validator:

  1. Starts an OpenSSL DTLS client.
  2. Connects to the target RD Gateway over UDP/3391.
  3. Waits for the DTLS handshake to complete.
  4. Sends a single BlueGate-style fragmentation validation packet.
  5. Waits for the RD Gateway application response.
  6. Extracts the final status DWORD from a 16-byte response.
  7. Classifies the response.

No authentication credentials are required for the validation.

The utility intentionally contains:

root@kitploit:~
NO reverse shell
NO command execution
NO exploit payload
NO denial-of-service loop
NO repeated malformed packet transmission

Requirements

Tested with:

root@kitploit:~
Python 3
OpenSSL command-line client
Linux

Verify OpenSSL:

root@kitploit:~
openssl version

Verify Python:

root@kitploit:~
python3 --version

No Python OpenSSL module is required because the script launches the system openssl s_client implementation.

This avoids compatibility problems encountered by older BlueGate implementations that relied on deprecated Python/OpenSSL APIs such as:

root@kitploit:~
DTLSv1_client_method

Usage

Basic scan:

root@kitploit:~
python3 BlueGate.py <TARGET>

Example:

root@kitploit:~
python3 BlueGate.py 192.0.2.10

The default destination is:

root@kitploit:~
UDP/3391

Specify Port

root@kitploit:~
python3 BlueGate.py \
    -P 3391 \
    192.0.2.10

DTLS 1.0

root@kitploit:~
python3 BlueGate.py \
    --dtls 1 \
    192.0.2.10

DTLS 1.2

root@kitploit:~
python3 BlueGate.py \
    --dtls 1.2 \
    192.0.2.10

Testing both can be useful:

root@kitploit:~
python3 BlueGate.py --dtls 1 192.0.2.10

python3 BlueGate.py --dtls 1.2 192.0.2.10

Patched Example

Example result from a patched RD Gateway:

root@kitploit:~
[*] Target: 192.0.2.10:3391/udp
[*] DTLS mode: 1.2
[*] Starting OpenSSL DTLS client...
[+] DTLS handshake completed.
[*] Probe (11 bytes): 0500070000004100010041
[*] Sending one validation packet...

[*] Response length: 16
[*] Response hex: 02000c0000000000ffffffffffff0080
[*] Status: 0x8000ffff

[+] PATCHED SIGNATURE RECEIVED
    Server returned 0x8000ffff, which is
    the rejection value used by the public
    CVE detector to identify a patched host.

The same patched response may also be returned over DTLS 1.0:

root@kitploit:~
Response length: 16
Response hex: 02000c0000000000ffffffffffff0080
Status: 0x8000ffff

Understanding the Result

0x8000ffff

A response ending with:

root@kitploit:~
0x8000ffff

is the rejection value used by public BlueGate/RD Gateway scanners to identify the malformed fragmentation condition as rejected.

The tool therefore reports:

root@kitploit:~
PATCHED SIGNATURE RECEIVED

This provides strong protocol-level evidence that the particular condition tested for CVE-2020-0609/CVE-2020-0610 is not exploitable using the known public detection technique.


Different 16-byte Status

If a 16-byte RD Gateway response is received but the final DWORD is something other than:

root@kitploit:~
0x8000ffff

the tool reports:

root@kitploit:~
DETECTOR POSITIVE

This should be treated as:

root@kitploit:~
Potentially Vulnerable

rather than immediate proof of successful remote code execution.

The result should preferably be corroborated using:

root@kitploit:~
Windows build information
Installed KB information
Microsoft patch inventory
Credentialed vulnerability scanning

before reporting the vulnerability as definitively exploitable.


No Response

If no application response is received:

root@kitploit:~
INCONCLUSIVE

The tool deliberately does not classify a timeout as vulnerable.

A timeout could be caused by:

  • firewall behavior
  • UDP packet loss
  • DTLS incompatibility
  • network filtering
  • application behavior
  • service configuration

Therefore:

root@kitploit:~
No response != Vulnerable

Detection Logic

The public BlueGate/RDG detection approach uses an RD Gateway fragmentation packet containing an unusual fragment count.

Conceptually:

root@kitploit:~
DTLS connection
      |
      v
+-----------------------+
| RD Gateway UDP parser |
+-----------------------+
      |
      | fragmentation validation packet
      v
+-----------------------+
| Fragment validation   |
+-----------------------+
      |
      +---- patched ----> rejection
      |                   0x8000ffff
      |
      +---- unexpected --> requires investigation

The validation packet used by this utility is sent only once.


Legal Disclaimer

This project is intended exclusively for:

  • authorized penetration testing
  • vulnerability validation
  • defensive security research
  • lab environments
  • educational security research

Only test systems for which you have explicit authorization.

The author assumes no responsibility for misuse, unauthorized access, service disruption, data loss, or other consequences resulting from use or modification of this software.


Credits

The detection methodology is based on publicly documented research into the Microsoft RD Gateway vulnerabilities CVE-2020-0609 and CVE-2020-0610, including the work performed by the BlueGate and RD Gateway security research community.

This project primarily modernizes the validation workflow by using the system OpenSSL DTLS implementation rather than deprecated pyOpenSSL DTLS internals.

Download Tool