重要提示:本站仅作 Skill 资源导航与收录,正文以 GitHub 原仓库为准,版权归原项目所有。
以下为摘要预览,完整内容请查看 GitHub 原文。
Hunting for DCSync Attacks
When to Use
- When hunting for DCSync credential theft (MITRE ATT&CK T1003.006)
- After detecting Mimikatz or similar tools in the environment
- During incident response involving Active Directory compromise
- When monitoring for unauthorized domain replication requests
- During purple team exercises testing AD attack detection
Prerequisites
- Windows Security Event Log forwarding enabled (Event ID 4662)
- Audit Directory Service Access enabled via Group Policy
- Domain Computers SACL configured on Domain Object for machine account detection
- SIEM with Windows event data ingested (Splunk, Elastic, Sentinel)
- Knowledge of legitimate domain controller accounts and replication partners
Workflow
- Enable Auditing: Ensure Audit Directory Service Access is enabled on domain controllers.
- Collect Events: Gather Windows Event ID 4662 with AccessMask 0x100 (Control Access).
- Filter Replication GUIDs: Search for DS-Replication-Get-Changes and DS-Replication-Get-Changes-All.
- Identify Non-DC Sources: Flag events where SubjectUserName is not a domain controller machine account.
- Correlate with Network: Cross-reference s…
以下为摘要预览,完整内容请查看 GitHub 原文。
搜寻 DCSync 攻击
使用场景
- 搜寻 DCSync 凭据窃取行为时(MITRE ATT&CK T1003.006)
- 在环境中检测到 Mimikatz 或类似工具之后
- 在涉及 Active Directory 失陷的应急响应过程中
- 监控未授权的域复制请求时
- 在测试 AD 攻击检测能力的紫队演练中
前置条件
- 已启用 Windows 安全事件日志转发(事件 ID 4662)
- 已通过组策略启用“审核目录服务访问”
- 已在 Domain Object 上配置 Domain Computers SACL 以便检测机器账户
- SIEM 已接入 Windows 事件数据(Splunk、Elastic、Sentinel)
- 掌握合法域控制器账户与复制伙伴的信息
工作流程
- 启用审核:确保已在域控制器上启用“审核目录服务访问”。
- 收集事件:汇总 Windows 事件 ID 4662 中 AccessMask 为 0x100(Control Access)的记录。
- 筛选复制 GUID:检索 DS-Replication-Get-Changes 与 DS-Replication-Get-Changes-All。
- 识别非 DC 来源:标记 SubjectUserName 不是域控制器机器账户的事件。
- 与网络进行关联:将源 IP 与已知 DC 地址进行交叉比对。
- 验证发现结果:排除合法的复制工具(Azure AD Connect、SCCM)。
- 响应处置:禁用已失陷账户、重置 krbtgt、调查横向移动行为。
关键概念
| 概念 | 说明 |
|---|
| DCSync | 利用 AD 复制协议提取密码哈希的技术 |
| Event ID 4662 | 目录服务访问审核事件 |
| DS-Replication-Get-Changes | GUID 1131f6aa-9c07-11d1-f79f-00c04fc2dcd2 |
| DS-Replication-Get-Changes-All | GUID 1131f6ad-9c07-11d1-f79f-00c04fc2dcd2 |
| AccessMask 0x100 | 表示扩展权限验证的 Control Access 权限 |
| T1003.006 | OS Credential Dumping:DCSync |
工具与系统
| 工具 | 用途 |
|---|
| Windows Event Viewer | 直接进行事件日志分析 |
| Splunk | 针对事件 4662 的 … |