暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

漏洞复现 | Microsoft Windows10 本地提权漏权 CVE-­2021­-1732

F12sec 2021-03-30
1085

前言


此漏洞由看雪论坛大牛 KernelKiller 师傅挖掘。

偶然之间看到的,遂利用该师傅的Exp复现一遍。

原文链接:

https://bbs.pediy.com/thread-266362.htm

CVE-­2021­-1732 Microsoft Windows10 本地提权漏 研究及Exploit开发

本文所涉及的Exp地址:

https://github.com/KaLendsi/CVE-2021-1732-Exploit

CVE-2021-1732-Exploit

申明:请勿利用文章内的相关技术从事非法测试,如因此产生的一切不良后果与文章作者和本公众号无关。


Part.1 漏洞描述


  • 漏洞发生在Windows 图形驱动win32kfull!NtUserCreateWindowEx函数中的一处内核回调用户态分配内存与tagWND->flag属性设置不同步导致的漏洞。使得可以伪造这个tagWND->offset值发生内存越界。

  • 当驱动win32kfull.sys调用NtUserCreateWindowEx创建窗口时会判断tagWND->cbWndExtra(窗口实例额外分配内存数),该值不为空时调用win32kfull!xxxClientAllocWindowClassExtraBytes函数回调用户层user32.dll!__xxxClientAllocWindowClassExtraBytes分配空间,分配后的地址使用NtCallbackReturn函数修正堆栈后重新返回内核层并保存并继续运行,而当tagWND->flag值包含0x800属性后该保存值变成了一个offset。

  • 攻击者可以Hook user32.dll!_xxxClientAllocWindowClassExtraBytes函数调用NtUserConsoleControl修改tagWND->flag包含0x800属性值后使用NtCallbackReturn返回一个自定义的值到内核tagWND->offset。



Part.2 受影响系统及版本


Windows Server, version 20H2 (Server Core Installation)
Windows 10 Version 20H2 for ARM64-based Systems
Windows 10 Version 20H2 for 32-bit Systems
Windows 10 Version 20H2 for x64-based Systems
Windows Server, version 2004 (Server Core installation)
Windows 10 Version 2004 for x64-based Systems
Windows 10 Version 2004 for ARM64-based Systems
Windows 10 Version 2004 for 32-bit Systems
Windows Server, version 1909 (Server Core installation)
Windows 10 Version 1909 for ARM64-based Systems
Windows 10 Version 1909 for x64-based Systems
Windows 10 Version 1909 for 32-bit Systems
Windows Server 2019 (Server Core installation)
Windows Server 2019
Windows 10 Version 1809 for ARM64-based Systems
Windows 10 Version 1809 for x64-based Systems
Windows 10 Version 1809 for 32-bit Systems
Windows 10 Version 1803 for ARM64-based Systems
Windows 10 Version 1803 for x64-based System







Part.3 漏洞复现


从GitHub上下载,用Visual Studio 2019打开项目,选择ExploitTest.sln文件。

生成可执行文件

将文件移到漏洞范围内的靶机,运行,提权成功



扫码二维码

获取更多姿势

F12sec



往期推荐

漏洞复现 | 记一次通用漏洞0
实战 | 记一次利用mssql上线

实战 | 利用无线渗透加内网渗透进行钓妹子(上篇)

文章转载自F12sec,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论