UnixDroid

Lesson 8 of 10 · 13 min

Windows Server 2025 & your first Active Directory domain

Install Windows Server 2025 as DC01, promote it to a domain controller for unixdroid.local, add users and join your Windows 11 VM to the domain.

Almost every company with more than a handful of PCs runs Active Directory (AD): one central server that controls every user, password, computer and permission. That makes AD the number-one target in real attacks (Kerberoasting, BloodHound, pass-the-hash) and the number-one log source for SOC teams. In this lesson you'll build your own: a domain controller called DC01 running the domain unixdroid.local, with your Windows 11 VM joined to it.

Windows Server 2025 VM recipe card
Windows Server 2025 VM recipe card

Key words first

TermMeaning
DomainA group of users and computers managed together, e.g. unixdroid.local
Domain Controller (DC)The server that runs AD and checks every login
AD DSActive Directory Domain Services, the Windows Server role that makes a DC
OUOrganizational Unit, a folder for users and computers
DNSAD depends on it. Clients find the DC through DNS, so it must be right

Download

At microsoft.com/evalcenter, choose Windows Server 2025 and download the 64-bit ISO. It's free for 180 days, but it must be activated online within 10 days, or it shuts down every hour. Keep the NAT adapter connected for the first boots so activation happens automatically.

Create the VM

  1. New → Name DC01, select the ISO, Type Windows, Version Windows 2025 (64-bit). If your VirtualBox doesn't list it, choose Windows 2022 (64-bit) or update VirtualBox.
  2. Tick Skip Unattended Installation.
  3. Hardware: 4096 MB RAM, 2 CPUs. Disk: 60 GB.
  4. Network: Adapter 1 NAT, Adapter 2 Host-only (LabNet).

Install

  1. Start and press any key to boot from the DVD.
  2. When asked for the edition, pick Windows Server 2025 Standard Evaluation (Desktop Experience). The options without Desktop Experience are Server Core, which is command line only.
  3. Install to Disk 0, then set a strong Administrator password. A DC refuses weak ones.
  4. To log in, press Host + Del (Right Ctrl + Del) to send Ctrl+Alt+Del to the VM.
  5. Install Guest Additions (Devices → Insert Guest Additions CD image) and reboot.
  6. Check activation: slmgr /dlv. If it isn't activated yet, run slmgr /ato while NAT is connected.

Prepare the server

A domain controller needs a fixed name and a static IP, set before you promote it. Open PowerShell as Administrator:

Rename-Computer -NewName DC01 -Restart

After the reboot:

Get-NetAdapter                       # LabNet is usually "Ethernet 2"
New-NetIPAddress -InterfaceAlias "Ethernet 2" -IPAddress 192.168.56.10 -PrefixLength 24
Set-DnsClientServerAddress -InterfaceAlias "Ethernet 2" -ServerAddresses 127.0.0.1

Promote it to a domain controller

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName "unixdroid.local" -DomainNetbiosName "UNIXDROID" -InstallDns

It asks for a Safe Mode (DSRM) password. Pick one and write it in your lab notebook. Expect a few yellow warnings, for example about the NAT adapter using DHCP; that's normal in a lab. The server reboots, which takes a while the first time. Log in as UNIXDROID\Administrator.

Once DC01 is activated and updated, untick Cable Connected on Adapter 1 (NAT) in the VM's network settings. A real DC never browses the internet, and a single network keeps AD's DNS clean.

Create lab users

New-ADOrganizationalUnit -Name "Lab Users"
New-ADUser -Name "Rahul Sharma" -SamAccountName rahul -UserPrincipalName rahul@unixdroid.local -Path "OU=Lab Users,DC=unixdroid,DC=local" -AccountPassword (Read-Host -AsSecureString "Password") -Enabled $true
Get-ADUser -Filter * | Select-Object Name, SamAccountName

Create a second user the same way, or try the GUI: Server Manager → Tools → Active Directory Users and Computers.

Join Windows 11 (WS01) to the domain

On WS01, open PowerShell as Administrator. First point its DNS at the DC (this is what makes the join work), then join:

Set-DnsClientServerAddress -InterfaceAlias "Ethernet 2" -ServerAddresses 192.168.56.10
Resolve-DnsName unixdroid.local     # must return 192.168.56.10
Add-Computer -DomainName unixdroid.local -Credential UNIXDROID\Administrator -Restart

After the reboot, click Other user and log in as UNIXDROID\rahul, then run whoami. You should see unixdroid\rahul. Back on DC01, Get-ADComputer -Filter * now lists WS01.

How an attacker spots a DC

From Kali:

nmap -sV -p 53,88,135,389,445,636 192.168.56.10
PortServiceWhy it gives the DC away
53DNSAD runs its own DNS
88KerberosOnly domain controllers run Kerberos
389 / 636LDAP / LDAPSThe AD directory itself
445SMBFile shares, Group Policy (SYSVOL)

Port 88 plus 389 on the same host almost always means "domain controller". You'll attack these services in the Ethical Hacking path, so take a snapshot of DC01 and WS01 named domain-ready now.

Troubleshooting

ProblemFix
"An Active Directory Domain Controller could not be contacted"WS01's DNS isn't pointing at 192.168.56.10, or the NAT DNS answers first. Untick NAT's Cable Connected on WS01 and retry
Promotion fails on the Administrator passwordSet a complex local Administrator password first
Server shuts down every hourNot activated. Connect NAT and run slmgr /ato
Can't log in as a domain userUse UNIXDROID\username on the Other user screen
Try it yourself
  1. Install Windows Server 2025 (Desktop Experience) as DC01 with 192.168.56.10.
  2. Promote it to a DC for unixdroid.local and save the DSRM password in your notebook.
  3. Create an OU called Lab Users and two users.
  4. Join WS01 to the domain and log in as a domain user. whoami should print unixdroid\username.
  5. From Kali, run nmap -sV -p 53,88,389,445 192.168.56.10 and explain what each open port tells an attacker.
  6. Snapshot both VMs as domain-ready.
No Linux machine? Practise in the free online terminal

Quick check

Which TCP port does Kerberos use? (nmap shows it open on every domain controller)

Need a hint?

Two identical digits.

Finished this lesson?

Done lessons keep your daily streak going 🔥

0 day streak

0 lessons done

best 0 days

Log in to keep your streak on every device →