关联漏洞
标题:
微软 Microsoft SMBv3 缓冲区错误漏洞
(CVE-2020-0796)
描述:Microsoft SMBv3是美国微软(Microsoft)公司的一个为设备提供SMB功能的支持固件。 Microsoft Server Message Block 3.1.1 (SMBv3)版本中存在缓冲区错误漏洞,该漏洞源于SMBv3协议在处理恶意压缩数据包时,进入了错误流程。远程未经身份验证的攻击者可利用该漏洞在应用程序中执行任意代码。以下产品及版本受到影响:Microsoft Windows 10版本1903,Windows Server版本1903,Windows 10版本1909,Windo
描述
基于asyncio(协程)的CVE-2020-0796 速度还是十分可观的,方便运维师傅们对内网做下快速检测。
介绍
# aioScan_CVE-2020-0796
# 前言
在公开的POC基础上利用协程大幅提升了检测速度,方便运维师傅们快速的对内网进行检测。
## 影响版本
```
Windows 10 Version 1903 for 32-bit Systems
Windows 10 Version 1903 for x64-based Systems
Windows 10 Version 1903 for ARM64-based Systems
Windows Server, Version 1903 (Server Core installation)
Windows 10 Version 1909 for 32-bit Systems
Windows 10 Version 1909 for x64-based Systems
Windows 10 Version 1909 for ARM64-based Systems
Windows Server, Version 1909 (Server Core installation)
```
## 修复建议
参考微软的临时解决方案
[ADV200005 | Microsoft Guidance for Disabling SMBv3 Compression](https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/ADV200005)
使用powershell来禁止SMBv3服务的压缩(无需重启)
```powershell
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWORD -Value 1 -Force
```
# 用法
~~请使用python3.5及以上的版本运行。~~
请使用python3.7及以上的版本运行(由于asyncio.run是3.7新增的API,我只考虑到了async\await 是3.5新增的语法)
ip地址处理使用了第三方库 netaddr
```
pip3 install netaddr
```

如果不想显示连接超时的ip信息,可以把39行换成pass
文件快照
[4.0K] /data/pocs/6794039c38ba840e42ccbd60a0af80d832a7ed3b
├── [2.3K] aioscan_2020_0796.py
└── [1.4K] README.md
0 directories, 2 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。