SpiralSealFill/CVE-2026-41089-hub

GitHub: SpiralSealFill/CVE-2026-41089-hub

CVE-2026-41089 概念验证工具,利用 Windows Netlogon CLDAP 栈缓冲区溢出漏洞导致 LSASS 崩溃和域控拒绝服务。

Stars: 0 | Forks: 0

# CVE-2026-41089 ## 快速开始 ``` git clone https://github.com/SpiralSealFill/CVE-2026-41089-hub.git cd CVE-2026-41089-hub python install.py ``` ``` ██████╗██╗ ██╗███████╗ ██╗ ██╗ ██╗ ██████╗ ██████╗ ██╔════╝██║ ██║██╔════╝ ██║ ██║███║██╔═████╗██╔═████╗ ██║ ██║ ██║█████╗ ███████║╚██║██║██╔██║██║██╔██║ ██║ ╚██╗ ██╔╝██╔══╝ ██╔══██║ ██║████╔╝██║████╔╝██║ ╚██████╗ ╚████╔╝ ███████╗ ██║ ██║ ██║╚██████╔╝╚██████╔╝ ╚═════╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ``` **通过 CLDAP 栈缓冲区溢出实现 Windows Netlogon 远程代码执行** ![CVSS](https://img.shields.io/badge/CVSS_3.1-9.8_CRITICAL-red?style=for-the-badge) ![CWE](https://img.shields.io/badge/CWE-121-orange?style=for-the-badge) ![Python](https://img.shields.io/badge/Python-3.8+-blue?style=for-the-badge&logo=python&logoColor=white) ![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge) 向端口 389 发送一个构造的 UDP 数据包,会导致任何未修补的 Windows 域控上的 LSASS 内部的 528 字节栈缓冲区溢出。进程崩溃。 DC 将在大约 60 秒内重启。无需身份验证。 | | | |---|---| | **攻击媒介** | UDP 389 (CLDAP),预认证,零凭据 | | **影响** | LSASS 崩溃,DC 重启,潜在 RCE | | **CWE** | CWE-121(基于栈的缓冲区溢出) | | **CVSS Vector** | `AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H` | | **发布** | 2026 年 5 月 12 日由 Microsoft 发布 | ## 受影响的系统 作为域控运行的所有 Windows Server 版本: | Server 版本 | 修复版本 | |--------------------|--------------------------| | 2012 / 2012 R2 | 仅 ESU 补丁 | | 2016 | 10.0.14393.9140 | | 2019 | 10.0.17763.8755 | | 2022 | 10.0.20348.5074 | | 2022 23H2 | 10.0.25398.2330 | | 2025 | 10.0.26100.32772 | ## 根本原因 `NlGetLocalPingResponse` 分配了一个 528 字节的栈缓冲区,并将其 传递给 `BuildSamLogonResponse`。该函数调用 `NetpLogonPutUnicodeString` 将服务器名、域名、GUID 以及攻击者可控的 用户名写入缓冲区。 漏洞在于:`NetpLogonPutUnicodeString` 接收的字节单位最大长度, 却被当作 WCHAR 计数处理。通过此路径写入的每个字符串 都会占用两倍于预期的空间。CLDAP 过滤器中的“User”字段 (最多 130 个 wchars,传输占用 260 字节)会将合并后的写入 推过 528 字节的边界。 ``` I_NetLogonLdapLookupEx -> NlGetLocalPingResponse // 528-byte stack buffer -> LogonRequestHandler -> BuildSamLogonResponse -> NetpLogonPutUnicodeString // byte/WCHAR size confusion ``` # 连接测试(短用户名,无溢出) python3 poc.py 10.0.50.21 corp.local # 默认溢出尝试 python3 poc.py 10.0.50.21 corp.local -l 130 # 更大的 payload,为慢速网络设置更长超时 python3 poc.py 10.0.50.21 corp.local -l 200 -t 10 ``` Requires Python 3.8+. No third-party packages. ## 工作原理 the target responds on UDP 389. characters of "A". This pushes the serialized data past the stack buffer boundary. If LSASS crashes, the recv times out. whether the DC is still alive. No response = LSASS crash confirmed. The overflow triggers a denial of service (LSASS crash, DC reboot). RCE through stack corruption is possible in theory. This PoC does not attempt code execution. ## 检测 **Network.** Scan CLDAP traffic for search requests where the "User" filter attribute exceeds 20-30 characters. Normal DC locator pings use service account names (short strings). **Host.** Watch for LSASS crashes tied to netlogon.dll (Event ID 1000). Enable Netlogon debug logging: ``` nltest /dbflag:0x2080ffff ``` ## 缓解 - Install the May 2026 Microsoft security update - Restrict UDP 389 inbound to trusted management subnets - For legacy Server versions out of ESU: 0patch ships micropatches (single instruction fix: `mov edx, 0x40` to halve the max username length) ## 参考资料 - [Microsoft Security Update Guide](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-41089) - [NVD - CVE-2026-41089](https://nvd.nist.gov/vuln/detail/CVE-2026-41089) - [0patch Analysis and Micropatch](https://blog.0patch.com/2026/05/micropatches-released-for-windows_0304568783.html) - [Aretiq AI Reverse Engineering](https://aretiq.ai/research/vul260513-cve-2026-41089-microsoft-windows-netlogon-buildsamlogonresponse-stack-based-buffer-overflow-rce/) - [RFC 4511 - LDAP](https://tools.ietf.org/html/rfc4511) - [MS-ADTS - CLDAP DC Locator](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/0de3704e-a799-4afa-b12a-3fef2f8e2e66) --- > **Legal.** This code exists for authorized security research and > education. Test only against systems you own or have written permission > to test. Unauthorized access to computer systems violates the CFAA and > equivalent laws in most jurisdictions. **[MIT License](LICENSE)** ```
标签:PoC, Python, Web报告查看器, XXE攻击, 拒绝服务, 无后门, 暴力破解, 缓冲区溢出, 编程工具, 远程代码执行, 逆向工具, 配置错误