Oliver Jones

How to Create an Active Directory Homelab (Locally Hosted)

📅 Published: August 15, 2025 👤 Author: Oliver Jones

Today I’m building a locally hosted Active Directory environment to test attacks that need user interaction or specific misconfigurations without paying for cloud. Full control over VM configs, snapshots, and network. Easy to break and reset.

Prerequisites

Tip: Take a snapshot at the end of each major step. Saves hours later.

Grab the ISOs

  1. Windows 10 Enterprise ISO
    Go here and fill out the form:
    https://info.microsoft.com/ww-landing-windows-10-enterprise.html

    Win10 Enterprise form

    Pick language → 64-bit.
    Win10 64-bit selection

  2. Windows Server 2022 (or 2019) ISO
    https://info.microsoft.com/ww-landing-windows-server-2022.html
    Fill out the form → Download.

    Windows Server form

    Pick language and 64-bit.
    Windows Server language and 64-bit
    Downloads are ~10 GB total.

Create the Domain Controller VM (DC01)

File → New Virtual Machine → Custom.

New VM - Custom

Leave default hardware compatibility.

Compatibility

I will install the operating system later.

Install later

Guest OS: Microsoft Windows. Version: Windows Server 2022 (or 2019 if that’s your ISO).

Select Server 2022

Firmware: UEFI.

UEFI

Processors: 1 vCPU.

1 vCPU

Memory: 4096 MB (4 GB).

4 GB RAM

Network: NAT (simple and works with internet).

If you want complete isolation, use Host-only and add a second NIC later for internet.
NAT network

I/O controller: default. Disk type: recommended (NVMe is fine).

IO default
Disk type

Create a new virtual disk.

New disk

Size: 60 GB for the DC is comfortable. Split into multiple files.

Disk size and split

Name the disk file and choose storage location.

Disk name

Before power-on: Edit VM → CD/DVD (SATA) → Use ISO image file → select the Windows Server ISO.

Attach Server ISO
Note: Don’t add a Floppy device.

Install Windows Server on DC01

Boot the VM, Press any key to boot from ISO.

Press any key

Language, time, keyboard → Next.

Language/time/keyboard

Install.

Install

Edition: Windows Server 2022 Standard Evaluation (Desktop Experience).

Edition

Accept license → Next.

License

Custom: Install Windows only.

Custom install

Select the drive → Next.

Select drive

Install runs.

Installing

Set Administrator password (ex: Steve123!).

Set admin password

Log in. Server Manager opens.

Server Manager

Snapshot here (baseline OS).

Snapshot

Give DC01 a static IP and correct DNS

Kerberos needs time + DNS right or nothing works.

Control Panel → Network → Adapter → Properties → IPv4:

Keep the DC’s clock in sync. Time skew breaks logons.

Promote DC01 to a Domain Controller (adds AD DS + DNS)

Open PowerShell as Administrator:

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools

Install-ADDSForest -DomainName corp.test -DomainNetbiosName CORP -InstallDNS `
  -SafeModeAdministratorPassword (Read-Host -AsSecureString "DSRM") -Force

When asked for the DSRM password, use something you’ll remember (can match the local admin you set earlier).

ADDS Forest

Server will reboot. After reboot, sign in with CORP\Administrator.

Now switch the DC’s primary DNS to itself (192.168.222.131 in the example) and remove any other DNS.

Server Manager (post-promote)

Create two domain users (Skeleton, Spider)

Open dsa.msc (Active Directory Users and Computers).

Open dsa.msc

corp.test → Users → Right click → New → User.

New user

Create Skeleton (logon: skeleton). Set password (ex: Password1!) and check Password never expires (lab only).

User password options

Repeat for Spider. (Optional) Create OUs: CORP\Workstations, CORP\Users, and move objects.

Create the Windows 10 workstations (MS01, MS02)

New VM → Custom.

New VM (Win10)

Compatibility default → I will install later.

Compat default
Install later

Guest OS: Microsoft Windows → Windows 10 and later x64.

Select Win10 x64

Name: MS01. Choose location.

Name MS01

Firmware: UEFI.

UEFI

CPU: 1, RAM: 2 GB is okay; 4 GB is nicer.

CPU/RAM
RAM confirm

Network: NAT (same network as DC).

NAT

I/O controller default. Disk: NVMe (default).

NVMe

Create a new virtual disk (not “network” disk).

New disk

Disk size: 40–60 GB, Split into multiple files.

Size/split
Disk name

Customize Hardware → CD/DVD (SATA) → Use ISO image → Windows 10 ISO.

Attach Win10 ISO
ISO chosen
Finish

Clone for MS02
Right-click MS01 → Manage → Clone → From current state → Create a full clone → name it MS02.

Clone wizard
Current state
Full clone
Name MS02

Install Windows 10 on MS01/MS02

Boot MS01 → Press any key → Windows Setup.

Press any key
Setup start

Install now → Accept license → Custom → select drive → Next.

Install now
License
Custom
Select drive
Copying files
Installing features
Almost done

OOBE screens (region, keyboard, privacy). For domain testing, don’t use Microsoft account. Use the “Domain join instead” link if it shows, otherwise create a local user and we’ll join later.

Region
Keyboard
Privacy
Account options
Local account

Repeat the same on MS02. Install VMware Tools on both (VM → Install VMware Tools → Typical). Reboot later if you want.

Rename the computers before join: MS01 and MS02 (System Properties → Computer Name → Change). Reboot.

Point the workstations at the DC for DNS

On MS01 (as local admin), open PowerShell (Admin) and set DNS to the DC:

Get-DnsClientServerAddress | ft InterfaceAlias,InterfaceIndex,ServerAddresses

# choose the right interface; examples below:
Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" -ServerAddresses 192.168.222.131
# or, if you prefer by index:
Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses 192.168.222.131

Use the actual IP of DC01. Repeat on MS02.

If DNS doesn’t point to the DC, domain join will fail. Always fix DNS first.

Join MS01 and MS02 to the domain

Settings → Accounts → Access work or school → Connect → Join this device to a local Active Directory domain.
Domain: corp.test (NetBIOS: CORP). Use CORP\Administrator or another domain user with join rights. Reboot when asked.

Access work or school
Join domain
Reboot prompt

Note: Use the DC Administrator credentials you created when setting up the DC.

Credential prompt

Repeat on MS02.

First domain logon test

On MS01 login screen: Other user → CORP\Skeleton (enter password you set).
On MS02: CORP\Spider.
If you get “The trust relationship…” errors, check time sync and DNS.

Quick validation

whoami
nltest /dsgetdc:corp.test
klist

You should see the domain and a Kerberos TGT.

Optional hardening/loosening (lab flavor)

Topology I’m using (example)

Done

You now have 1 DC + 2 workstations, two low-priv users, clean domain. From here, wire up whatever you want and break it safely. If your Kali VM lives on the same NAT/Host-only network, you’re ready to test enumeration, lateral movement, printer bug, relays, credential abuse, etc. Take snapshots before each experiment and after each “good state”.