TheCruZ/kdmapper

GitHub: TheCruZ/kdmapper

KDMapper 是一款利用 Intel 易受攻击驱动绕过 Windows 驱动签名强制机制,实现未签名内核驱动手动内存映射的安全研究工具。

Stars: 2783 | Forks: 618

# KDMapper KDMapper 是一个简单的工具,利用 iqvw64e.sys Intel 驱动程序在内存中手动映射未签名的驱动程序。 已在 **Windows 10 1607** 到 **Windows 11 25H2 26200.6899** 上测试通过 :heavy_check_mark: **注意:** 添加定义 **DISABLE_OUTPUT** 以移除所有控制台输出。 **注意:** 建议像 HelloWorld 示例中那样设置自定义入口点。 ## 参数: ``` --copy-header to enable the copy driver header option by commandline --free to automatically unmap the allocated memory --indPages to map in allocated independent pages --PassAllocationPtr to pass allocation ptr as first param [PDB offset based build only]: --offsetsPath "FilePath" to include your own offsets file path (by default .\offsets.ini)(if FilePath contains spaces, it must be enclosed in quotation marks) --dontUpdateOffsets to execute without updating the offsets file (warning: you have to be sure that the offsets are not outdated to your current windows build, or you risk a potential BSOD) ``` ## 功能: ``` Works with /GS- compiled drivers Hooks NtAddAtom which exists everywhere and is rarely called Clears MmUnloadedDrivers Clears PiDDBCacheTable Clears g_KernelHashBucketList Clears Wdfilter RuntimeDriverList RuntimeDriverCount and RuntimeDriverArry Use NtLoadDriver and NtUnloadDriver for less traces Prevent load if \Device\Nal exists (Prevents BSOD) Header section skipped while copying driver to kernel Added the possibility to modify params before call driver entry Added PDB_OFFSETS macro that will allow the use of Offset PDB features (choose the target build) Introduced new project "SymbolsFromPDB" that will help KDMapper to adapt quickly to any windows updates by parsing the target .PDB files (PDB_OFFSETS macro must be defined to use this feature) ``` ## 构建: - 安装 Visual Studio:https://visualstudio.microsoft.com/downloads/ - 安装 Windows SDK:https://developer.microsoft.com/windows/downloads/windows-sdk/ - 安装 Windows WDK:https://learn.microsoft.com/windows-hardware/drivers/download-the-wdk - 打开解决方案 - 选择目标构建配置,例如 Release - 构建 ## 要求: - 从驱动程序入口返回得越快越好,以防止意外调用或 Patch Guard,切勿在驱动程序入口中创建无限循环(while 循环),应创建线程或任何其他过程来保持代码运行(如果你无法关闭 kdmapper,说明你的做法有误)。 - 如果启用了易受攻击驱动程序列表,请将其禁用 https://support.microsoft.com/en-au/topic/kb5020779-the-vulnerable-driver-blocklist-after-the-october-2022-preview-release-3fcbe13a-6013-4118-b584-fcfbc6a09936 ## 常见问题 ### 简单驱动程序导致 BSOD 在 DriverEntry 中,**DriverObject 和 RegistryPath** 是 **NULL**,除非你指定了任何内容!这是手动映射的驱动程序,**并非正常的加载过程**。 ### 错误 \\Device\\Nal 已在使用中。 这意味着已经加载了一个 Intel 驱动程序,或者 kdmapper 的另一个实例正在运行,或者 kdmapper 崩溃了且未卸载之前的驱动程序。 如果你确定没有其他 kdmapper 实例正在运行,可以尝试重启计算机来解决此问题。 如果问题仍然存在,你可以尝试手动卸载 Intel 驱动程序(如果驱动程序是用 kdmapper 加载的,它将有一个随机名称并位于 %temp% 中);如果不是,驱动程序名称为 iqvw64e.sys,并随你的网络驱动程序一起安装。 ### 错误 0xC0000022 和 0xC000009A: 这两者通常是由 FACEIT AC 或其他杀毒软件/反作弊程序引起的。 **注意:** 某些反作弊程序即使游戏未打开也会继续运行。 **注意:** 某些杀毒软件即使你禁用了它们,也会继续阻止此操作。 ### 错误 0xC0000603: 证书已被标记为易受攻击而被阻止,映射器将返回 STATUS_IMAGE_CERT_REVOKED 状态。更多信息请参阅 [Microsoft](https://support.microsoft.com/en-au/topic/kb5020779-the-vulnerable-driver-blocklist-after-the-october-2022-preview-release-3fcbe13a-6013-4118-b584-fcfbc6a09936) 如果你想禁用易受攻击驱动程序列表,必须打开 regedit.exe,转到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CI\Config 并将 'VulnerableDriverBlocklistEnable' 设置为值为 0 的 dword,然后重启以应用更改。 或者查看此 [Microsoft](https://support.microsoft.com/en-us/topic/kb5020779-the-vulnerable-driver-blocklist-after-the-october-2022-preview-release-3fcbe13a-6013-4118-b584-fcfbc6a09936)
标签:0day挖掘, BYOVD, DSE 绕过, EDR 规避, iqvw64e.sys, PDB 解析, Rootkit, Visual Studio, Waymore结果处理, Web报告查看器, Windows, Windows 11, Windows WDK, Windows 内核, Zeek, 中高交互蜜罐, 内核安全, 内核级恶意软件, 反向工程, 恶意软件开发, 无签名驱动加载, 清除痕迹, 系统安全工具, 驱动映射