0x001 漏洞概述
3月12日晚,微软发布了一则安全公告,公开了最新的SMB远程代码执行漏洞(CVE-2020-0796)。此漏洞源于SMBv3协议在处理恶意压缩数据包时的错误处理,允许未经认证的远程攻击者在目标系统上执行任意代码。
漏洞编号:CVE-2020-0796 POC工具(C++版):https://www.php.cn/link/917fa0f2b70d8a6fd02b80674012c19c POC工具(Python版):https://www.php.cn/link/e0b8da96bad1458e5d78007b9e2d38c4 POC工具(EXE版):https://pan.baidu.com/s/13FH3VIgBYufhCV5dqnNr4w 提取码为
bh7c
0x002 受影响的版本
0x003 漏洞检测 检测工具使用命令
python scanner.py IP
该漏洞检测工具为
python2
import socket
import struct
import sys
pkt = b'\x00\x00\x00\xc0\xfeSMB@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$\x00\x08\x00\x01\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00x\x00\x00\x00\x02\x00\x00\x00\x02\x02\x10\x02"\x02$\x02\x00\x03\x02\x03\x10\x03\x11\x03\x00\x00\x00\x00\x01\x00&\x00\x00\x00\x00\x00\x01\x00 \x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\n\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00'
sock = socket.socket(socket.AF_INET)
sock.settimeout(3)
sock.connect((sys.argv[1], 445))
sock.send(pkt)
nb, = struct.unpack(">I", sock.recv(4))
res = sock.recv(nb)
if not res[68:70] == b"\x11\x03":
exit("Not vulnerable.")
if not res[70:72] == b"\x02\x00":
exit("Not vulnerable.")
exit("Vulnerable.")0x004 漏洞演示
VMare
Win10 x64 1909
lucky
SMB

python scanner.py 192.168.1.6

EXP
IP

EXP
IP:127.0.0.1
system

0x005 漏洞修复 (1) 关闭445端口,防范利用此漏洞的攻击。
(2) 禁用SMBv3压缩,使用以下PowerShell命令可禁用SMBv3服务的压缩(无需重启):
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWORD -Value 1 -Force
(3) 应用补丁:https://www.php.cn/link/3e2eff6f1a2696537e4cd1365e796133
(4) 将系统更新至版本2004
参考文章 https://www.php.cn/link/ba655f12a66201f445f6816a87ffe480https://www.php.cn/link/e96b520d898c746f81549b11832d7424https://www.php.cn/link/ae36a44c4e66803a440c95147a40ff04
以上就是永恒之黑(CVE-2020-0796)的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号