/cybersecurity-skills-zh:detecting-dcsync-attack-in-active-directoryfrom cybersecurity-skills-zh
Monitors non-domain controller accounts requesting directory replication via DsGetNCChanges to detect DCSync attacks that extract password hashes from Active Directory.
Ships in cybersecurity-skills-zh. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
| 概念 | 描述 |
|---|---|
| T1003.006 | 操作系统凭据转储:DCSync |
| DCSync | 模仿域控制器复制以提取凭据 |
| DsGetNCChanges | 用于请求 AD 复制数据的 RPC 函数 |
| DS-Replication-Get-Changes | 所需的 AD 权限(GUID:1131f6aa-...) |
| DS-Replication-Get-Changes-All | 包含机密属性的权限(GUID:1131f6ad-...) |
| MS-DRSR | 微软目录复制服务远程协议 |
| KRBTGT 哈希 | DCSync 的关键目标,可用于黄金票据(Golden Ticket)攻击 |
| 事件 ID 4662 | 目录服务对象访问审计事件 |
| 工具 | 用途 |
|---|---|
| Mimikatz (lsadump::dcsync) | 主要 DCSync 攻击工具 |
| Impacket secretsdump.py | 基于 Python 的 DCSync 实现 |
| DSInternals | 用于 AD 复制的 PowerShell 模块 |
| BloodHound | 映射具有复制权限的账户 |
| Splunk / Elastic | 4662 事件的 SIEM 关联 |
| Microsoft Defender for Identity | 原生 DCSync 检测 |
| CrowdStrike Falcon | 基于 EDR 的 DCSync 检测 |
index=wineventlog EventCode=4662
| where Properties IN ("*1131f6aa-9c07-11d1-f79f-00c04fc2dcd2*",
"*1131f6ad-9c07-11d1-f79f-00c04fc2dcd2*",
"*89e95b76-444d-4c62-991a-0facbeda640c*")
| where NOT match(SubjectUserName, ".*\\$$")
| where NOT SubjectUserName IN ("known_svc_account1", "known_svc_account2")
| stats count values(Properties) as ReplicationRights by SubjectUserName SubjectDomainName Computer
| where count > 0
| table SubjectUserName SubjectDomainName Computer count ReplicationRights
SecurityEvent
| where EventID == 4662
| where Properties has "1131f6ad-9c07-11d1-f79f-00c04fc2dcd2"
or Properties has "1131f6aa-9c07-11d1-f79f-00c04fc2dcd2"
| where SubjectUserName !endswith "$"
| where SubjectUserName !in ("AzureADConnect", "MSOL_*")
| project TimeGenerated, SubjectUserName, SubjectDomainName, Computer, Properties
| sort by TimeGenerated desc
title: DCSync Activity Detected - Non-DC Replication Request
status: stable
logsource:
product: windows
service: security
detection:
selection:
EventID: 4662
Properties|contains:
- '1131f6aa-9c07-11d1-f79f-00c04fc2dcd2'
- '1131f6ad-9c07-11d1-f79f-00c04fc2dcd2'
filter_dc:
SubjectUserName|endswith: '$'
condition: selection and not filter_dc
level: critical
tags:
- attack.credential_access
- attack.t1003.006
lsadump::dcsync /user:krbtgt 提取 KRBTGT 哈希,用于创建黄金票据。secretsdump.py domain/user:password@dc-ip 进行远程 DCSync,提取所有域哈希。Get-ADReplAccount cmdlet 复制特定账户凭据。Hunt ID: TH-DCSYNC-[DATE]-[SEQ]
Alert Severity: Critical
Source Account: [请求复制的账户]
Source Machine: [请求者的主机名/IP]
Target DC: [接收请求的域控制器]
Replication Rights: [访问的 GUID]
Timestamp: [事件时间]
Legitimate DC: [是/否]
Known Service Account: [是/否]
Risk Assessment: [严重 - 检测到非域控制器复制]
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
threat-hunting, active-directory, dcsync, credential-theft, mimikatz
npx claudepluginhub killvxk/cybersecurity-skills-zh --plugin cybersecurity-skills-zh735 skills in this plugin
/acquiring-disk-image-with-dd-and-dcfldd使用 dd 和 dcfldd 创建取证级逐位磁盘镜像,通过哈希验证保持证据完整性。/analyzing-active-directory-acl-abuse使用 ldap3 检测 Active Directory 中危险的 ACL 配置错误,识别 GenericAll、WriteDACL 和 WriteOwner 等滥用路径/analyzing-android-malware-with-apktool使用 apktool 进行反编译、jadx 恢复 Java 源码、androguard 进行权限分析,对 Android APK 恶意软件样本执行静态分析,包括清单检查和可疑 API 调用检测。Other plugins' skills for the same job