detecting-credential-dumping-with-edr
使用 EDR 遥测和 Sysmon 日志检测操作系统凭据转储技术,包括 LSASS 访问、SAM 提取和 DCSync。
Best use case
detecting-credential-dumping-with-edr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
使用 EDR 遥测和 Sysmon 日志检测操作系统凭据转储技术,包括 LSASS 访问、SAM 提取和 DCSync。
Teams using detecting-credential-dumping-with-edr should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/detecting-credential-dumping-with-edr/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How detecting-credential-dumping-with-edr Compares
| Feature / Agent | detecting-credential-dumping-with-edr | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
使用 EDR 遥测和 Sysmon 日志检测操作系统凭据转储技术,包括 LSASS 访问、SAM 提取和 DCSync。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 使用 EDR 检测凭据转储 ## 适用场景 - 在受攻击环境中主动狩猎后渗透凭据盗取活动时 - 在 EDR 告警中检测到可疑 LSASS 进程访问后 - 调查潜在 Active Directory 入侵时 - 事件响应(Incident Response)期间确定凭据暴露范围时 - 主动跨终端狩猎 T1003 子技术时 ## 前置条件 - 具备进程访问监控的 EDR 平台(CrowdStrike、MDE、SentinelOne) - 已为 LSASS 配置事件 ID 10(进程访问)的 Sysmon - 启用命令行审计的 Windows 安全事件日志 4688 - Active Directory 事件转发用于 DCSync 检测(事件 ID 4662) - SAM 注册表访问的 Windows 安全事件日志 4656/4663 ## 工作流程 1. **识别凭据转储向量**:映射与您环境相关的 T1003 子技术(LSASS 内存、SAM、NTDS、DCSync、/etc/passwd、缓存凭据)。 2. **查询 LSASS 访问事件**:搜索目标镜像为 lsass.exe 且具有可疑 GrantedAccess 掩码(0x1010、0x1038、0x1FFFFF)的 Sysmon 事件 ID 10。 3. **分析进程上下文**:检查访问 LSASS 的源进程——合法安全工具与未知或可疑二进制文件。 4. **狩猎 SAM/NTDS 访问**:查询针对 SAM/SECURITY/SYSTEM 注册表 hive 的 reg.exe 保存操作以及 ntdsutil/vssadmin 卷影副本访问。 5. **检测 DCSync 活动**:监控来自非域控制器源的 DS-Replication-Get-Changes 请求(事件 ID 4662)。 6. **与网络活动关联**:将凭据转储与后续横向移动(Lateral Movement)或身份验证异常交叉关联。 7. **评估影响并报告**:确定哪些凭据可能已暴露,并建议密码重置和遏制措施。 ## 核心概念 | 概念 | 描述 | |------|------| | T1003 | 操作系统凭据转储(OS Credential Dumping)——父技术 | | T1003.001 | LSASS 内存——从 LSASS 进程转储凭据 | | T1003.002 | 安全账户管理器(SAM)——提取本地密码哈希 | | T1003.003 | NTDS——从域控制器提取 AD 数据库 | | T1003.004 | LSA Secrets——访问存储的服务凭据 | | T1003.005 | 缓存的域凭据(DCC2) | | T1003.006 | DCSync——通过 DRSUAPI 复制 AD 凭据 | | LSASS | 本地安全授权子系统服务(Local Security Authority Subsystem Service) | | GrantedAccess | 表示进程请求访问权限的位掩码 | | Minidump | comsvcs.dll 等工具使用的内存转储技术 | ## 工具与系统 | 工具 | 用途 | |------|------| | CrowdStrike Falcon | LSASS 访问检测和进程树分析 | | Microsoft Defender for Endpoint | 凭据访问事件的高级狩猎 | | Sysmon | 进程访问监控(事件 ID 10) | | Velociraptor | LSASS 分析的终端工件收集 | | Elastic Security | 凭据转储指标的关联分析 | | Splunk | 凭据访问事件分析的 SPL 查询 | | Volatility | LSASS 凭据提取的内存取证 | ## 常见场景 1. **Mimikatz LSASS 转储**:攻击者运行 `sekurlsa::logonpasswords`,导致直接 LSASS 内存读取,GrantedAccess 为 0x1010。 2. **Comsvcs.dll MiniDump**:进程使用 `rundll32.exe comsvcs.dll MiniDump [LSASS PID]` 创建 LSASS 内存转储文件。 3. **ProcDump LSASS**:攻击者使用 Microsoft 签名的 procdump.exe 带 `-ma lsass.exe` 参数转储 LSASS 内存。 4. **SAM 注册表导出**:攻击者运行 `reg save HKLM\SAM sam.bak` 提取本地密码哈希。 5. **DCSync 复制**:拥有复制目录更改权限的受攻击账户从工作站执行 DCSync。 6. **NTDS 卷影副本**:攻击者使用 `vssadmin create shadow /for=C:` 然后从卷影副本复制 ntds.dit。 ## 输出格式 ``` Hunt ID: TH-CRED-DUMP-[DATE]-[SEQ] Technique: T1003.[子技术] Source Process: [访问 LSASS/SAM/NTDS 的进程] Target: [lsass.exe / SAM / NTDS.dit / DC 复制] Host: [主机名] User: [账户上下文] GrantedAccess: [访问掩码(如适用)] Timestamp: [UTC] Risk Level: [Critical/High/Medium/Low] Evidence: [日志条目、进程树、网络活动] Recommended Action: [密码重置范围、遏制步骤] ```
Related Skills
performing-service-account-credential-rotation
跨 Active Directory、云平台和应用程序数据库自动化服务账户凭据轮换,消除陈旧密钥并降低泄露风险。
performing-paste-site-monitoring-for-credentials
使用自动化抓取和关键词匹配技术,监控 Pastebin 和 GitHub Gists 等粘贴站点上的泄露凭证、API 密钥和敏感数据转储,实现早期泄露检测
performing-credential-access-with-lazagne
在授权红队行动中,使用 LaZagne 后渗透工具从已控制的终端提取存储的凭据,从浏览器、数据库、系统密钥库和应用程序中恢复密码。
hunting-credential-stuffing-attacks
通过分析认证日志中的登录速率异常、ASN 多样性、密码喷洒(password spray)模式和失败登录的地理分布,检测凭据填充(credential stuffing)攻击。对 Splunk 或原始日志数据进行统计分析。适用于调查账户接管活动或为认证滥用构建检测规则。
extracting-credentials-from-memory-dump
使用 Volatility 和 Mimikatz 从内存转储中提取缓存的凭据、密码哈希、Kerberos 票据和身份验证令牌,用于取证调查。
detecting-wmi-persistence
通过分析 Sysmon 事件 ID 19、20 和 21 中的恶意 EventFilter、EventConsumer 和 FilterToConsumerBinding 创建,检测 WMI 事件订阅持久化。
detecting-t1548-abuse-elevation-control-mechanism
通过监控注册表修改、进程提升标志和异常的父子进程关系,检测提升控制机制滥用,包括 UAC 绕过、sudo 利用和 setuid/setgid 操纵。
detecting-t1055-process-injection-with-sysmon
通过分析 Sysmon 事件中的跨进程内存操作、远程线程创建和异常 DLL 加载模式,检测进程注入技术(T1055),包括经典 DLL 注入、进程镂空和 APC 注入。
detecting-t1003-credential-dumping-with-edr
利用 EDR 遥测数据、Sysmon 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。
detecting-suspicious-powershell-execution
检测可疑的 PowerShell 执行模式,包括编码命令、下载器(download cradles)、AMSI 绕过尝试以及受限语言模式规避。
detecting-suspicious-oauth-application-consent
使用 Microsoft Graph API、审计日志和权限分析,检测 Azure AD / Microsoft Entra ID 中的高风险 OAuth 应用授权同意,识别非法同意授权攻击。
detecting-supply-chain-attacks-in-ci-cd
扫描 GitHub Actions 工作流和 CI/CD 流水线配置,检测供应链攻击(Supply Chain Attack)向量, 包括未固定的 Action 版本、通过表达式的脚本注入、依赖混淆(Dependency Confusion)和密钥泄露。 使用 PyGithub 和 YAML 解析进行自动化审计。适用于加固 CI/CD 流水线或调查被攻击的构建系统。