Microsoft SMBv3 远程代码执行漏洞(CVE-2020-0796)
2020年3月11日,微软官方发布公告,声明 SMBv3 协议中存在一处远程代码执行漏洞。该漏洞编号为 CVE-2020-0796,未包含在微软 3 月的补丁发行日的补丁发行中。
该漏洞的信息最初是意外泄露的,随后微软官方在公告中确认此漏洞的存在性,并提供了相关的安全建议和指导,不过目前官方尚未发布针对该漏洞的补丁:
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/adv200005
漏洞描述
SMBv3 协议在处理使用压缩的数据包时存在漏洞,远程且未经授权认证的攻击者通过利用此漏洞,可以在受影响的目标服务器上执行任意恶意代码,获取系统权限。
此漏洞不仅影响 SMBv3 服务端,同时也影响客户端:当 SMBv3 客户端连接到一个恶意的 SMBv3 服务端时,也存在被攻击的风险。
影响范围
由于此漏洞仅影响 SMB 协议的 v3 版本,因此最近的 Windows 系统版本才会受到漏洞影响。官方公告里列出的影响范围如下:
-
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)
解决方案
1.禁用 SMBv3 compression:
可以用管理员权限执行以下 PowerShell 命令,来禁用 SMBv3 compression:
Set-ItemProperty-Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWORD -Value 1 -Force
说明:
(1) 命令执行完毕后,系统无需重启即可生效
(2) 此缓解办法仅防止针对 SMBv3 服务端的漏洞攻击利用,无法防止针对客户端的攻击利用。
(3) 如果要解除对 SMBv3 compression 的禁用,使用以下命令:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWORD -Value 0 -Force
2.采用防火墙等措施,阻止对 TCP 445 端口的连接。
3.参考 Microsoft 准则,防止 SMB 流量流出公司网络:
https://support.microsoft.com/en-us/help/3185535/guidelines-for-blocking-specific-firewall-ports-to-prevent-smb-traffic
参考资料
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/adv200005
https://www.kb.cert.org/vuls/id/872016/
https://support.microsoft.com/en-us/help/3185535/guidelines-for-blocking-specific-firewall-ports-to-prevent-smb-traffic
转载声明
本文转自长亭安全课堂,版权归作者所有
转载仅为传播更多行业资讯,如有侵权请联系删除
参考资料
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/adv200005
https://www.kb.cert.org/vuls/id/872016/
https://support.microsoft.com/en-us/help/3185535/guidelines-for-blocking-specific-firewall-ports-to-prevent-smb-traffic