yu-tanaka961/detection-engineering-sigma-rules
GitHub: yu-tanaka961/detection-engineering-sigma-rules
整合 SigmaHQ、Elastic、Splunk ESCU 和 Azure Sentinel 四大检测源的 Sigma 规则集,提供针对 PowerShell 和 DCSync 攻击技术的分层威胁检测方案。
Stars: 0 | Forks: 0
# 检测工程 — Sigma 规则
用于威胁检测的跨源统一 Sigma 规则,通过汇总和分析来自 SigmaHQ、Elastic、Splunk ESCU 和 Azure Sentinel 的检测逻辑构建而成。
## 仓库结构
```
detection-engineering-sigma-rules/
├── rules/
│ ├── t1059_001_powershell/ # MITRE ATT&CK T1059.001
│ │ ├── tier1_base64_encoded_powershell.yml
│ │ ├── tier1_susp_parameter_combination.yml
│ │ ├── tier1_download_execute_pattern.yml
│ │ ├── tier2_suspicious_parent_process.yml
│ │ ├── tier2_amsi_bypass_attempt.yml
│ │ └── tier2_scriptblock_malicious_cmdlets.yml
│ └── t1003_006_dcsync/ # MITRE ATT&CK T1003.006
│ ├── tier1_dcsync_replication_rights.yml
│ ├── tier1_dcsync_tool_execution.yml
│ ├── tier2_dcsync_scriptblock.yml
│ ├── tier2_dcsync_network_drsuapi.yml
│ └── tier2_dcsync_permission_delegation.yml
└── docs/
├── t1059_001_cross_source_analysis.md
└── t1003_006_cross_source_analysis.md
```
## 规则集
### T1059.001 — PowerShell 执行
6 条统一的 Sigma 规则,涵盖基于 PowerShell 威胁的完整攻击生命周期。
| 规则 | 层级 | 等级 | 日志来源 | 规避抵抗力 |
|---|---|---|---|---|
| [Base64 编码命令](rules/t1059_001_powershell/tier1_base64_encoded_powershell.yml) | 1 | 高 | process_creation | 中 |
| [可疑参数组合](rules/t1059_001_powershell/tier1_susp_parameter_combination.yml) | 1 | 高 | process_creation | 中 |
| [下载并执行模式](rules/t1059_001_powershell/tier1_download_execute_pattern.yml) | 1 | 高 | process_creation | 中 |
| [可疑父进程](rules/t1059_001_powershell/tier2_suspicious_parent_process.yml) | 2 | 严重 | process_creation | 高 |
| [AMSI 绕过尝试](rules/t1059_001_powershell/tier2_amsi_bypass_attempt.yml) | 2 | 严重 | ps_script | 高 |
| [通过 ScriptBlock 执行恶意 Cmdlet](rules/t1059_001_powershell/tier2_scriptblock_malicious_cmdlets.yml) | 2 | 严重 | ps_script | 高 |
### T1003.006 — DCSync
5 条统一的 Sigma 规则,跨越完整杀伤链检测 DCSync 攻击:权限委派、工具执行、协议级复制以及基于 PowerShell 的攻击。
| 规则 | 层级 | 等级 | 日志来源 | 规避抵抗力 |
|---|---|---|---|---|
| [复制权限 (4662)](rules/t1003_006_dcsync/tier1_dcsync_replication_rights.yml) | 1 | 严重 | security (4662) | 高 |
| [工具执行](rules/t1003_006_dcsync/tier1_dcsync_tool_execution.yml) | 1 | 严重 | process_creation | 中 |
| [ScriptBlock DCSync](rules/t1003_006_dcsync/tier2_dcsync_scriptblock.yml) | 2 | 严重 | ps_script (4104) | 高 |
| [网络 DRSUAPI 异常](rules/t1003_006_dcsync/tier2_dcsync_network_drsuapi.yml) | 2 | 高 | network_connection | 高 |
| [权限委派 (5136)](rules/t1003_006_dcsync/tier2_dcsync_permission_delegation.yml) | 2 | 严重 | security (5136) | 高 |
### 分层策略
- **层级 1**:高置信度、广覆盖的规则。立即部署,只需极少调整。
- **层级 2**:高价值规则,需要针对特定环境进行调整。必须启用 ScriptBlock 日志记录(EventID 4104)。
## 自定义元数据标签
规则使用扩展标签对检测质量维度进行编码:
| 标签 | 含义 |
|---|---|
| `x-source.sigmahq` | 逻辑源自 SigmaHQ |
| `x-source.elastic-detection-rules` | 逻辑源自 Elastic detection-rules |
| `x-source.splunk-escu` | 逻辑源自 Splunk ESCU |
| `x-source.azure-sentinel` | 逻辑源自 Azure Sentinel |
| `x-evasion-resistance.high` | 对手在架构上难以规避 |
| `x-evasion-resistance.medium` | 可通过混淆或工具更换绕过 |
| `x-drs.dq-coverage` | 映射到 DRS 检测质量:覆盖维度 |
| `x-drs.dq-precision` | 映射到 DRS 检测质量:精度维度 |
| `x-drs.ed-log-evasion-resistance` | 映射到 DRS 规避难度:日志规避抵抗力 |
| `x-drs.ed-tool-change-resistance` | 映射到 DRS 规避难度:工具更换抵抗力 |
## 日志来源要求
| 日志来源 | EventID | 用途 |
|---|---|---|
| Sysmon EventID 1 / Security 4688 | process_creation | 层级 1 进程规则 |
| PowerShell ScriptBlock 日志记录 | 4104 | 层级 2 ScriptBlock 规则 |
| Windows Security DS Access | 4662 | DCSync 复制检测 |
| Windows Security DS Changes | 5136 | DCSync 权限委派 |
| Sysmon NetworkConnect | 3 | DCSync 网络异常 |
## 参考
- [MITRE ATT&CK T1059.001](https://attack.mitre.org/techniques/T1059/001/)
- [MITRE ATT&CK T1003.006](https://attack.mitre.org/techniques/T1003/006/)
- [SigmaHQ](https://github.com/SigmaHQ/sigma)
- [Elastic detection-rules](https://github.com/elastic/detection-rules)
- [Splunk security_content](https://github.com/splunk/security_content)
- [Azure Sentinel Detections](https://github.com/Azure/Azure-Sentinel)
- [T1059.001 跨源分析](docs/t1059_001_cross_source_analysis.md)
- [T1003.006 跨源分析](docs/t1003_006_cross_source_analysis.md)
## 作者
Yuhei Tanaka
标签:AI合规, AMSI绕过, Sigma规则, 威胁检测, 安全, 目标导入, 超时处理