Automated Active Directory lab deployment for RedTeam practice. Multi-forest environment with intentional vulnerabilities including Kerberoasting, delegation abuse, ADCS ESC1-ESC15, and more.
Forest 1: redteam.lab (192.168.100.0/24)
├── DC01 (Root DC) - 192.168.100.10
├── dev.redteam.lab (Child Domain)
│ └── DC02 (Child DC) - 192.168.100.11
├── SRV02 (SQL Server) - 192.168.100.12
├── SRV03 (IIS Web) - 192.168.100.13
└── WS01 (Workstation) - 192.168.100.20
Forest 2: external.lab (with trust)
└── DC03 (External DC) - 192.168.100.15
Attacker Machine
└── Kali Linux - 192.168.100.50 (DHCP or static)
-
DC01 - Root Domain Controller
- Install Windows Server 2025
- Run DC01 script parts 1-3
- Verify domain is operational
-
DC02 - Child Domain Controller
- Install Windows Server 2025
- Run DC02 script parts 1-3
- Verify parent-child trust
-
DC03 - External Forest
- Install Windows Server 2025
- Run DC03 script parts 1-3
- Configure conditional forwarder
- Establish forest trust
-
SRV02 - SQL Server
- Install Windows Server 2019
- Run SRV02 script
- Install SQL Server Express
- Run SQL configuration script
- Test SQL connectivity
-
SRV03 - Web Server
- Install Windows Server 2025
- Run SRV03 script
- Verify IIS is running
- Test vulnerable web pages
- WS01 - User Workstation
- Install Windows 11
- Run WS01 script
- Login as domain users
- Verify file shares access
- Establish External Trust
| Machine | RAM | CPU | Disk | OS |
|---|---|---|---|---|
| DC01 | 2GB | 2 | 60GB | Server 2025 |
| DC02 | 2GB | 2 | 60GB | Server 2025 |
| DC03 | 2GB | 2 | 60GB | Server 2025 |
| SRV02 | 4GB | 2 | 80GB | Server 2019 |
| SRV03 | 2GB | 2 | 60GB | Server 2025 |
| WS01 | 4GB | 2 | 60GB | Windows 11 |
| Kali | 4GB | 2 | 80GB | Kali Linux |
Total: 20GB RAM, 14 CPUs, 460GB Disk
- Administrator:
P@ssw0rd123! - Domain Users:
Summer2024! - Service Accounts:
Summer2024! - SQL SA:
SQLAdmin123!
- Administrator:
P@ssw0rd123! - Domain Users:
DevPass2024!
- Administrator:
P@ssw0rd123! - Domain Users:
External2024!
- WS01 localadmin:
LocalAdmin123!
- Unconstrained Delegation - DC01
- Constrained Delegation - SRV03, svc_web
- Resource-Based Constrained Delegation - SRV02
- Kerberoasting - svc_sql, svc_iis, svc_web, svc_app, svc_external
- ACL Abuse - adev → devadmin (GenericAll)
- Trust Relationships - Parent-child and forest trusts
- SQL xp_cmdshell - SRV02
- Command Injection - SRV03 web app
- SQL Injection - SRV03 web app
- Weak Service Permissions - Multiple services
- AlwaysInstallElevated - WS01
- Weak File ACLs - C:\Scripts on WS01
- Scheduled Task Hijacking - BackupTask on WS01
- Saved Credentials - Multiple plaintext credential files
- SMB Signing Disabled - All machines
- LLMNR/NBT-NS Enabled - All machines
- Weak File Shares - SQLBackups, WebFiles
Run these commands to verify your lab:
# Verify domains
Get-ADDomain
Get-ADForest
# Verify trusts
Get-ADTrust -Filter *
# Verify users
Get-ADUser -Filter * | Select Name, SamAccountName
# Verify SPNs
Get-ADUser -Filter {ServicePrincipalName -like "*"} -Properties ServicePrincipalName# Test DNS resolution
nslookup dc01.redteam.lab 192.168.100.10
nslookup dc02.dev.redteam.lab 192.168.100.10
nslookup dc03.external.lab 192.168.100.15
# Test connectivity
ping dc01.redteam.lab
ping srv02.redteam.lab
ping ws01.redteam.lab
# Test SMB shares
smbclient -L //srv02.redteam.lab -N
smbclient -L //srv03.redteam.lab -N- LLMNR/NBT-NS poisoning with Responder
- SMB relay attacks
- Web application exploitation (SQLi, command injection)
- Kerberoasting service accounts
- AlwaysInstallElevated on WS01
- Scheduled task hijacking
- ACL abuse (adev → devadmin)
- Pass-the-Hash attacks
- Overpass-the-Hash
- SQL Server linked servers
- Constrained delegation abuse
- RBCD attacks
- DCSync attacks
- Golden Ticket attacks
- Silver Ticket attacks
- Unconstrained delegation exploitation
- Trust relationship abuse
- Cross-forest attacks
# Essential AD tools
sudo apt update
sudo apt install -y python3-impacket bloodhound neo4j crackmapexec
# Additional tools
sudo apt install -y smbclient nmap responder enum4linux-ng
# Install Rubeus, Mimikatz, PowerView (transfer to Windows machines)
# Download BloodHound ingestorsFrom Windows machine with SharpHound:
.\SharpHound.exe -c All -d redteam.lab --outputdirectory C:\Temp
.\SharpHound.exe -c All -d dev.redteam.lab --outputdirectory C:\Temp
.\SharpHound.exe -c All -d external.lab --outputdirectory C:\TempFrom Linux with bloodhound-python:
bloodhound-python -u jsmith -p 'Summer2024!' -d redteam.lab -ns 192.168.100.10 -c all- Ensure all machines point to DC01 (192.168.100.10) as primary DNS
- Verify forward and reverse lookup zones on DC01
- Verify time synchronization between DCs
- Check DNS resolution between forests
- Verify conditional forwarders are configured
- Ensure SPNs are properly registered
- Verify service accounts have proper permissions
- Check service startup accounts
Take snapshots after each phase:
- After DC configuration (clean domain state)
- After server configuration
- After workstation configuration
- Before each practice session
To reset lab to clean state:
- Revert all VMs to "Clean Configuration" snapshot
- Verify all services are running
- Check domain trust relationships
- Verify DNS resolution
- BloodHound: https://github.com/BloodHoundAD/BloodHound
- PowerView: https://github.com/PowerShellMafia/PowerSploit
- Impacket: https://github.com/SecureAuthCorp/impacket
- NEVER deploy this on production networks
- Use isolated lab network only
- Do not connect to the internet
- Take proper VM snapshots before practice sessions
Good luck with your RedTeam preparation! 🚀