
Reproducible lab for CVE-2020-0610 (BlueGate) - Windows RD Gateway UDP/DTLS remote code execution vulnerability. Includes PowerShell scripts, setup guide, and nuclei template validation examples.
Nuclei PR: https://github.com/projectdiscovery/nuclei-templates/pull/13076
A comprehensive reproducible laboratory environment for CVE-2020-0610 (BlueGate), a critical pre-authentication remote code execution vulnerability in Microsoft Windows Remote Desktop Gateway (RD Gateway). This lab enables security researchers to safely test and validate the vulnerability using minimal, non-destructive DTLS handshake techniques.
CVE-2020-0610 is a critical RCE vulnerability in Windows RD Gateway that allows unauthenticated attackers to execute arbitrary code by sending specially crafted UDP packets to port 3391. The vulnerability affects:
9.8 (Critical) Network (UDP/3391) None required Complete system compromise
# Via Server Manager GUI
Server Manager → Add Roles and Features → Remote Desktop Services → RD Gateway
# Via RD Gateway Manager
RD Gateway Manager → <ServerName> → Properties → Transport Settings
→ Check "Allow users to connect by using UDP" → OK
# Run as Administrator
powershell -ExecutionPolicy Bypass -File .\scripts\add-udp-3391-firewall.ps1
# Verify RD Gateway and firewall configuration
powershell -ExecutionPolicy Bypass -File .\scripts\sanity-check.ps1
# Using Nuclei scanner
nuclei -t network/cves/2020/CVE-2020-0610.yaml \
-u <target_host> \
-var rdg_port=3391 \
-var dtls_timeout=6 \
-debug
DEBUG_HEX:
NUCLEI_RESULT:VULNERABLE
DEBUG_HEX: 160303...ffff0080
NUCLEI_RESULT:NOT_VULNERABLE
The key indicator is the presence of the ffff0080 trailer (little-endian representation of 0x8000ffff) in patched systems.
lab-rdg-bluegate/
├── README.md # This comprehensive guide
├── scripts/
│ ├── add-udp-3391-firewall.ps1 # Firewall configuration
│ └── sanity-check.ps1 # System validation
└── samples/
├── nuclei-debug-vulnerable.txt # Example vulnerable output
└── nuclei-debug-patched.txt # Example patched output
This lab was created to support the security research community. Contributions are welcome:
This laboratory environment is provided for educational and authorized security testing purposes only. Users are responsible for:
CVE-2020-0610 BlueGate RD Gateway Windows Server Remote Code Execution UDP DTLS Nuclei Security Research Vulnerability Lab Penetration Testing Red Team Blue Team Cybersecurity