Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)

admin 2022年5月12日23:42:33评论42 views字数 3646阅读12分9秒阅读模式

CVE-2022-26809 RCE

CVE 描述

CVE-2022-26809 - 核心 Windows 组件 (RPC) 的弱点获得 9.8 的 CVSS 分数并非没有原因,因为攻击不需要身份验证并且可以通过网络远程执行,并且可能导致远程代码执行 ( RCE) 具有 RPC 服务的权限,这取决于托管 RPC 运行时的进程。运气好的话,这个严重的错误允许访问运行 SMB 的未打补丁的 Windows 主机。该漏洞既可以从网络外部被利用以破坏它,也可以在网络中的机器之间被利用。

https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-26809https://www.pwndefend.com/2022/04/14/cve-2022-26809/

影响范围

测试易受攻击的主机:

Microsoft Microsoft Windows RT 8.1Microsoft Microsoft Windows 8.1 for x64-based systemsMicrosoft Microsoft Windows 8.1 for 32-bit systemsMicrosoft Microsoft Windows 7 for x64-based Systems SP1Microsoft Microsoft Windows 7 for 32-bit Systems SP1Microsoft Microsoft Windows 10 for x64-based SystemsMicrosoft Microsoft Windows 10 for 32-bit SystemsMicrosoft Microsoft Windows 10 21H2 for x64-based SystemsMicrosoft Microsoft Windows 10 21H2 for ARM64-based SystemsMicrosoft Microsoft Windows 10 21H2 for 32-bit SystemsMicrosoft Microsoft Windows 10 21H1 for x64-based SystemsMicrosoft Microsoft Windows 10 21H1 for ARM64-based SystemsMicrosoft Microsoft Windows 10 21H1 for 32-bit SystemsMicrosoft Microsoft Windows 10 20H2 for x64-based SystemsMicrosoft Microsoft Windows 10 20H2 for ARM64-based SystemsMicrosoft Microsoft Windows 10 20H2 for 32-bit SystemsMicrosoft Microsoft Windows 10 1909 for x64-based SystemsMicrosoft Microsoft Windows 10 1909 for ARM64-based SystemsMicrosoft Microsoft Windows 10 1909 for 32-bit SystemsMicrosoft Microsoft Windows 10 1809 for x64-based SystemsMicrosoft Microsoft Windows 10 1809 for ARM64-based SystemsMicrosoft Microsoft Windows 10 1809 for 32-bit SystemsMicrosoft Microsoft Windows 10 1607 for x64-based SystemsMicrosoft Microsoft Windows 10 1607 for 32-bit SystemsMicrosoft Microsoft Windows 11 for x64-based SystemsMicrosoft Microsoft Windows 11 for ARM64-based SystemsMicrosoft Microsoft Windows Server 20H2(Server Core Installation)Microsoft Microsoft Windows Server 2022(Server Core installation)Microsoft Microsoft Windows Server 2022Microsoft Microsoft Windows Server 2019(Server Core installation)Microsoft Microsoft Windows Server 2019Microsoft Microsoft Windows Server 2016(Server Core installation)Microsoft Microsoft Windows Server 2016Microsoft Microsoft Windows Server 2012(Server Core installation)Microsoft Microsoft Windows Server 2012 R2(Server Core installatiMicrosoft Microsoft Windows Server 2012 R2Microsoft Microsoft Windows Server 2012Microsoft Microsoft Windows Server 2008 R2 for x64-based SystemsMicrosoft Microsoft Windows Server 2008 R2 for x64-based SystemsMicrosoft Microsoft Windows Server 2008 for x64-based Systems SP2Microsoft Microsoft Windows Server 2008 for x64-based Systems SP2Microsoft Microsoft Windows Server 2008 for 32-bit Systems SP2(SeMicrosoft Microsoft Windows Server 2008 for 32-bit Systems SP2

几乎所有运行 SMB 并开放 445 端口的构建都会受到影响。

漏洞定位

CVE 表示,漏洞位于 Windows RPC 运行时中,该运行时在名为 rpcrt4.dll 的库中实现。该运行时库被加载到使用 RPC 协议进行通信的客户端和服务器进程中。我们比较了版本 10.0.22000.434(3 月)和 10.0.22000.613(已修补)并挑选出更改列表。

OSF_SCALL::ProcessResponse 和 OSF_CCALL::ProcessReceivedPDU 函数本质上是相似的;两者都处理 RPC 数据包,但一个在服务器端运行,另一个在客户端运行(SCALL 和 CCALL)。通过区分 OSF_SCALL::ProcessReceivedPDU,我们注意到新版本中添加了两个代码块。

Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)
pic2
Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)
pic3_new

查看修补后的代码,我们看到在 QUEUE::PutOnQueue 之后调用了一个新函数。检查新函数并深入研究它的代码,我们发现它检查整数溢出。换句话说,patch 中的新函数被添加来验证整数变量是否保持在预期值范围内。

Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)

pic1

深入研究 OSF_SCALL:GetCoalescedBuffer 中的易受攻击代码,我们注意到整数溢出错误可能导致堆缓冲区溢出,其中数据被复制到太小而无法填充的缓冲区。这反过来又允许在堆上将数据写入缓冲区边界之外。当被利用时,这个原语会导致我们远程执行代码!

在其他函数中也添加了相同的用于检查整数溢出的调用:

OSF_CCALL::ProcessResponse OSF_SCALL::GetCoalescedBuffer OSF_CCALL::GetCoalescedBuffer

整数溢出漏洞和防止它的功能存在于客户端和服务器端执行流程中。

漏洞分析

https://www.youtube.com/watch?v=GGlwy3_jVYE

CVE-2022-26809 PoC

Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)

Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)


CVE-2022-26809 EXP

自行购买

https://satoshidisk.com/pay/CFNsN8

修复建议

以下缓解措施基于 Microsoft 的官方建议和我们的工作:

应用最新的安全更新!建议阻止外围设备的 TCP 端口 445 的流量!仅在需要的机器上允许传入的 TCP 端口 445 !

网络¥安全联盟站—李白你好

欢迎关注[李白你好]-文章内容涉及网络¥安全,web渗透测试内网安全二进制安全工业控制安全APP逆向、CTF、SRC等。

Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)



                                                           

Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)


微信:libaisec

微信交流群:加我微信拉你进群和工程师们学技术聊人生

原文始发于微信公众号(李白你好):Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年5月12日23:42:33
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Microsoft Remote Procedure Call Runtime 远程代码执行漏洞(CVE-2022-26809)http://cn-sec.com/archives/1000556.html

发表评论

匿名网友 填写信息