Write
OneWriteup
  • Login
  • Trending
  • Articles
  • Blog
  • Tutorials
  • News
  • Research
  • Top 10 Lists
  • Case Studies
  • Writeup
  • Interviews
  • Personal Stories
  • Infographics
No Result
View All Result
  • Trending
  • Articles
  • Blog
  • Tutorials
  • News
  • Research
  • Top 10 Lists
  • Case Studies
  • Writeup
  • Interviews
  • Personal Stories
  • Infographics
No Result
View All Result
OneWriteup
No Result
View All Result

How To Create Vulnerable Active Directory HomeLab for Penetration Testing?

This guide walks you through the process, from installing Active Directory to introducing various vulnerabilities that you can exploit for practice.

FOUNDER by FOUNDER
August 19, 2025
Reading Time: 3 mins read
33
0
How To Create Vulnerable Active Directory HomeLab for Penetration Testing?
Share on FacebookShare on Twitter

Introduction

Building an Active Directory HomeLab allows penetration testers and security researchers to test techniques and tools in a controlled environment. AD is a key target in real-world networks, so learning how to identify and exploit AD vulnerabilities is essential. In this guide, we’ll walk through setting up a vulnerable AD environment for practice.

Requirements

Before you begin, make sure you have the following:

  • Windows Server: You’ll need Windows Server 2016 or later with the Active Directory Domain Services (AD DS) role installed.
  • PowerShell Knowledge: You should be familiar with running scripts in PowerShell, as this process involves executing scripts to create the vulnerable environment.
  • Server Manager: Ensure that Active Directory services are running.

Step 1: Installing Active Directory

If you haven’t installed active directory check out this article first.

How to set up Active Directory

How to setup Active Directory? 

Step 2: Set PowerShell Execution Policy

To run scripts, you need to adjust the PowerShell execution policy. Here’s how:

  1. Open PowerShell as Administrator.
  2. Run the following command to temporarily change the execution policy:
  3. Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted
    Type y to confirm the change. This allows you to execute scripts for the current session without permanently altering your system settings.

Step 3: Downloading and Running the Vulnerable AD Script

The vulnerable Active Directory script is provided by a GitHub repository maintained by wazehell. This script will introduce multiple common AD vulnerabilities.

  1. In PowerShell, run this command to download and execute the vulnerable AD script
  2. IEX((new-object net.webclient).downloadstring("https://raw.githubusercontent.com/wazehell/vulnerable-AD/master/vulnad.ps1"));
    The script will download and create the necessary objects in your AD environment.

Step 4: Running the VulnAD Script

After the script is downloaded, you need to invoke it to create users and simulate vulnerabilities.

  1. Run the following command to invoke the vulnerable AD script:Invoke-VulnAD -UsersLimit 100 -DomainName "home.local"Replace home.local with your domain name if it’s different.
    This will create 100 users and generate a variety of misconfigurations and vulnerabilities in your Active Directory environment.
    https://onewriteup.com/wp-content/uploads/2024/09/2024-09-29-17-36-42.mp4

    Check out this video to understand the process.

Step 5: Vulnerabilities Created by the Script

The script will automatically introduce the following vulnerabilities:

  • Abusing ACLs/ACEs: Misconfigurations in access control lists (ACLs) and access control entries (ACEs) allow privilege escalation and lateral movement.
  • Kerberoasting: Extract service tickets for offline cracking of service account passwords.
  • AS-REP Roasting: Exploit accounts that don’t require pre-authentication, allowing password hash extraction.
  • DnsAdmins Abuse: Members of the DnsAdmins group can execute code as SYSTEM.
  • Password in Object Descriptions: Weak passwords are stored in object descriptions, making them accessible to attackers.
  • User Objects with Default Passwords: Users with the default password “Changeme123!” are created, making brute-force attacks easier.
  • Password Spraying: Allows for testing common passwords across many accounts.
  • DCSync Attack: Extract password hashes from the domain controller using replication privileges.
  • Silver Ticket & Golden Ticket: Abuse Kerberos tickets for persistence and lateral movement.
  • Pass-the-Hash & Pass-the-Ticket: Use password hashes or Kerberos tickets to authenticate without knowing plaintext passwords.
  • SMB Signing Disabled: SMB signing is disabled by default, allowing for man-in-the-middle attacks.

Conclusion

Setting up a vulnerable Active Directory homelab is an excellent way to learn about the inner workings of AD security and the various attack vectors. By following this guide, you’ll be able to test common AD attacks like Kerberoasting, DCSync, and Pass-the-Hash. This hands-on experience will significantly enhance your penetration testing skills.

Disclaimer: This blog is for educational purposes only, promoting awareness of ethical hacking and cybersecurity to help readers protect against cyber threats. All content is based on lawful experiments on our own systems. No illegal activities are endorsed. Users agree to apply the information responsibly and legally. The blog and author are not liable for any misuse. By using this blog, you agree to use all knowledge ethically and legally. [Read full disclaimer].

FOUNDER

FOUNDER

Cybersecurity aficionado committed to disseminating expertise, crafting articles that empower others to resolve errors and fortify online defenses with ease.

Recently Posted

Beginner’s Guide to Reverse Engineering Malware with dnSpy

Beginner’s Guide to Reverse Engineering Malware with dnSpy.

August 19, 2025
127
DNS Based Data Exfiltration Using Burp Collaborator Client

DNS Based Data Exfiltration Using Burp Collaborator Client

August 19, 2025
134
Jailbreak Gemini 2.5 Pro: A Guide to CLI Access and Jailbreaking in Kali Linux

Jailbreak Gemini 2.5 Pro: A Guide to CLI Access and Jailbreaking in Kali Linux

August 19, 2025
742
HOW To BECOME AN ETHICAL HACKER ROADMAP

Free Cybersecurity Roadmap for Ethical Hacking Career in 2025

August 19, 2025
868
Load More

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

What is Kerberos Authentication Protocol How does it work

What is Kerberos Authentication Protocol? How does it work?

August 19, 2025
193
How to Download and Install Windows Server 2022 on VirtualBox

How to Download and Install Windows Server 2022 on VirtualBox?

August 19, 2025
227

Popular Story

  • Beginner’s Guide to Reverse Engineering Malware with dnSpy

    Beginner’s Guide to Reverse Engineering Malware with dnSpy.

    23 shares
    Share 9 Tweet 6
  • Jailbreak Gemini 2.5 Pro: A Guide to CLI Access and Jailbreaking in Kali Linux

    134 shares
    Share 54 Tweet 34
  • How to Configure OpenVPN Server for Multi Clients Setup in Windows?

    49 shares
    Share 20 Tweet 12
  • Free Cybersecurity Roadmap for Ethical Hacking Career in 2025

    156 shares
    Share 62 Tweet 39
  • What is As-Rep Roasting attack in Active Directory and How does it work?

    34 shares
    Share 14 Tweet 9

Support This Write-Up. Fund the Next

OneWriteup

Discover expert cybersecurity articles, tutorials, and the latest trends to protect your digital world.

  • Disclaimer
  • About Us
  • Feedback
  • Contact Us
  • Report
  • Privacy Policy
  • Community Guidelines
  • Terms Of Service

© 2024 OneWriteup

No Result
View All Result
  • Trending
  • Articles
  • News
  • Blog
  • Tutorials
  • Research
  • Top 10 Lists
  • Case Studies
  • Interviews
  • Login

© 2024 OneWriteup

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In