bytewreck/DumpGuard

GitHub: bytewreck/DumpGuard

一款针对现代 Windows 系统的凭据转储工具,通过滥用 Remote Credential Guard 协议绕过 Credential Guard 提取 NTLM 响应和 Kerberos 票据。

Stars: 695 | Forks: 64

# DumpGuard [![BSD3 许可证](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg?style=flat)](../LICENSE) [![Slack](https://img.shields.io/badge/Slack-SpecterOps-02B36C)](https://slack.specterops.io) [![SpecterOps 赞助](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/specterops/.github/main/config/shield.json)](https://github.com/specterops) ![Logo](https://raw.githubusercontent.com/bytewreck/DumpGuard/main/logo.jpeg) DumpGuard 是一款针对现代 Windows 系统的凭据转储和协议研究工具。它滥用了 _Remote Credential Guard_ 协议来恢复凭据材料,即使启用了 _Credential Guard_ 也能生效,并且还包含一个用于面向会话的 NTLM 提取的 Microsoft v1 身验证包路径。 当前功能包括: - NTLMv1 响应 - NTLMv2 响应 - Kerberos 服务票据 - 用于本地登录会话的 Microsoft v1 身份验证包转储 你可以从本仓库的发布页面下载预构建的副本。 **免责声明:** 本工具仅供教育和合法测试目的提供。本仓库的作者不纵容或支持任何形式的滥用,对因使用本工具而造成的损害或法律后果不承担任何责任。 ## 用法概述 下表总结了目前实现的技术。 | 技术 | 命令 | 需要 SYSTEM | 需要
SPN 账户 | 可绕过
Credential Guard | | -------- | ------- | :----------------: | :---------------------: | :--------------------------: | | 通过 Remote Credential Guard 提取 NTLMv1 | `ntlmv1` | `self`: :x:
`all`: ✅ | ✅ | ✅ | | 通过 Remote Credential Guard 提取 NTLMv2 | `ntlmv2` | `self`: :x:
`all`: ✅ | ✅ | ✅ | | 通过 Remote Credential Guard 提取 Kerberos TGS | `kerbtgs` | `self`: :x:
`all`: ✅ | ✅ | ✅ | | 通过 Microsoft v1 身份验证包提取 NTLMv1 | `msv10` | ✅ | :x: | :x: | DumpGuard 使用 `command` 加 `target` 模型。 - `command` 选择提取技术。 - `target` 选择是对当前会话进行操作还是枚举所有会话。 支持的命令: - `/command:ntlmv1` - `/command:ntlmv2` - `/command:kerbtgs` - `/command:msv10` 支持的目标: - `/target:self` - `/target:all` 常用 Remote Credential Guard 参数: - `/domain:` - `/username:` - `/password:` - `/spn:` Kerberos TGS 参数: - `/tgsdomain:` - `/tgsspn:` 如果省略了计算机账户的 `/spn`,DumpGuard 将默认使用 `HOST/`。 ## 通过 Remote Credential Guard 转储你自己的会话 要从无特权上下文中转储当前用户的凭据材料,DumpGuard 会使用 Remote Credential Guard 向启用了 SPN 的账户进行身份验证,然后通过建立的安全上下文发出后续请求。 无论 Credential Guard 的状态如何,此方法均有效,但需要启用了 SPN 的账户凭据。 权限要求:**无**。 NTLMv1: ``` DumpGuard.exe /command:ntlmv1 /target:self /domain: /username: /password: [/spn:] ``` NTLMv2: ``` DumpGuard.exe /command:ntlmv2 /target:self /domain: /username: /password: [/spn:] ``` Kerberos TGS: ``` DumpGuard.exe /command:kerbtgs /target:self /domain: /username: /password: [/spn:] [/tgsdomain:] /tgsspn: ``` 如果省略了 `/tgsdomain`,它将默认使用 Remote Credential Guard 的 `/domain` 值。 ## 通过 Remote Credential Guard 转储所有会话 要从特权上下文中转储当前可访问的所有用户的凭据材料,DumpGuard 会模拟运行进程中的 token,使用 Remote Credential Guard 向启用了 SPN 的账户进行身份验证,然后通过建立的安全上下文发出后续请求。 无论 Credential Guard 的状态如何,此方法均有效,但需要启用了 SPN 的账户凭据。 权限要求:**SYSTEM** 或 **Administrator**(需要 **SeImpersonatePrivilege**)。 NTLMv1: ``` DumpGuard.exe /command:ntlmv1 /target:all /domain: /username: /password: [/spn:] ``` NTLMv2: ``` DumpGuard.exe /command:ntlmv2 /target:all /domain: /username: /password: [/spn:] ``` Kerberos TGS: ``` DumpGuard.exe /command:kerbtgs /target:all /domain: /username: /password: [/spn:] [/tgsdomain:] /tgsspn: ``` 如果省略了 `/tgsdomain`,它将默认使用 Remote Credential Guard 的 `/domain` 值。 ## 通过 Microsoft v1 身份验证包转储所有会话 要从具有特权的 SYSTEM 上下文中转储当前已验证用户的 NTLM 响应,DumpGuard 会直接与 NTLM SSP 交互,并为每个发现的登录会话请求挑战响应。 此操作仅在以下条件下有效: - 本地系统已禁用 Credential Guard。 - 远程用户通过 Remote Credential Guard 从远程主机向本地系统进行了身份验证。 权限要求:**SYSTEM**(需要 **SeTcbPrivilege**)。 ``` DumpGuard.exe /command:msv10 ``` 此攻击也可以使用 [LSA Whisperer](https://github.com/EvanMcBroom/lsa-whisperer) 通过以下命令执行: ``` lsa-whisperer.exe msv1_0 Lm20GetChallengeResponse --luid {session id} --challenge {challenge to clients} [flags...] ``` ## 附加信息 我已经逆向工程并重建了 Credential Guard (`LsaIso.exe`) 暴露的接口,并将它们包含在这个仓库中,供有兴趣进一步研究的人使用。 截至 2025 年 10 月,已实现以下接口: - BCryptIum - CloudApIum - KerberosIum - LsaIsoMgmtIum - NtlmIum - ProvIum ## 致谢 感谢 [SpecterOps](https://specterops.io/) 对这项研究的支持,也感谢我的同事们对其开发提供的帮助。 - [Elad Shamir](https://twitter.com/elad_shamir) - 启发了这个工具和研究,并在我遇到困难时提供了宝贵的视角和鼓励。 - [Evan McBroom](https://github.com/EvanMcBroom) - 分享了关于 LSA 内部机制的有用见解,并为本项目中使用的大多数结构提供了 ASN.1 编码器。 ## 相关工具 - [LSA Whisperer](https://github.com/EvanMcBroom/lsa-whisperer) ([Evan McBroom](https://github.com/EvanMcBroom)) - 用于与身份验证包交互的工具集。 - [Rubeus](https://github.com/GhostPack/Rubeus) ([Will Schroeder](https://github.com/HarmJ0y), [Charlie Clark](https://x.com/exploitph)) - 用于底层 Kerberos 交互和滥用的 C# 工具集。 - [Mimikatz](https://github.com/gentilkiwi/mimikatz) ([Benjamin Delpy](https://github.com/gentilkiwi)) - 用于玩转 Windows 安全的小工具。 - [Kekeo](https://github.com/gentilkiwi/kekeo) ([Benjamin Delpy](https://github.com/gentilkiwi/kekeo)) - 用于在 C 语言中玩转 Microsoft Kerberos 的小工具箱。 ## 相关工作 - [Oliver Lyak](https://github.com/ly4k) ([2022](https://research.ifcr.dk/pass-the-challenge-defeating-windows-defender-credential-guard-31a892eee22)) - 据我所知,这是唯一公开的关于转储受 Credential Guard 保护的凭据的研究。 - [James Forshaw](https://x.com/tiraniddo) ([2022](https://project-zero.issues.chromium.org/issues/42451433), [2022](https://project-zero.issues.chromium.org/issues/42451435), [2022](https://project-zero.issues.chromium.org/issues/42451397), [2022](https://project-zero.issues.chromium.org/issues/42451436)) - 漏洞提交,其中略微记录了我们研究的一些未公开接口。
标签:Conpot, Credential Guard绕过, HTTP, LSASS, Mimikatz替代, NTLM, PoC, Remote Credential Guard, SpecterOps, SPN账户, Windows安全, 凭据保护, 凭据提取, 凭据转储, 安全测试, 客户端加密, 攻击性安全, 暴力破解, 概念验证, 模拟器, 特权提升, 网络安全, 自动化部署, 认证协议分析, 隐私保护