...
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
28
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:

  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

ADVERTISEMENT

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

HOW To BECOME AN ETHICAL HACKER ROADMAP

Free Cybersecurity Roadmap for Ethical Hacking Career in 2025

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

Top 4 Cyber attacks Commonly used for Hacking Websites!

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

How to use Bloodhound / Sharphound for Pentesting Active Directory?

November 6, 2024
516
Pass The Hash

How to perform Pass The Hash Attack on Active Directory in 2024?

November 2, 2024
154
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

OSCP vs OSCP+: What New Changes Have Been Made?

OSCP vs OSCP+: What New Changes Have Been Made?

September 2, 2024
590
Hackyx.io

Hackyx: Search Engine for Cybersecurity

May 14, 2024
111

Popular Story

  • Download the Top 100 Free Cybersecurity Courses, Resources, and Study Materials for 2024

    Download the Top 100 Free Cybersecurity Courses, Resources, and Study Materials for 2024

    845 shares
    Share 338 Tweet 211
  • Termux Top 10 Most Powerful Tools in 2024

    321 shares
    Share 128 Tweet 80
  • How To Setup Cybersecurity HomeLab for Red Team and Blue Team?

    163 shares
    Share 65 Tweet 41
  • Top 10 Ethical Hacking and Exam Prep Books: including free PDF links

    89 shares
    Share 36 Tweet 22
  • NoSQL Injection Complete Guide, Types, Examples, Cheat Sheet

    49 shares
    Share 20 Tweet 12
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.