Spinning up Active Directory domain controller, joining client workstations, and seeding the environment with users, OUs for mock enterprise company "ImranKHomelab"
Isolated subnet on VirtualBox, one Domain Controller, a handful of joined Windows endpoints. Everything is intentionally simple so misconfigurations and attack paths are easy to see in later chapters.
In VirtualBox, created an isolated NAT network called LabNet on the 10.0.2.0/24 subnet. This will be the private wire that DC01 and all client VMs share.
On VM that will soon be our DC, changed Adapter 1 from the default NAT to the new LabNet NAT network. This puts the server on the private lab subnet where it can serve as DHCP/DNS for everything else.
Inside Windows Server, used Rename-Computer -NewName DC01 to give the box a meaningful name before promotion.
Set a static IPv4 address of 10.0.2.10 with gateway 10.0.2.1, then pointed the DNS client at 127.0.0.1 so the DC resolves itself once promoted. A domain controller without stable IP + DNS will not behave as expected.
Install-WindowsFeature AD-Domain-Services, DNS -IncludeManagementTools stages the tools needed to utilize ADDS and DNS services. This only installs; the next step promotes the server.
Install-ADDSForest creates the brand-new forest imrankhomelab.local with NetBIOS IMRANKHOMELAB. Set a Safe Mode Administrator (breakglass) password stored separately from any user account. The DNS delegation warning is expected in a self-contained lab.
After reboot, verified the forest is live: Get-ADDomain returns the correct DNSRoot and NetBIOS name, Get-ADForest shows the schema and the four core services — ADWS, DNS, KDC, Netlogon are all running.
Opened Active Directory Users and Computers and started building OUs to mimic an enterprise structure. First one: IT, directly under imrankhomelab.local. Intentionally left "Protect container from accidental deletion" unchecked so the lab is easy to tear down later.
Created the full set of department OUs to mirror a small enterprise: Executives, Finance, HR, IT, Servers, ServiceAccounts, Users, and Workstations. Real environments have this kind of separation; the lab now does too, which means later GPO scoping and delegation exercises will be meaningful.
Inside Executives, created a Global Security group called Executives. Repeated this pattern across the other OUs so that permissions can be assigned to groups rather than individual users.
Created realistic user accounts for each department - names, displays, office (New York), and dropped them into the correct OUs. Examples: Clyde Henata in IT, plus the rest of the users.
Added users to group memberships. Some assignments are intentional malpractice such as regular users assigned as Domain Admins, mimicking the flat-privilege environments that attackers love. This is the weak posture later chapters will demonstrate breaking, then harden.
Created a service account for Mike Chang's account which is also a Domain Admin. Note the SQL service account which we will compromise in future chapters
Turned off DHCP server in hypervisor LabNet settings from step 1. Installed the DHCP role, authorized it in AD to prevent rogue DHCP servers, then created a scope LabNet-Scope covering 10.0.2.100 → 10.0.2.200.
On a fresh client VM, after the client picked up DHCP, repointed DNS at 10.0.2.10, flushed the cache, and ran nslookup imrankhomelab.local — resolution succeeded against DC01. With DNS healthy, opened System Properties → begin the domain join.
The client machine (mchang's workstation) receives the "Welcome to the imrankhomelab.local domain" confirmation. That's the moment the lab becomes a real, functioning domain — there's now a relationship between this endpoint and the DC, and the user's domain credentials will work here after reboot.
After reboot, logged into the workstation using domain credentials (IMRANKHOMELAB\mchang). The Windows 11 welcome screen authenticating against the DC confirms end-to-end success: DC promoted, DHCP serving, DNS resolving, client joined, domain credential validated.
Observations from the build phase — the conditions later chapters will exploit and then remediate.
svc_sqlserver) with a weak password.