00gxd14g/Windows-ADV-MITRE

GitHub: 00gxd14g/Windows-ADV-MITRE

将 MITRE ATT&CK 技术映射到 Windows 事件 ID 的安全审计工具包,提供策略配置、事件验证与合成攻击日志生成,帮助蓝队检验检测规则的覆盖效果。

Stars: 1 | Forks: 0

# Windows 事件审计与 MITRE ATT&CK 映射 [![Build Status](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/e6d251a1af180554.svg)](https://github.com/00gxd14g/Windows-ADV-MITRE/actions/workflows/windows-docker-tests.yml) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![PowerShell](https://img.shields.io/badge/PowerShell-5.1%2B-blue.svg)](https://microsoft.com/powershell) [![Platform](https://img.shields.io/badge/platform-windows-lightgrey.svg)](https://www.microsoft.com/windows) **[🇹🇷 点击查看土耳其语 README](README.tr.md)** | **[📚 Wiki 文档](docs/WIKI.md)** 本仓库提供了一套完整的工具包,用于配置、测试和验证 Windows 安全审计。它消除了理论检测逻辑(MITRE ATT&CK)与实际实现(Windows 事件日志)之间的隔阂。 ## 🚀 核心功能 * **🛡️ 审计配置**:提供开箱即用的 PowerShell 脚本,用于启用全面的日志记录(类似于 Sysmon 或专注于 MITRE)。 * **🎯 MITRE ATT&CK 映射**:将 Windows 事件 ID 详细映射到特定的攻击技术。 * **🧪 验证工具**:提供脚本以验证您的审计策略是否确实生成了预期的日志。 * **🤖 合成数据**:生成真实的攻击场景(如横向移动、凭证转储)以测试您的 SIEM。 * **🐳 Docker 测试**:使用 Windows 容器提供隔离且可重现的测试环境。 * **📜 Ansible 支持**:使用内置的 Ansible playbook 在您的整个服务器集群中实现部署自动化。 ## 📂 仓库结构 ``` Windows-ADV-MITRE/ ├── scripts/ │ ├── SysmonLikeAudit.ps1 # Advanced audit policy configuration │ ├── win-audit.ps1 # MITRE-guided audit policy │ ├── Test-EventIDGeneration.ps1 # Validation and testing tool │ ├── Generate-SyntheticLogs.ps1 # Synthetic log generator │ └── Local-DockerTest.ps1 # Docker helper script ├── ansible/ # Ansible automation │ ├── site.yml # Main playbook │ └── inventory.yml # Example inventory ├── docs/ │ ├── EVENT_IDS.md # Event ID reference │ ├── MITRE_ATTACK_MAPPING.md # Attack technique mappings │ └── WIKI.md # Comprehensive guide └── .github/workflows/ # CI/CD automation ``` ## 🏁 快速开始 ### 1. 配置审计 以**管理员**身份运行 PowerShell 并选择您的配置: ``` # 选项 A:Comprehensive(推荐)- 启用详细的日志记录,包括 Process Creation 参数 .\scripts\SysmonLikeAudit.ps1 # 选项 B:MITRE Focused - 针对特定技术检测进行优化 .\scripts\win-audit.ps1 ``` ### 2. 验证配置 确保您的策略处于活动状态并且正在生成事件: ``` .\scripts\Test-EventIDGeneration.ps1 -TestEventGeneration ``` **预期输出:** ``` ╔════════════════════════════════════════════╗ ║ Windows Audit Configuration Check ║ ╚════════════════════════════════════════════╝ [PASS] Administrator Privileges [PASS] Event Log Service Status [PASS] Audit Policy: Process Creation [PASS] Audit Policy: Object Access [PASS] Registry: Process Command Line Logging [PASS] Registry: PowerShell Script Block Logging ✓ Configuration verified successfully. ``` ### 3. 生成测试数据 通过模拟攻击流量来测试您的检测规则: ``` .\scripts\Generate-SyntheticLogs.ps1 -Scenario LateralMovement ``` **预期输出:** ``` ======================================== Synthetic Windows Event Log Generator ======================================== [*] Scenario: LateralMovement [+] Generating Event 4624 (Logon Type 3 - Network)... [+] Generating Event 5140 (Share Access)... [+] Generating Event 4648 (Explicit Credential Logon)... Successfully generated 15 events to .\SyntheticLogs ``` ## 🐳 Docker 测试 不想弄乱您的主机?使用我们的 Docker 环境吧! ``` # 构建 image,启动 container,并运行所有测试 .\scripts\Local-DockerTest.ps1 -Action All ``` 这将启动一个 Windows Server Core 容器,应用审计策略,运行验证套件,并为您提供报告——这一切都无需触碰您的本地注册表。 ## 📜 Ansible 自动化 使用我们的 Ansible playbook 在您的整个服务器集群中扩展您的安全配置。 ``` # 1. 更新 inventory nano ansible/inventory.yml # 2. 运行 playbook ansible-playbook -i ansible/inventory.yml ansible/site.yml --ask-vault-pass ``` 此 playbook 复制了全面的 `SysmonLikeAudit` 配置,确保您所有的 Windows 服务器具有一致的安全态势。详情请参阅 [ansible/README.md](ansible/README.md)。 ## 📚 文档 * **[Wiki](docs/WIKI.md)**:所有文档的中心枢纽。 * **[事件 ID 参考](docs/EVENT_IDS.md)**:事件 4688 是什么意思?在这里寻找答案。 * **[MITRE 映射](docs/MITRE_ATTACK_MAPPING.md)**:哪些事件可以检测到“凭证转储”? ## 🤝 贡献 欢迎贡献代码。如有重大更改,请提交 Issue,或者提交一个包含相关验证结果的、专注的 Pull Request。 1. Fork 本项目 2. 创建您的功能分支 (`git checkout -b feature/AmazingFeature`) 3. 提交您的更改 (`git commit -m 'Add some AmazingFeature'`) 4. 推送到该分支 (`git push origin feature/AmazingFeature`) 5. 发起一个 Pull Request ## 📄 许可证 基于 MIT 许可证分发。更多信息请参阅 `LICENSE`。
标签:AI合规, Ansible, Cloudflare, Docker, IPv6, Libemu, MITRE ATT&CK, PowerShell, SIEM测试, 安全防御评估, 检测验证, 系统提示词, 请求拦截