grizzzer/CVE-2026-42978-PoC-Research
GitHub: grizzzer/CVE-2026-42978-PoC-Research
该项目深度分析了 CVE-2026-42978 Windows 推送通知服务释放后重用竞态条件漏洞的根因与补丁,并提供配套的 TOCTOU 教学实验与防御检测规则。
Stars: 0 | Forks: 0
# CVE-2026-42978 PoC 与研究 — Windows 推送通知释放后重用
在以 `NT AUTHORITY\SYSTEM` 身份运行的 Windows 推送通知服务(`WpnService`)中存在的竞态条件。具有本地访问权限的攻击者可以在平台关闭期间触发释放后重用,从而可能导致权限提升。
- **CVE:** [CVE-2026-42978](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-42978)
- **BDU:** [BDU:2026-08249](https://pm.gov.ru/vul/2026-08249)
- **类型:** CWE-362 (竞态条件),释放后重用
- **CVSS:** 7.8 (高危)
- **受影响版本:** Windows 10, Windows 11, Windows Server 2016/2019/2022/2025
- **已修复:** 2026 年 6 月 10 日 (补丁星期二)
- **状态:** 已修复。此仓库仅用于防御性研究。
## 工作原理
`WpnService` 是 Windows 推送通知服务。它在会话 0 中作为 LocalSystem 运行在 `svchost.exe -k netsvcs -p` 内部。所有通知传递 — toast、磁贴、角标 — 都通过它进行处理。
该漏洞存在于 `wpncore.dll` 中,特别是 `PresentationEndpointFacade` 类中。该类封装了所有通知 API 调用(toast 传递、会话管理、设置查询等)并委托给 `PresentationEndpointImpl`。
漏洞原因:在平台关闭期间,`NotificationPlatform` 对象会被销毁。但是 Facade 方法没有检查是否正在进行关闭 — 它们获取了指向该平台的指针,而该平台随后被关闭线程释放,导致 Facade 使用了悬垂指针。这是典型的释放后重用竞态问题。
### 漏洞代码(反编译自 wpncore.dll build 26100.8521)
```
// PresentationEndpointFacade::ToastUnblockAll — VULNERABLE
long ToastUnblockAll(PresentationEndpointFacade *this) {
// No lock. No shutdown check. Just grab the platform pointer and go.
NotificationPlatformHandle::Get(this + 0x50);
if (platform == NULL) Throw_Hr(...);
// If shutdown frees the platform right here — use-after-free
return PresentationEndpointImpl::UnblockToastsForEachApp(...);
}
```
Ghidra: vulnerable ToastUnblockAll — no synchronization before accessing the platform
Left: service detects race (5/5). Right: attacker flipping shared memory values.
ETW monitor: WpnService running (PID 6432), no crashes, 100 events/hour, system patched
Event Viewer: PushNotifications-Platform operational log, Event ID 1225
标签:AI合规, AMSI绕过, UAF, Web报告查看器, 云资产清单, 威胁检测, 客户端加密, 本地提权, 漏洞分析, 路径探测, 逆向工具, 逆向工程