Mastering AD at Home: A Visual Guide to Setting Up Your Lab
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.