Hamza-Elkodsh/Active-Directory-Attack-Lab

GitHub: Hamza-Elkodsh/Active-Directory-Attack-Lab

一套完整的 Windows Server 2019 Active Directory 攻防实验环境,结合攻击演练与防御检测,帮助安全从业者在隔离环境中掌握企业内网渗透与加固技术。

Stars: 0 | Forks: 0

# 🛡️ Active Directory 攻防实验室 ![License](https://img.shields.io/badge/license-MIT-blue.svg) ![Platform](https://img.shields.io/badge/platform-Windows%20Server%202019-blue) ![Status](https://img.shields.io/badge/status-active-brightgreen) ![Offensive Security](https://img.shields.io/badge/category-Offensive%20Security-red) ![Defensive Security](https://img.shields.io/badge/category-Defensive%20Security-blue) ## ⚠️ 法律免责声明 ## 📌 目录 - [概述](#overview) - [实验室架构](#lab-architecture) - [前置条件](#prerequisites) - [快速开始](#quick-start) - [项目结构](#project-structure) - [攻击模块](#attack-modules) - [防御模块](#defense-modules) - [使用工具](#tools-used) - [贡献指南](#contributing) - [参考资料](#references) - [许可证](#license) ## 🔍 概述 本实验室模拟了一个真实的企业 Active Directory 环境,该环境容易受到现实红队演练和渗透测试中常见的错误配置和攻击技术的影响。 本项目分为两大支柱: | 支柱 | 描述 | |--------|-------------| | 🔴 **攻击** | 逐步的攻击演练,涵盖侦察、凭证攻击、横向移动、权限提升和权限维持 | | 🔵 **防御** | 检测规则 (Sigma/Splunk)、加固指南、GPO 模板以及针对所涵盖各种攻击的监控策略 | 这种双重方法确保本实验室适用于以下人群: - 准备参加 OSCP、CRTE 或 CRTO 认证的渗透测试人员 - 构建检测能力的蓝队成员 - 学习 AD 加固的安全工程师 - 在安全环境中探索攻击性安全的学生 ## 🏗️ 实验室架构 ``` ┌─────────────────────────────────────────────────────────┐ │ LAB NETWORK (192.168.56.0/24) │ │ │ │ ┌──────────────────┐ ┌───────────────────────┐ │ │ │ DC01 │ │ WS01 (Windows 10) │ │ │ │ Domain Controller│◄────►│ Workstation 1 │ │ │ │ 192.168.56.10 │ │ 192.168.56.20 │ │ │ │ lab.local │ └───────────────────────┘ │ │ └──────────────────┘ │ │ ▲ ┌───────────────────────┐ │ │ │ │ WS02 (Windows 10) │ │ │ └──────────────►│ Workstation 2 │ │ │ │ 192.168.56.21 │ │ │ ┌──────────────────┐ └───────────────────────┘ │ │ │ Kali Linux │ │ │ │ Attacker Machine │◄──── All attack traffic │ │ │ 192.168.56.100 │ │ │ └──────────────────┘ │ └─────────────────────────────────────────────────────────┘ ``` **Domain:** `lab.local` **Forest Functional Level:** Windows Server 2016 **Domain Functional Level:** Windows Server 2016 ## ✅ 前置条件 ### 软件要求 | 工具 | 版本 | 用途 | |------|---------|---------| | [VirtualBox](https://www.virtualbox.org/) | 7.0+ | 虚拟化平台 | | [Vagrant](https://www.vagrantup.com/) | 2.3+ | 虚拟机配置 | | [Git](https://git-scm.com/) | 最新版 | 克隆此仓库 | | Windows Server 2019 ISO | - | 域控制器 | | Windows 10 ISO | - | 工作站 | | Kali Linux | 2024+ | 攻击机 | ### 硬件要求 | 资源 | 最低配置 | 推荐配置 | |----------|---------|-------------| | RAM | 8 GB | 16 GB | | CPU 核心 | 4 | 8 | | 磁盘空间 | 60 GB | 100 GB | ### 知识要求 - 基础网络知识 (TCP/IP、DNS、DHCP) - 熟悉 Windows 环境 - 基础的 Linux 命令行操作 ## 🚀 快速开始 ``` # 1. Clone the repository git clone https://github.com/YOUR_USERNAME/Active-Directory-Attack-Lab.git cd Active-Directory-Attack-Lab # 2. 安装 Vagrant plugins vagrant plugin install vagrant-reload # 3. 启动实验环境 cd lab-setup vagrant up # 4. 验证所有 VM 均在运行 vagrant status # 5. 从第一个攻击模块开始 cd ../attacks/01-recon cat README.md ``` ## 📁 项目结构 ``` Active-Directory-Attack-Lab/ │ ├── README.md ← You are here ├── DISCLAIMER.md ← Legal disclaimer ├── LICENSE ← MIT License ├── CHANGELOG.md ← Version history ├── .gitignore ← Git ignore rules │ ├── lab-setup/ ← VM provisioning and configuration ├── attacks/ ← Offensive attack modules (01–05) ├── defense/ ← Detection, hardening, and monitoring ├── reporting/ ← Pentest report templates ├── resources/ ← Wordlists, cheatsheets, references └── scripts/ ← Automation and utility scripts ``` ## ⚔️ 攻击模块 | # | 模块 | 涵盖技术 | |---|--------|--------------------| | 01 | [侦察](./attacks/01-recon/) | Nmap、BloodHound、Enum4linux、LDAP Enumeration | | 02 | [凭证攻击](./attacks/02-credential-attacks/) | Kerberoasting、AS-REP Roasting、Password Spraying、Pass-the-Hash | | 03 | [横向移动](./attacks/03-lateral-movement/) | Pass-the-Ticket、WinRM、WMI、PsExec | | 04 | [权限提升](./attacks/04-privilege-escalation/) | ACL Abuse、GPO Abuse、Constrained Delegation、AD CS | | 05 | [权限维持](./attacks/05-persistence/) | Golden Ticket、Silver Ticket、Skeleton Key、DCSync | ## 🛡️ 防御模块 | 模块 | 覆盖范围 | |--------|----------| | [检测](./defense/detections/) | Sigma 规则、Splunk 查询、Windows 事件 ID | | [加固](./defense/hardening/) | AD 分层模型、PAW、GPO 模板 | | [监控](./defense/monitoring/) | SIEM 集成、蜜罐账户 | ## 🧰 使用工具 ### 攻击工具 - [BloodHound](https://github.com/BloodHoundAD/BloodHound) — AD 关系可视化 - [Impacket](https://github.com/fortra/impacket) — 用于网络协议的 Python 类库 - [CrackMapExec](https://github.com/byt3bl33d3r/CrackMapExec) — AD 渗透测试的瑞士军刀 - [Mimikatz](https://github.com/gentilkiwi/mimikatz) — 凭证提取 - [Rubeus](https://github.com/GhostPack/Rubeus) — Kerberos 交互与滥用 - [Evil-WinRM](https://github.com/Hackplayers/evil-winrm) — WinRM shell ### 防御工具 - [Sigma](https://github.com/SigmaHQ/sigma) — 通用 SIEM 检测规则 - [Splunk](https://www.splunk.com/) — 日志分析与 SIEM - [Sysmon](https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon) — Windows 事件监控 ## 📚 参考资料 - [Microsoft AD 文档](https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/) - [SpecterOps BloodHound 文档](https://bloodhound.readthedocs.io/) - [The Hacker Recipes](https://www.thehacker.recipes/) - [HackTricks — Active Directory](https://book.hacktricks.xyz/windows-hardening/active-directory-methodology) - [PayloadsAllTheThings — AD 攻击](https://github.com/swisskyrepo/PayloadsAllTheThings) - [MITRE ATT&CK — Enterprise](https://attack.mitre.org/) ## 📄 许可证 本项目基于 MIT 许可证授权 — 详情请参见 [LICENSE](./LICENSE)。

为学习而构建。请负责任地使用。🔐

标签:Active Directory, BloodHound, CRTE, CRTO, GitHub Advanced Security, GPO模板, Impacket, Mimikatz, Modbus, OSCP, PE 加载器, Plaso, Sigma规则, Web报告查看器, Windows Server 2019, 协议分析, 域渗透, 安全加固, 攻防演练实验室, 权限提升, 构建工具, 模拟器, 横向移动, 电子数据取证, 目标导入, 编程规范, 网络安全, 网络安全审计, 隐私保护