Active Directory (AD) still runs identity for the overwhelming majority of enterprises, and almost every intrusion that reaches a corporate network ends up touching it. If you want to learn AD attacks, AD detections, DFIR, GPO hardening, or just how a Windows domain actually fits together, there is no substitute for building one yourself and breaking it on purpose.
This guide builds a complete, self-contained AD lab on Windows Server 2022 as the domain controller, with a Windows 11 client joined to the domain, an optional member server, and an attacker box. We cover three hypervisor methods (VirtualBox, VMware Workstation, and Proxmox VE), then drive the whole build with PowerShell so it is repeatable. Everything here runs on hardware you own, on an isolated internal network. Only ever attack machines inside your own lab.
◈ Table of Contents
01 — WHAT AN AD LAB IS & WHY BUILD ONE
BEGINNERAn Active Directory home lab is a small, isolated Windows domain running entirely inside virtual machines on your own computer. At its core sits a domain controller (DC) — a Windows Server that stores the directory database (NTDS.dit), authenticates users via Kerberos and NTLM, and answers DNS. Around it you add domain-joined clients and member servers, exactly as a real network would. Because it is fully isolated, you can run malware, dump credentials, and detonate exploits without any real-world risk.
A minimum viable lab is just two VMs:
Start with the two-VM minimum and get a clean domain join working end-to-end before you add a member server, a second DC, or an attacker box. Every extra machine multiplies the number of things that can silently break your DNS.
Whether you are heading into red team, blue team, or IT administration, a working AD lab is the single most reused piece of infrastructure in your career. It is the prerequisite for nearly every other tutorial we publish — Kerberoasting, BloodHound, DCSync, Mimikatz, LLMNR poisoning, GPO abuse, and detection engineering in Sentinel or Splunk all assume you have a domain to point them at.
Offensive Practice
Run Kerberoasting, AS-REP roasting, Pass-the-Hash and DCSync against a domain you are allowed to destroy.
Detection Engineering
Generate real Windows event logs (4624, 4768, 4769, 4662) and write and tune detections against them.
Admin & Hardening
Learn GPOs, OU design, delegation, LAPS and tiered admin without touching production.
Certification Prep
Directly supports OSCP, CRTP, PNPT and Security+ objectives that assume hands-on AD experience.
Everything in this lab is intentionally weak (default configs, weak passwords, no MFA). Never bridge this network to your home LAN or the internet in "attacker practice" mode. Keep it on an isolated/internal virtual network at all times.
02 — PREREQUISITES & REQUIREMENTS
BEGINNERThe single biggest constraint is RAM. Each Windows VM wants 2–4 GB, so a minimum lab needs a host with 8 GB free; 16 GB makes the two-VM lab comfortable and 32 GB lets you run the full topology plus an attacker. An SSD is effectively mandatory — Windows Server on a spinning disk is painful.
Windows Server 2022 with the Desktop Experience needs at least 2 GB RAM and 32 GB disk per Microsoft's baseline; in practice give the DC 4 GB and 60 GB so it does not thrash. These are per-VM figures for a lab, not production sizing.
| Role | vCPU | RAM | Disk | OS |
|---|---|---|---|---|
| DC01 (domain controller) | 2 | 4 GB | 60 GB | Windows Server 2022 |
| SRV01 (member server) | 2 | 2–4 GB | 50 GB | Windows Server 2022 |
| WKS01 (client) | 2 | 4 GB | 50 GB | Windows 11 Pro/Ent |
| Attacker (optional) | 2 | 4 GB | 40 GB | Kali Linux 2026 |
| HOST minimum (2 VMs) | 4 | 16 GB | 256 GB SSD | 8 GB works but is tight |
All of the operating systems here are available as free evaluation media directly from the vendors. Server and Windows 11 evaluations run 180 days and 90 days respectively, which is more than enough for a lab, and both can be rearmed. Download only from official sources.
| Item | Where | Notes |
|---|---|---|
| Windows Server 2022 | Microsoft Evaluation Center | 180-day eval ISO, Desktop Experience |
| Windows 11 Enterprise | Microsoft Evaluation Center | 90-day eval; Pro/Ent can domain-join (Home cannot) |
| VirtualBox + Ext Pack | virtualbox.org | Free, GPL; cross-platform |
| VMware Workstation | Broadcom / VMware | Workstation Pro is free for personal use |
| Proxmox VE 8 ISO | proxmox.com | For a dedicated lab server / old PC |
| Kali Linux 2026 | kali.org | Pre-built VM images available |
Windows 11 Home cannot join an AD domain — the "join a domain" option is greyed out. You must use Pro, Enterprise, or Education. The evaluation Enterprise ISO is the easiest legitimate choice for a lab.
Decide your addressing and names before you build. AD depends entirely on DNS: every domain member must use the DC as its DNS server, or nothing works. We use a private 10.10.10.0/24 range on an isolated virtual switch, with the DC holding a static IP that also serves as the DNS server for the whole domain.
| Setting | Value | Why |
|---|---|---|
| Domain (FQDN) | cyberhawk.lab | Use a name you do not own on the internet |
| NetBIOS name | CYBERHAWK | Pre-Windows 2000 domain name |
| DC01 IP | 10.10.10.10 /24 | Static; also the DNS server |
| Gateway | 10.10.10.1 (or none) | None keeps the lab fully offline |
| Client DNS | 10.10.10.10 | MUST point at the DC, never 8.8.8.8 |
Do not use a real registered domain (like example.com) or a TLD such as .local that collides with mDNS on some networks. A clearly fake internal name like cyberhawk.lab avoids split-brain DNS headaches.
03 — METHOD 1: VIRTUALBOX (FREE, RECOMMENDED FOR BEGINNERS)
BEGINNERVirtualBox is free, cross-platform, and perfectly capable of running this lab. The key trick is the network mode: use an Internal Network so the VMs can talk to each other and nothing else. This keeps your intentionally-vulnerable domain off your real LAN.
Install VirtualBox and the Extension Pack, then create the DC VM. VirtualBox has a headless VBoxManage CLI that makes VM creation scriptable — useful once you have done it by hand once. The commands below create a 4 GB / 2–vCPU VM named DC01 on an internal network called adlab.
Prefer the GUI first time round: New → name "DC01", type Microsoft Windows / Windows 2022, 4096 MB RAM, create a 60 GB VDI, then Settings → Network → Adapter 1 → Attached to "Internal Network", name "adlab". The VBoxManage script just automates that exact configuration.
Boot the VM from the ISO and step through Windows Setup. The one choice that matters: pick an edition ending in (Desktop Experience) — the plain edition installs Server Core with no GUI, which is harder for a first lab. Choose a Custom install onto the empty 60 GB disk and set a strong local Administrator password.
- 1Select language/keyboard → Install now.
- 2Edition: choose
Windows Server 2022 Standard (Desktop Experience). - 3Accept the license → choose Custom: Install Windows only.
- 4Select the 60 GB disk → Next. Windows copies files and reboots.
- 5Set the Administrator password (e.g.
P@ssw0rd!Lab2026for a lab). - 6Install VirtualBox Guest Additions: Devices menu → Insert Guest Additions CD → run the installer → reboot.
Take a VirtualBox snapshot named "clean-install" right after Guest Additions and before any AD configuration. If you fat-finger the DC promotion, you can roll back in seconds instead of reinstalling Windows.
04 — METHOD 2: VMWARE WORKSTATION PRO
BEGINNERVMware Workstation Pro is now free for personal use and gives noticeably snappier Windows guests than VirtualBox on most hardware. The equivalent of VirtualBox's Internal Network is a custom Host-only / LAN Segment. LAN Segments are the cleanest option — VMs on the same segment talk only to each other.
Build the DC VM through the New Virtual Machine wizard, then isolate its NIC on a LAN Segment so the vulnerable domain never touches your physical network. The steps below produce the same 4 GB / 60 GB DC as Method 1.
- 1File → New Virtual Machine → Typical → point to
WS2022_EVAL.iso. - 2Guest OS: Windows Server 2022. Name it DC01, 60 GB disk, store as a single file.
- 3Customize Hardware → Memory 4096 MB, Processors 2.
- 4Network Adapter → LAN Segment → Add a segment named
adlab→ assign it. - 5Finish, boot, and install Windows Server exactly as in Method 1, Step 02.
- 6Install VMware Tools (VM menu → Install VMware Tools) and reboot.
VMware Workstation snapshots support a tree with named branches. Snapshot each VM at "clean-install", "post-promotion", and "populated" so you can jump to any lab state instantly — invaluable when a destructive attack trashes the domain.
Rather than installing Windows again for every machine, build one "golden" Windows 11 VM, sysprep-generalise it, then use linked clones to spin up clients cheaply. Linked clones share the base disk, so five clients cost only their deltas — huge disk savings on a laptop.
- 1Right-click the powered-off golden VM → Manage → Clone.
- 2Choose Create a linked clone → name it
WKS01. - 3Ensure the clone's NIC is on the same
adlabLAN Segment. - 4Boot, finish OOBE, rename, then domain-join (Section 08).
05 — METHOD 3: PROXMOX VE (DEDICATED LAB SERVER)
INTERMEDIATEIf you have a spare PC or a mini-server, Proxmox VE 8 turns it into a proper always-on type-1 hypervisor you can reach from a browser. It scales far better than a desktop hypervisor and is the right foundation if you want a persistent range with a SIEM and multiple domains. This section assumes Proxmox is already installed on the metal.
Create an internal-only Linux bridge with no physical uplink — the Proxmox equivalent of VirtualBox's Internal Network. VMs attached to it are isolated from the outside world. Then upload the Windows ISOs to local storage.
Proxmox's qm CLI provisions VMs in one shot. Windows guests need the VirtIO driver ISO mounted as a second CD during install (for the network and disk drivers), or you can use SATA/e1000 for simplicity on a first build. The command below creates VM 101 as DC01 on the isolated vmbr1.
For a repeatable, fully-automated range on Proxmox, look at open-source range builders like GOAD (Game of Active Directory) and Ludus, which use Vagrant/Ansible to stand up an entire vulnerable multi-domain forest with one command. Build a domain by hand first so you understand what the automation is doing.
06 — INITIAL CONFIG & DOMAIN CONTROLLER PROMOTION
COREThis is the heart of the build. From here everything is driven with PowerShell run as Administrator on DC01, so the process is identical regardless of which hypervisor you chose. Three things happen in order: set a static IP, rename the server, then install and promote Active Directory.
A domain controller must have a fixed IP — clients will hardcode it as their DNS server. Set the static address, point the DC's own DNS at itself, and rename the machine to DC01 before promotion (renaming a DC afterwards is far messier). Find your interface name first with Get-NetAdapter.
If you left a gateway of 10.10.10.1 but there is no router VM on the internal network, that is fine — the lab stays offline. Do NOT set the client's DNS to a public resolver like 8.8.8.8; domain join and Kerberos will fail because clients must resolve SRV records from the DC.
After the rename reboot, install the Active Directory Domain Services role and its management tools. This stages the binaries but does not yet make the server a DC — that is the promotion step that follows.
- Success : True, ExitCode : Success
- AD-Domain-Services shows [X] Installed
- No reboot required yet — promotion triggers the reboot
Now promote DC01 into the first domain controller of a brand-new forest called cyberhawk.lab. Install-ADDSForest installs DNS automatically, sets the forest/domain functional levels, and prompts for the Directory Services Restore Mode (DSRM) password. When it finishes, the server reboots as a live DC.
WinThreshold is the functional level for Windows Server 2016 and is the highest AD forest level Microsoft ships — Server 2019 and 2022 do not introduce new levels. Using it keeps the forest modern while remaining compatible with any Windows client you add.
07 — CORE CONFIG: DNS, DHCP, OUs, USERS & GPO
COREA bare domain with one Administrator is not a useful lab. Here we build the organisational structure a real domain has — a reverse DNS zone, DHCP for clients, organisational units, users and groups, and a first Group Policy. All of it is scripted so you can rebuild instantly.
Forward DNS was created during promotion; add a reverse lookup zone so PTR records resolve. It is not strictly required for a domain to function, but many tools and logs expect reverse resolution, and it makes the lab behave like a real network.
DHCP lets clients on the internal network get an address automatically and, crucially, receive the DC as their DNS server via option 006. Install the role, authorize it in AD, and create a scope for the lab subnet.
DHCP option 006 (DNS) must point to the DC (10.10.10.10). If a client ever picks up a public DNS server, it will not find the domain's SRV records and every logon and Group Policy update will fail with cryptic errors.
Organisational Units are how you group objects for delegation and GPO targeting. A realistic lab mirrors a small company: departments for users, plus containers for workstations and servers. Build them with a loop so it is trivial to reproduce.
Populate the domain with users so attacks and detections have something to chew on. The snippet below creates a batch of enabled users in the IT OU, then a security group, then adds them to it. In a real lab you would import a CSV, but this shows the mechanics.
To deliberately create a Kerberoastable account, register a Service Principal Name on a user: setspn -s HTTP/srv01.cyberhawk.lab CYBERHAWK\svc_web. Give it a weak password and you have a ready-made target for the Kerberoasting tutorial.
Group Policy is how AD pushes configuration to every joined machine. Create a GPO, link it to an OU, and set a registry-backed value. Enabling command-line and PowerShell logging here is doubly useful — it teaches GPO mechanics and gives your blue-team detections real telemetry to work with.
08 — JOINING THE WINDOWS 11 CLIENT TO THE DOMAIN
COREWith the DC live, bring up a Windows 11 Pro/Enterprise VM on the same internal network and join it. The two prerequisites that trip everyone up: the client must resolve DNS through the DC, and its clock must be within five minutes of the DC (Kerberos rejects large time skew).
If you set up DHCP in Section 07, the client gets the correct DNS automatically. If not, set it manually. Then confirm the client can resolve the domain and reach the DC before attempting the join.
- Ping to 10.10.10.10 replies
- nslookup cyberhawk.lab returns 10.10.10.10
- The _ldap SRV record resolves to DC01
You can join through Settings → System → About → Rename this PC (Advanced) → Change → Member of Domain, or in one PowerShell command. The command renames and joins in a single step, prompting for domain admin credentials, then reboots.
Error "An Active Directory Domain Controller could not be contacted" almost always means DNS, not connectivity. The client is likely still using a public or router DNS server. Re-check Get-DnsClientServerAddress — it must list 10.10.10.10.
After reboot, log in as a domain user (CYBERHAWK\jsmith) at the "Other user" prompt. Confirm the trust from the client, and confirm the computer object appeared in AD on the DC.
- Domain returns cyberhawk.lab on WKS01
- Test-ComputerSecureChannel returns True
- WKS01 appears under Get-ADComputer on DC01
- You can log in as CYBERHAWK\jsmith
09 — ADVANCED: POPULATE & WEAPONISE THE LAB
ADVANCEDA pristine domain teaches you administration; a messy, over-privileged one teaches you attacks and detections. This section fills the directory with realistic objects and introduces deliberate weaknesses, so the lab produces the misconfigurations that BloodHound, Kerberoasting, and DCSync all rely on.
BadBlood (by Secframe) fills a domain with thousands of randomised users, groups, computers, OUs, and ACLs — instantly turning an empty lab into something that looks like a real, messy enterprise with attack paths. Run it against a lab you can throw away, never anything real.
BadBlood makes sweeping, irreversible changes to the directory. Run it ONLY on a disposable lab DC and take a snapshot first. Never point it at a production or shared domain.
Real attack paths run through application servers, not just the DC. Stand up SRV01 as a domain-joined member server and give it services worth attacking — a file share for share-hunting, IIS for web, and optionally SQL Server for a classic privilege-escalation path.
Add a Kali VM on the same internal network to run enumeration and attacks. If you want a ready-made vulnerable forest instead of hand-crafting misconfigurations, the open-source GOAD (Game of Active Directory) project builds a multi-domain lab riddled with real attack paths using Vagrant and Ansible.
Snapshot the whole domain in a clean, populated state and label it "golden". Destructive attacks like DCSync, ransomware detonation, or a botched ACL edit are one right-click revert away from a fresh start — no reinstall, no rebuild.
10 — MAINTENANCE & TROUBLESHOOTING
REFERENCERun these periodically to confirm the domain is healthy, especially after adding DCs or reverting snapshots. dcdiag and repadmin are the two workhorse tools every AD admin lives by; time sync is the most common silent killer in a lab that has been paused and resumed.
Disable the hypervisor's "sync guest time with host" for the DC and let it be the authoritative time source for the domain instead. Two competing time sources cause the intermittent Kerberos failures that are maddening to diagnose.
Nearly every AD lab failure traces back to DNS or time. Work this table top to bottom before assuming anything more exotic.
| Symptom | Likely Cause | Fix |
|---|---|---|
| "An AD Domain Controller could not be contacted" | Client DNS not set to the DC | Set client DNS to 10.10.10.10; re-run nslookup on the domain |
| Domain join fails with clock/time error | Time skew > 5 min from DC | w32tm /resync on both; disable host time sync on the DC |
| Client cannot ping the DC | VMs on different virtual networks | Put both NICs on the same Internal Network / LAN Segment |
| Cannot log in as domain user | Logging into local account, not domain | At sign-in use CYBERHAWK\user or [email protected] |
| GPO changes not applying | Policy not refreshed / wrong OU link | gpupdate /force on client; verify GPLink targets the right OU |
| dcdiag reports DNS failures | Missing/incorrect SRV records | Restart the DNS + Netlogon services to re-register SRV records |
| Win 11 has no "Join a domain" option | Running Windows 11 Home edition | Reinstall with Pro / Enterprise / Education |
If the DC has been paused for a long time and comes back with a huge time jump, joined clients may lose their secure channel. Fix from the client with Test-ComputerSecureChannel -Repair -Credential (Get-Credential) rather than rejoining.
You now have a working, extensible AD lab. Point the tools you have been reading about at it and start generating attacks and detections.
- Kerberoasting — attack, detect, and defend the SPN account you created
- BloodHound CE — map attack paths in your BadBlood-populated domain
- Ship Windows event logs to Wazuh, Splunk or Sentinel and write detections
- AD hardening checklist — then re-run the attacks and watch them fail
- CyberHawk SOPs — structured IR playbooks for the AD attacks you practise
11 — SOURCES & REFERENCES
DOCS| Resource | What It Covers |
|---|---|
| Microsoft Learn — AD DS | Install & promote AD DS, Install-ADDSForest reference |
| Microsoft Learn — DHCP | Install and authorize DHCP, scope options |
| Microsoft Evaluation Center | Windows Server 2022 & Windows 11 evaluation ISOs |
| Windows Server 2022 sysreqs | Baseline CPU / RAM / disk requirements |
| MITRE ATT&CK — Enterprise | Technique context for the attacks you will practise |
| Project | Purpose |
|---|---|
| BadBlood (Secframe) | Bulk-populate a domain with users, groups, ACLs |
| GOAD (Orange Cyberdefense) | Vulnerable multi-domain forest, built via Vagrant/Ansible |
| Ludus | Automated range builder for reproducible AD labs |
| BloodHound CE | Attack-path graphing for the domain you built |
| Impacket / NetExec | Enumeration and attack tooling from the Kali box |
Everything in this lab is deliberately insecure and must stay on an isolated internal network. Only run attacks against machines inside your own lab. Applying these techniques to systems you do not own or lack written authorization to test is illegal in most jurisdictions. CyberHawk Threat Intel accepts no responsibility for misuse.
◈ Stay Connected
Follow CyberHawk Threat Intel for threat intelligence, penetration testing tutorials, and hands-on SOC tooling content.
"They can't exploit you if you are the Exploit."