Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2019-0708 PoC — Microsoft Remote Desktop Services 资源管理错误漏洞

Source
Associated Vulnerability
Title:Microsoft Remote Desktop Services 资源管理错误漏洞 (CVE-2019-0708)
Description:A remote code execution vulnerability exists in Remote Desktop Services formerly known as Terminal Services when an unauthenticated attacker connects to the target system using RDP and sends specially crafted requests, aka 'Remote Desktop Services Remote Code Execution Vulnerability'.
Readme
# CVE-2019-0708-generate-hosts

本程序使用nmap扫描3389_cidrs文件里面所列的CIDR地址(每行一个),生成3389_hosts文件,里面是可能的Windows开了3389远程桌面的机器IP地址,可以极大减少接下来的检测IP量。

## 依赖

python3、nmap

## 运行

将CIDR写入3389_cidrs,运行./generate.py。生成的3389_hosts可用来联系管理员或者继续扫描操作。

deep_generate.py针对有些人更改了自己机器的3389端口到其他端口,使用nmap指纹扫描出ms-wbt-server再写入3389_hosts。由于每台机器需要扫描1-65535个端口,速度非常慢。

## 原因

360于20190522释出[CVE-2019-0708: Windows RDP远程漏洞无损检测工具下载](https://cert.360.cn/warning/detail?id=1caed77a5620fc7da993fea91c237ed5),目前已经到第二版。只能针对单个IP检测。

[https://github.com/biggerwing/CVE-2019-0708-poc](https://github.com/biggerwing/CVE-2019-0708-poc)写了个批量检测工具,在文本文件里面写一堆IP检测。为什么用Python而不用PowerShell或者BAT,咱也不知道咱也不敢问。

[大连东软-孙福龙](https://github.com/SunFulong/CVE-2019-0708-poc)对其进行改进,可以只写CIDR地址段。

由于CIDR地址段较多,所以我写了小段代码,根据CIDR地址段,nmap扫描开放3389端口的机器IP列入检测。可以减少检测IP量。

建议在配合批量检查时从360官方源下载检测工具并替换以上GitHub文件名。

检测结果仅供参考。

## 建议

关于CVE-2019-0708类似漏洞,平时只要做好以下2件事就很安全了。

- 本机打开防火墙,管理端3389和22只允许某些管理员IP或堡垒机登录即可。如果这么做了,即时不打补丁也是**相对**安全的。
- 系统自动安装更新打开,不使用已经EOL的服务器(可参考宋崟川@LinkedIn文档),比如Windows2k3。平时注意下网络是否正常,是否有自动打补丁即可。当然打安全补丁会有时间差,比如这次CVE-2019-0708这个,服务器是在第二天早上3点自动打,这个时候可以人工介入安装即可。
- 3389改端口这个不推荐,不标准也不安全。
File Snapshot

[4.0K] /data/pocs/5db3d6a23bc2617c6d6a897ea98859a254ce7c83 ├── [ 37] 3389_cidrs ├── [ 120] deep_generate.py ├── [ 653] generate.py └── [2.2K] README.md 0 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →