detecting-t1003-credential-dumping-with-edr
利用 EDR 遥测数据、Sysmon 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。
Best use case
detecting-t1003-credential-dumping-with-edr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
利用 EDR 遥测数据、Sysmon 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。
Teams using detecting-t1003-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-t1003-credential-dumping-with-edr/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How detecting-t1003-credential-dumping-with-edr Compares
| Feature / Agent | detecting-t1003-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 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。
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 检测 T1003 凭据转储
## 适用场景
- 狩猎环境中的凭据窃取活动时
- 入侵指标表明攻击者已获得提升权限后
- EDR 告警 LSASS 访问或可疑进程内存读取时
- 事件响应期间确定凭据泄露的范围时
- 审计 LSASS 保护控制(凭据保护、RunAsPPL)时
## 前置条件
- 部署了具备 LSASS 访问监控能力的 EDR agent(CrowdStrike、Defender for Endpoint、SentinelOne)
- 配置了 LSASS 专属过滤器的 Sysmon 事件 ID 10(ProcessAccess)
- Windows 安全事件 ID 4656/4663(对象访问审计)
- 已启用 LSASS SACL 审计(Windows 10+)
- 针对 SAM 注册表 hive 访问的注册表审计
## 工作流程
1. **监控 LSASS 进程访问**:追踪所有以可疑访问权限(PROCESS_VM_READ 0x0010、PROCESS_ALL_ACCESS 0x1FFFFF)打开 lsass.exe 句柄的进程。非特权或异常进程访问 LSASS 是强烈指标。
2. **检测凭据转储工具**:狩猎已知工具签名——Mimikatz(sekurlsa::logonpasswords)、procdump.exe 针对 LSASS、comsvcs.dll MiniDump,以及任务管理器创建 LSASS 转储。
3. **监控 NTDS.dit 访问**:检测创建卷影副本(vssadmin、wmic shadowcopy)后访问 NTDS.dit 文件,或 ntdsutil.exe IFM 创建操作。
4. **追踪 SAM/SECURITY/SYSTEM 注册表 hive 访问**:狩猎针对 SAM、SECURITY 和 SYSTEM 注册表 hive 的 reg.exe save 命令。
5. **检测 DCSync 活动**:监控非域控制器账户请求目录复制的行为(事件 4662,包含复制 GUID)。
6. **与横向移动关联**:凭据转储后攻击者通常进行横向移动。将凭据访问事件与后续的远程登录尝试相关联。
7. **评估影响**:确定可能被泄露的凭据范围并启动密码重置。
## 核心概念
| 概念 | 描述 |
|------|------|
| T1003.001 | LSASS 内存——从 LSASS 进程转储凭据 |
| T1003.002 | 安全账户管理器——从 SAM 提取本地账户哈希 |
| T1003.003 | NTDS——从 Active Directory 数据库提取域哈希 |
| T1003.004 | LSA 机密——提取服务账户密码 |
| T1003.005 | 缓存域凭据——提取 DCC2 哈希 |
| T1003.006 | DCSync——从域控制器复制凭据 |
| 凭据保护(Credential Guard) | 基于虚拟化的 LSASS 机密隔离 |
| RunAsPPL | LSASS 受保护进程轻量级模式 |
## 检测查询
### Splunk——LSASS 访问检测
```spl
index=sysmon EventCode=10
| where match(TargetImage, "(?i)lsass\.exe$")
| where GrantedAccess IN ("0x1FFFFF", "0x1F3FFF", "0x143A", "0x1F0FFF", "0x0040", "0x1010", "0x1410")
| where NOT match(SourceImage, "(?i)(csrss|lsass|svchost|MsMpEng|WmiPrvSE|taskmgr|procexp|SecurityHealthService)\.exe$")
| table _time Computer SourceImage SourceProcessId GrantedAccess CallTrace
```
### Splunk——凭据转储工具检测
```spl
index=sysmon EventCode=1
| where match(CommandLine, "(?i)(sekurlsa|lsadump|kerberos::list|crypto::certificates)")
OR match(CommandLine, "(?i)procdump.*-ma.*lsass")
OR match(CommandLine, "(?i)comsvcs\.dll.*MiniDump")
OR match(CommandLine, "(?i)ntdsutil.*\"ac i ntds\".*ifm")
OR match(CommandLine, "(?i)reg\s+save\s+hklm\\\\(sam|security|system)")
OR match(CommandLine, "(?i)vssadmin.*create\s+shadow")
| table _time Computer User Image CommandLine ParentImage
```
### KQL——Microsoft Defender for Endpoint
```kql
DeviceEvents
| where Timestamp > ago(7d)
| where ActionType in ("LsassAccess", "CredentialDumpingActivity")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName,
InitiatingProcessCommandLine, ActionType, AdditionalFields
| sort by Timestamp desc
```
### Sigma 规则——LSASS 凭据转储
```yaml
title: LSASS Memory Credential Dumping Attempt
status: stable
logsource:
product: windows
category: process_access
detection:
selection:
TargetImage|endswith: '\lsass.exe'
GrantedAccess|contains:
- '0x1FFFFF'
- '0x1F3FFF'
- '0x143A'
- '0x0040'
filter:
SourceImage|endswith:
- '\csrss.exe'
- '\lsass.exe'
- '\MsMpEng.exe'
- '\svchost.exe'
condition: selection and not filter
level: critical
tags:
- attack.credential_access
- attack.t1003.001
```
## 常见场景
1. **Mimikatz sekurlsa**:通过 `sekurlsa::logonpasswords` 直接读取 LSASS 内存,提取明文密码、NTLM 哈希和 Kerberos 票据。
2. **ProcDump LSASS**:`procdump.exe -ma lsass.exe lsass.dmp` 创建内存转储供离线凭据提取。
3. **Comsvcs.dll MiniDump**:`rundll32.exe comsvcs.dll MiniDump [LSASS_PID] dump.bin full` 利用内置 Windows DLL 转储 LSASS。
4. **NTDS.dit 提取**:创建卷影副本并复制 NTDS.dit + SYSTEM hive,使用 secretsdump 进行离线域哈希提取。
5. **SAM 注册表 hive 导出**:`reg save HKLM\SAM sam.save` 结合 `reg save HKLM\SYSTEM system.save` 进行本地账户哈希提取。
6. **任务管理器转储**:在任务管理器中右键点击 LSASS 创建内存转储——合法工具被滥用于凭据窃取。
## 输出格式
```
Hunt ID: TH-CRED-[DATE]-[SEQ]
Host: [主机名]
Dumping Method: [LSASS_Access/NTDS/SAM/DCSync]
Source Process: [使用的工具或进程]
Target: [LSASS/NTDS.dit/SAM/SECURITY]
Access Rights: [授予的访问掩码]
User Context: [执行转储的账户]
ATT&CK Technique: [T1003.00x]
Risk Level: [Critical/High/Medium]
Credentials at Risk: [影响范围评估]
```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-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 流水线或调查被攻击的构建系统。
detecting-stuxnet-style-attacks
本技能涵盖检测遵循Stuxnet攻击模式的复杂网络物理攻击——在修改PLC逻辑的同时欺骗传感器读数以向操作员隐藏操控行为。内容涉及PLC逻辑完整性监控、基于物理的过程异常检测、工程师工作站入侵指标、USB传播攻击向量,以及从IT到OT横向移动直至过程操控的多阶段攻击链检测。