...
Write
OneWriteup
  • Login
  • Register
  • 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
September 29, 2024
Reading Time: 3 mins read
30
1
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:

ADVERTISEMENT
  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.

ADVERTISEMENT
FOUNDER

FOUNDER

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

Recently Posted

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

July 20, 2025
112
HOW To BECOME AN ETHICAL HACKER ROADMAP

Free Cybersecurity Roadmap for Ethical Hacking Career in 2025

November 15, 2024
787
Top 4 Cyber attacks Commonly used for Hacking Websites!

Top 4 Cyber attacks Commonly used for Hacking Websites!

November 9, 2024
172
How to use bloodhound tool for pentesting

How to use Bloodhound / Sharphound for Pentesting Active Directory?

November 6, 2024
572
Load More

Comments 1

  1. Pingback: What is Kerberos Authentication Protocol? How does it work? - OneWriteup

Leave a Reply Cancel reply

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

ADVERTISEMENT

Recommended

How-to-write-an-article-in-27-easy-ways

27 essential SEO Tips You need in 2024

October 21, 2024
216
LockBit 3.0 Code Leaked!!! RaaS dwellers gone extremely wild!!!

LockBit 3.0 Code Leaked!!! RaaS dwellers gone extremely wild!!!

August 28, 2024
114

Popular Story

  • 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

    20 shares
    Share 8 Tweet 5
  • Download the Top 100 Free Cybersecurity Courses, Resources, and Study Materials for 2024

    940 shares
    Share 376 Tweet 235
  • Top 10 Ethical Hacking and Exam Prep Books: including free PDF links

    103 shares
    Share 41 Tweet 26
  • Termux Top 10 Most Powerful Tools in 2024

    350 shares
    Share 140 Tweet 88
  • Top Cyber Security VAPT Interview Preparation Questions in 2024

    94 shares
    Share 38 Tweet 24
ADVERTISEMENT
OneWriteup

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

  • OneWriteup Labs
  • 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
  • Sign Up

© 2024 OneWriteup

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

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

Log In
Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.