hunting-for-dcsync-attacks
通过分析 Windows 事件 ID 4662,检测非域控制器账户发起的未授权 DS-Replication-Get-Changes 请求,从而发现 DCSync 攻击。
Best use case
hunting-for-dcsync-attacks is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
通过分析 Windows 事件 ID 4662,检测非域控制器账户发起的未授权 DS-Replication-Get-Changes 请求,从而发现 DCSync 攻击。
Teams using hunting-for-dcsync-attacks 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/hunting-for-dcsync-attacks/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How hunting-for-dcsync-attacks Compares
| Feature / Agent | hunting-for-dcsync-attacks | 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?
通过分析 Windows 事件 ID 4662,检测非域控制器账户发起的未授权 DS-Replication-Get-Changes 请求,从而发现 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
# 狩猎 DCSync 攻击 ## 适用场景 - 狩猎 DCSync 凭据窃取行为(MITRE ATT&CK T1003.006)时 - 在环境中检测到 Mimikatz 或类似工具后 - 涉及 Active Directory 失陷的事件响应期间 - 监控未授权的域复制请求时 - 紫队演练测试 AD 攻击检测时 ## 前置条件 - 启用 Windows 安全事件日志转发(事件 ID 4662) - 通过组策略启用"审核目录服务访问" - 在域对象上配置域计算机 SACL 以检测机器账户 - 已接入 Windows 事件数据的 SIEM(Splunk、Elastic、Sentinel) - 了解合法的域控制器账户和复制伙伴 ## 工作流程 1. **启用审计**:确保在域控制器上启用"审核目录服务访问"。 2. **收集事件**:收集 AccessMask 为 0x100(控制访问)的 Windows 事件 ID 4662。 3. **过滤复制 GUID**:搜索 DS-Replication-Get-Changes 和 DS-Replication-Get-Changes-All。 4. **识别非 DC 来源**:标记 SubjectUserName 非域控制器机器账户的事件。 5. **关联网络数据**:将源 IP 与已知 DC 地址进行交叉比对。 6. **验证发现**:排除合法的复制工具(Azure AD Connect、SCCM)。 7. **响应**:禁用失陷账户、重置 krbtgt、调查横向移动。 ## 核心概念 | 概念 | 描述 | |------|------| | DCSync | 滥用 AD 复制协议提取密码哈希的技术 | | 事件 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 | 控制访问权限,表示扩展权限验证 | | T1003.006 | OS 凭据转储:DCSync | ## 工具与系统 | 工具 | 用途 | |------|------| | Windows 事件查看器 | 直接分析事件日志 | | Splunk | 事件 4662 的 SIEM 关联分析 | | Elastic Security | DCSync 模式检测规则 | | Mimikatz lsadump::dcsync | 执行 DCSync 的攻击工具 | | Impacket secretsdump.py | 基于 Python 的 DCSync 实现 | | BloodHound | 识别具有复制权限的账户 | ## 输出格式 ``` 狩猎 ID:TH-DCSYNC-[日期]-[序号] 技术:T1003.006 域控制器:[DC 主机名] 主体账户:[执行复制的账户] 源 IP:[非 DC IP 地址] 访问的 GUID:[复制 GUID] 风险等级:[严重/高/中/低] 建议操作:[禁用账户、重置 krbtgt、展开调查] ```
Related Skills
performing-threat-hunting-with-yara-rules
使用 YARA 模式匹配规则在文件系统和内存转储中狩猎恶意软件、可疑文件和入侵指标。 涵盖规则编写、yara-python 扫描以及与威胁情报源的集成。
performing-threat-hunting-with-elastic-siem
使用 KQL/EQL 查询、检测规则和 Timeline 调查在 Elastic Security SIEM 中执行主动威胁狩猎, 识别绕过自动检测的威胁。适用于 SOC 团队针对特定 ATT&CK 技术进行狩猎、调查异常行为, 或使用 Elasticsearch 和 Kibana Security 验证检测覆盖缺口。
hunting-living-off-the-land-binaries
检测 Windows 事件日志和 Sysmon 遥测数据中对离地攻击(Living Off The Land Binaries,LOLBAS)的滥用, 包括 certutil、wmic、mshta、regsvr32 和 rundll32 等工具。 通过将进程创建事件与 LOLBAS 项目数据库交叉比对来构建检测规则。 适用于针对无文件攻击技术的威胁狩猎或构建 SIEM 检测规则的场景。
hunting-for-webshells-in-web-servers
通过扫描高熵值文件、可疑的 PHP/JSP/ASP 模式(eval、base64_decode、system、passthru)、 Web 根目录中近期修改的文件以及异常文件大小,检测植入 Web 服务器的 Webshell(网页后门)。 使用香农熵(Shannon entropy)计算标记混淆载荷,并通过正则表达式模式匹配已知 Webshell 特征。
hunting-for-webshell-activity
通过分析 Web 目录中的文件创建行为、Web 服务器异常进程派生以及异常 HTTP 模式,狩猎面向互联网服务器上的 Webshell 部署。
hunting-for-unusual-service-installations
通过解析系统事件日志中的事件 ID 7045、分析服务二进制路径并识别持久化机制指标,检测可疑 Windows 服务安装(MITRE ATT&CK T1543.003)。
hunting-for-unusual-network-connections
通过分析出站流量模式、稀有目标地址、非标准端口和终端异常连接频率,狩猎异常网络连接。
hunting-for-supply-chain-compromise
狩猎供应链入侵指标,包括木马化软件更新、受损依赖项、未授权代码修改和被篡改的构建产物。
hunting-for-startup-folder-persistence
通过监控 Windows 启动目录中的可疑文件创建、分析 autoruns 条目以及使用 Python watchdog 进行实时文件系统监控,检测 T1547.001 启动文件夹持久化。
hunting-for-spearphishing-indicators
跨电子邮件日志、终端遥测和网络数据狩猎鱼叉式网络钓鱼活动指标,检测定向邮件攻击。
hunting-for-shadow-copy-deletion
通过监控 vssadmin、wmic 和 PowerShell 卷影副本命令,狩猎表明勒索软件准备或反取证活动的卷影副本删除行为。
hunting-for-scheduled-task-persistence
通过分析任务创建事件、可疑任务操作和异常调度模式,狩猎攻击者通过 Windows 计划任务实现的持久化。