Mastering AD at Home: A Visual Guide to Setting Up Your Lab

Cyber Grover đŸ±â€đŸ’»
11 min readDec 19, 2023

--

In today’s technology-driven world, understanding and mastering Active Directory (AD) is essential for anyone pursuing an IT, system administration, network management, or cybersecurity career. However, gaining hands-on experience with AD can be challenging, especially if you don’t have access to a corporate network environment. That’s where setting up an AD home lab comes in handy. In this article, we’ll guide you through creating your AD home lab, providing a safe and controlled environment to learn, experiment, and enhance your AD skills.

Learning Objectives

- Installing Windows Server 2022 and Windows 10 Enterprise on a VMware Hypervisor.
- Configuring a Domain Controller, Managing Users and Groups, Establishing Shares, and Implementing Group Policies.

Hardware and Software Requirements

- Windows Server 2022 ISO
- Windows 10 Enterprise Edition ISO
- Minimum RAM: 16 GB
- Free Disk Space: 60 GB

Setting Up Windows Server 2022 and Configuring a Domain Controller

Before we dive headfirst into our AD home lab adventure, let’s start by paying a visit to the Microsoft Evaluation Center. This is where you can grab the essential ingredients for our lab setup: the Windows Server 2022 and Windows 10 Enterprise ISO files

“In VMware, begin by clicking on ‘File’ and selecting ‘Create New Virtual Machine.’ This action will launch the ‘New Virtual Machine Wizard.

Within the wizard, choose ‘Windows Server ISO’ and ‘Windows Server 2022 Standard’.

Proceed by specifying a name for your virtual machine and selecting a suitable location.

Determine the desired hard disk capacity for your virtual machine.

Once all the necessary details are in place, complete the setup by clicking ‘Finish.’ Your virtual machine is now prepared for use.

Let’s streamline our virtual machine settings. Start by eliminating the ‘Floppy’ device option.

Windows Server can technically run on a mere 2GB of RAM, but it would be as slow as a snail on a coffee break. To preserve your sanity and ensure a smoother experience, I strongly recommend bumping up the RAM to a minimum of 4GB, or even more if possible. Trust me; your future self will thank you for this upgrade!

First, select your preferred language.

Next, opt for ‘Windows Server 2022 Standard Evaluation (Desktop Experience)’ if you want the graphical user interface (GUI) experience. This choice ensures you have a familiar Windows desktop environment to work with.

Now, brace yourself for the fine print. Accept the license terms because it’s the only way forward.

When given the installation options, choose ‘Custom Install.’ This allows you to tailor the setup to your needs, ensuring you get precisely what you want.

Time to pick a drive and let the magic happen. Choose the drive where you want to install Windows Server and let it do its thing. Please sit back, relax, and watch the installation process work its wizardry.

Log in as the Administrator, and you’ll be greeted with the welcoming sight of Server Manager.

To unlock the full potential of your virtual environment, don’t forget to install VMware Tools. This step will give you the coveted full-screen experience, making your virtual world feel even more immersive.

Now, let’s harness the power of PowerShell to rename your PC. Execute the following command

Rename-Computer -NewName "NewComputerName"

I’ve been immersed in a ‘Reacher’ binge-watching marathon, so I’ve decided to infuse some ‘Reacher’ inspired themes into the setup of my Domain and PC.

While navigating through Server Manager, head to the top-left corner and click on ‘Manage.’ From there, select ‘Add Roles and Features.

When prompted, choose the ‘Role-based or feature-based installation’ option, and then select the suitable server from the available pool.

Next, go ahead and select ‘Active Directory Domain Services’ from the list of available options. Click ‘Next’ to proceed through the installation prompts.

“Click the ‘Install’ button and then close the installation window. The installation will continue in the background, and you can monitor the progress in the top-left corner of the screen.

After the installation is complete, it’s time to wrap up the post-deployment tasks by promoting this server to a Domain Controller.

Naming my root domain as ‘110_SIU.local’ — feel free to select a name that resonates with you! Set a DSRM password.

The setup takes care of the Database, Log files, and SYSVOL location automatically, and for our purposes, the default settings will do just fine. However, feel free to make changes if they align better with your specific requirements.

If everything looks good and all the prerequisite checks pass with flying colors, go ahead and proceed with the installation. Upon restarting your system, you’ll be greeted by a wonderful login screen.

Configuring Windows 10 Enterprise

Now, let’s embark on the journey of setting up Windows 10 Enterprise. The initial steps are familiar; just make sure to select the correct ISO file and choose the Windows 10 Enterprise version for installation.

Choose your location, give it a name, specify the disk capacity, review your choices, and when you’re satisfied, go ahead and finish the setup.

Customize the RAM allocation based on your requirements, and once you’ve made the adjustments, proceed with the installation.

“This time, let’s rename the PC to something friendlier, and you can do it with the ease of a graphical user interface (GUI).

Now, go through the same process to set up a second Windows PC.

This is how your VMware environment should appear. Yes, I have numerous VMs — I like to explore and experiment!

To access Active Directory Users and Computers, simply click on ‘Tools,’ and from there, select ‘Active Directory Users and Computers.

When you expand the 110_SIU.local domain, you’ll notice the various Organizational Units (OUs) neatly organized within.

To create a new user object, follow these steps: Right-click on ‘Users,’ navigate to ‘New,’ and then select ‘User.

You can simplify the process by copying the user object type to create multiple users, including an administrator.

Let’s configure a service.

Now, it’s time to establish a share. To initiate the process, click on ‘File and Storage Services,’ then select ‘New Share’ under ‘Tasks,’ and follow the prompts to set up your share.

It’s important to note that this share setup is not secure. Exercise caution and ensure you implement proper security measures to protect your data.

Understanding the Importance of SPN in Secure Authentication

SPN stands for “Service Principal Name.” It is a unique identifier for a service running on a computer within an Active Directory domain. SPNs associate a service instance with a service logon account, allowing clients to authenticate and communicate with the service securely. SPNs are crucial for services that use Kerberos authentication in Windows environments. They help establish a secure connection between clients and services, ensuring proper authentication and encryption.

setspn -a Reacher-DC/SQLService.110_SIU.local:60111 110_SIU\SQLService

Configuring Group Policy: Disabling Windows Defender

We’ll now configure a group policy to disable Windows Defender temporarily. Please note that this action is not recommended for a production environment due to security concerns. We are demonstrating this process to showcase how group policies are set up and to raise awareness about potential security vulnerabilities.

Joining a PC to a Domain: A Step-by-Step Guide for Seamless Integration

Search for ‘Domain’ and Select ‘Access Work or School

Click ‘Connect’ and then select ‘Join this device to a local Active Directory domain.

Enter the domain name and provide the domain administrator password.

Restart your PC, and upon reboot, log in to the domain.

In this article, we’ve covered a comprehensive setup, including configuring a Windows Server 2022 as a Domain Controller, establishing connections with two Windows 10 machines linked to the domain, and creating multiple user, administrator, and service accounts. We’ve delved into the intricacies of group policy and recognized the significance of Service Principal Names (SPN).

For added safety and flexibility, take snapshots of each VM to revert in case of unexpected issues. This foundation will serve as a springboard for future explorations, where we’ll delve into the world of Active Directory security and examine how red teams approach and attack these environments.

--

--

Cyber Grover đŸ±â€đŸ’»
Cyber Grover đŸ±â€đŸ’»

Cybersecurity Professional, Developer. Adept at system and network analysis, cyber threat intellignece and security frameworks.

No responses yet