Active Directory for Pentest – Part 1
Introduction
In the dynamic landscape of modern IT infrastructure, Active Directory (AD) stands as the cornerstone of network management, serving as the centralized authority for user authentication, authorization, and configuration settings.
This series delves into building your own Active Directory and use it as lab for pentest
In this post we will be setting up Active Directory locally for pentesting using VMware 17 Player, Windows server 2022, Windows 11 (evaluation version).
For detailed video check out John Hammond’s playlist: https://www.youtube.com/watch?v=pKtDQtsubio&list=PL1H1sBF1VAKVoU6Q2u7BBGPsnkn-rajlp

Software Required
For the installation you will need:
Before we dive into the installation process, ensure you have the following prerequisites in place:
- VMware vSphere or VMware Workstation: You will need one of these VMware products to create and manage virtual machines.
VMware Workstation Player: https://www.vmware.com/in/products/workstation-player.html
VMware workstation pro will help to create snapshots but we can do that using player by copying files. More on this at the end of this article
- Windows Server & 11 ISO: Obtain the Windows installation ISO file. You can download it from the official Microsoft website.
Windows server 2022: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2022
Windows 11: https://www.microsoft.com/en-in/evalcenter/evaluate-windows-11-enterprise
Hardware
We are using an Intel i5, 32GB RAM laptop, we will be spinning up couple of servers at the same time so having good processor and larger RAM will help.
Install VMware software
VMware installation is pretty standard just follow the installation wizard, and make sure the software is up and running.
Creating Virtual Machines
We will be creating template VMs for Server and Workstation. WIth this template we can create snapeshots and use for our Domain controller, Management Client and the user workstations.
Windows server 2022 installation
Launch VMware and click on “New Virtual Machine” or “Create a New Virtual Machine” to start the virtual machine creation wizard.
Select the “I will install the operating system later” option, as we will install Windows Server from an ISO.

Choose the operating system you plan to install. In this case, select “Microsoft Windows” and the specific version of Windows Server you intend to install.
Name your virtual machine “BaseServer”and choose a location to store the virtual machine files.
Configure the hardware settings (CPU, RAM, Network, and Disk) according to your requirements. Make sure to allocate sufficient resources for your Windows Server installation.

Right-click on your new virtual machine and select “Settings.”

Install Windows Server
Now that your virtual machine is created, it’s time to install Windows Server:
- Right-click on your new virtual machine and select “Settings.”
- Attach the Windows Server ISO file to the virtual CD/DVD drive.
- Power on the virtual machine.
- The Windows Server installation process will begin. Follow the on-screen prompts to complete the installation, including selecting your preferred language, time, and keyboard settings, entering the product key, and specifying the installation type (usually “Custom”).
- When prompted, select the disk on which you want to install Windows Server.
- Follow the installation wizard to set up a password and complete the installation.
Configure Windows Server
After the installation is complete, you’ll need to configure Windows Server:
- Log in to your Windows Server virtual machine using the password you set during installation.
- Complete the initial configuration steps, which include setting the computer name, joining a domain (if necessary), and configuring network settings.
- Install VMware Tools, which enhances the integration between the virtual machine and the host system. This can typically be found in the VMware menu.
Update and Customize Your Windows Server
Once Windows Server is up and running, it’s important to:
- Install Windows Updates: Ensure your server is up to date with the latest security patches and updates.
- Install and Configure Server Roles and Features: Depending on your requirements, you may need to add specific roles and features, such as Active Directory, DNS, DHCP, or Web Server roles. [We will do this in Part 2]
Windows 11 Workstation Base image
Steps are similar to Windows server installation.
After completing installation select create local user like ‘local_admin’
Provide password like ‘Passw0rd!’
Taking Snapshot of clean install
- Power off the server
- Go to the Folder where the VM is saved, make copy of the folder and rename it.
- Open VMware and select ‘Open a Virtual Machine’
- Select the copy older and select VMware virtual machine file.

- When asked select I Copied it option.

- Similarly create snapshot from Base Workstation
So we have our Basic templates created, we can use them to create as many clone for our directory.
In next post we will create Domain controller and workstation to join a domain.