前言
此漏洞由看雪论坛大牛 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 SystemsWindows 10 Version 20H2 for 32-bit SystemsWindows 10 Version 20H2 for x64-based SystemsWindows Server, version 2004 (Server Core installation)Windows 10 Version 2004 for x64-based SystemsWindows 10 Version 2004 for ARM64-based SystemsWindows 10 Version 2004 for 32-bit SystemsWindows Server, version 1909 (Server Core installation)Windows 10 Version 1909 for ARM64-based SystemsWindows 10 Version 1909 for x64-based SystemsWindows 10 Version 1909 for 32-bit SystemsWindows Server 2019 (Server Core installation)Windows Server 2019Windows 10 Version 1809 for ARM64-based SystemsWindows 10 Version 1809 for x64-based SystemsWindows 10 Version 1809 for 32-bit SystemsWindows 10 Version 1803 for ARM64-based SystemsWindows 10 Version 1803 for x64-based System
Part.3 漏洞复现






扫码二维码
获取更多姿势
F12sec


往期推荐
实战 | 记一次利用mssql上线




