Windows条件竞争提权漏洞复现(CVE-2024-300889)

发布于:2024-07-01 ⋅ 阅读:(17) ⋅ 点赞:(0)

漏洞原理

  • 当内核将当前令牌对象的 _AUTHZBASEP_SECURITY_ATTRIBUTES_INFORMATION 复制到用户模式时,错误位于函数 AuthzBasepCopyoutInternalSecurityAttributes 内部,该模式的结构如下:
//0x30 bytes (sizeof)
struct _AUTHZBASEP_SECURITY_ATTRIBUTES_INFORMATION
{
    ULONG SecurityAttributeCount;                                           //0x0
    struct _LIST_ENTRY SecurityAttributesList;                              //0x8
    ULONG WorkingSecurityAttributeCount;                                    //0x18
    struct _LIST_ENTRY WorkingSecurityAttributesList;                       //0x20
}; 
  • 执行复制 SecurityAttributesList 时,内核会将 SecurityAttribute 的结构列表直接设置到用户提供的指针。之后,它调用 RtlCopyUnicodeStringAuthzBasepCopyoutInternalSecurityAttributeValues 函数以复制 SecurityAttribute 结构的名称和值,从而导致此函数中的多个 TOCTOU。
  • 在调用 [*] 之前,使用一个简单的赛车线程来修改属性名称的 Buffer 指针,我可以轻松地存档任意地址写入,并控制固定值和大小。

影响范围

windows_10_1507 最高(不包括) 10.0.10240.20680
windows_10_1607 最高(不包括) 10.0.14393.7070
windows_10_1809 最高(不包括) 10.0.17763.5936
windows_10_21h2 最高(不包括) 10.0.19044.4529
windows_10_22h2 最高(不包括) 10.0.19045.4529
windows_11_21h2 最高(不包括) 10.0.22000.3019
windows_11_22h2 最多(不包括) 10.0.22621.3737
windows_11_23h2 最高(不包括) 10.0.22631.3737
windows_server_2016 最高(不包括) 10.0.14393.7070
windows_server_2019 最高(不包括) 10.0.17763.5936
windows_server_2022 最高(不包括) 10.0.20348.2522
windows_server_2022_23h2 最高(不包括) 10.0.25398.950

漏洞复现

文件来源:tykawaii98/CVE-2024-30088 (github.com)

用Visual Studio打开,直接生成解决方案

外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

执行效果:

外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

执行效果视频:

CVE-2024-30088复现视频

参考链接

tykawaii98/CVE-2024-30088 (github.com)

NVD - CVE-2024-30088 (nist.gov)


网站公告

今日签到

点亮在社区的每一天
去签到