
Learn how Active Directory provides management of users, groups, and resources, and how to enumerate a Windows environment using the Active Directory PowerShell module and RSAT in red team context.
Set up a live lab featuring a domain controller, parent and child domains, a client and a web server on a flat network, with Windows Server 2008 hosting Metasploitable 3.
Create a lab environment by building an Active Directory setup with domain controllers, a Windows 10 client, Windows servers, using VirtualBox and Kali Linux, and download Microsoft evaluation copies.
Install Windows Server and set up a root domain controller, configure the administrator password, join the network, and prepare Active Directory domain services for promotion to a domain controller.
Install active directory domain services on ROOT-DC01, promote it to a domain controller for a new forest with the domain bare shelled, and set the domain services recovery mode password.
Install and configure SQL Server on root-dc01, including SQL Server Developer Edition, disable Windows Defender for lab enumeration, and set up TCP/IP 1433 for remote access.
Install and configure a child domain by promoting a domain controller in the root domain, using VirtualBox, static IP, and DNS forwarders.
Install trusted-dc03 to establish a forest trust between domains and promote it to a domain controller, ensuring full connectivity and correct domain name configuration.
Install and configure SQL Server on trusted-dc03, set up SQL Server Management Studio, enable mixed-mode authentication, configure TCP/IP for remote access, and restart services to make the server accessible remotely.
Install a Windows 10 client, configure network and DNS to the domain controller, create a domain user, and join the client to the domain for domain login.
Build metasploitable3 on Windows Server 2008 by following the GitHub instructions, downloading dependencies (VirtualBox, backgrounds, plugins), and running the Buildid.ps1 script to complete the setup.
Configure a forest trust between two domains, establishing a two-way transitive trust with forest wide authentication, then verify the trust using the Active Directory PowerShell module.
Create domain users in Active Directory using the users and computers tool, setting passwords that never expire and SPNs for service accounts. Prepare delegation and cross-domain trust for multi-domain access.
Create groups and assign members, then configure group policy objects to enable remote desktop access and enforce restricted groups and resource-based delegation on the file server.
Configure foreign group membership in Active Directory by adding trusted-domain members to building administrators. Leverage GPOs and restricted groups for cross-domain policy management to enforce these memberships.
Set up service principle name for an unsecured server, configure SQL server logins and single and nested impersonation, then create a trustworthy database to illustrate privilege escalation to sysadmin.
Install the remote server management tool (RSAT) on Windows 10, enable the partial Active Directory model with PowerShell, verify the module, and access Active Directory users.
Enumerate the domain with RSAT using the PowerShell Active Directory module. Query domain controllers, identify the domain, forest, and operating system details to plan privilege escalation strategy.
Explore domain user enumeration with RSAT using Get-ADUser, filters, and properties to reveal user details. Filter by description and properties such as password never expires to surface relevant details.
Learn to enumerate domain groups in Active Directory using RSAT and PowerShell, exploring Get-ADGroup, SamAccountName, group members, and nested groups for red-team engagements.
Enumerate domain computers using the Active Directory PowerShell module (RSAT) to list name, operating system, version, service pack, hotfixes, and IP addresses with filters and clean output.
Learn to enumerate forest and domain trusts with rsat, identifying bidirectional and transitive relationships between child and root domains and cross-forest trusts, and examining trusted domains.
Download PowerView from GitHub as part of PowerSploit to enable red and blue teams to gain situational awareness in Windows Active Directory, using PowerShell to enumerate and exploit AD.
Learn to import the PowerView PowerShell module, query the current domain and domain controllers, and enumerate domain users for red-team lab reconnaissance using PowerView.
Enumerate domain users with PowerView to identify admin rights, group memberships, and Kerberos SPN and pre-auth findings, and assess domain policy and password settings.
Explore domain group enumeration with PowerView, filtering results by account names, identifying protected and nested groups, and inspecting members and object classes to reveal nested admin group structures.
Enumerate domain computers with powerview using get domain computer, filter by operating system, identify live systems, and explore constrained and unconstrained delegation for delegation trust.
Enumerate forest trusts and cross-forest relationships with PowerView to map forest transitive trusts and trust directions, then identify cross-forest attack paths via foreign users and groups to plan privilege escalation.
Explore how SharpHound collects data from domain controllers and Windows systems to enumerate users, groups, acls, and computers, then analyze automated queries to reveal domain admins and nested groups.
Identify local admin access on Windows Server 2008 R2 hosts, remote into them, and use Mimikatz and crackmapexec to dump credentials and escalate to local and domain admin privileges.
Demonstrates exploiting mssql server impersonation to escalate from a local user to a sysadmin, via enumeration, impersonate login, execute as, xp_cmdshell, and persistence.
Explore kerberoasting with Rubeus by requesting service tickets offline, cracking service account hashes with hashcat, and extracting cleartext passwords, then prepare for credential-based lateral movement.
Discover how to leverage domain admin credentials to perform DCSync from a domain controller, using PowerShell sessions and Mimikatz to dump hashes in a lab.
Explore Kerberos unconstrained delegation and learn how to use Rubeus in monitor mode to dump and pass tickets for privilege escalation in a lab domain.
Explore kerberos unconstrained delegation via a printer bug, using exploit sample to capture domain controller tickets and pass them into the current session for red team lab scenarios.
Learn how Kerberos constrained delegation restricts impersonation and how attackers exploit it to escalate privileges using domain credentials and Mimikatz.
Explore resource-based delegation in Active Directory, learning to grant access on behalf of other identities using security descriptors, Kerberos tickets, and RB CD, with lab steps to simulate attack.
Explore resource-based constrained delegation in active directory by creating scripts, applying them to a computer, impersonating a domain admin, and using hashes and tickets to move laterally.
Demonstrate domain privilege escalation using link-local multicast name resolution and the embed tool to capture nbns and mdns traffic, then offline crack the hashes and simulate the attack.
Exploit MS SQL Server to achieve domain privilege escalation by enumerating instances and dumping credentials for offline cracking, using PowerShell to impersonate and escalate to domain admin.
Explore how trustworthy databases on MS SQL enable privilege escalation from db_owner to sysadmin via execute as when a system-owned database is trusted.
Demonstrate escalating privileges from a trusted database owner to the SQL server sysadmin, using tools like sql recon and xp_cmdshell to achieve a system-level reverse shell.
Enumerate cross-forest trusts and identify domain users, admin rights, and service principal names to plan targeted access, using PowerShell to query trusts and enumerate accounts.
Explore cross-forest AS-REP roasting, a Kerberos attack that uses a standard user's credentials to obtain a service ticket from the KDC, crack offline passwords with hashcat, and access domain data.
Cross-forest kerberoasting enables privilege escalation by cracking offline tickets across forest trusts, enumerating service principal names, and targeting enterprise admin access.
Explore an acl attack chain in Active Directory, tracing attack paths from delegated control over organizational units to password resets, credential dumping with Mimikatz, and domain privilege escalation.
Explore foreign group membership to escalate privileges in a domain, leveraging foreign forest admins, Mimikatz, and golden tickets to obtain system access.
Explains a domain trust abuse scenario in a parent-child Active Directory setup and demonstrates password spray to escalate from a standard user to domain admin and enterprise admin.
Explores an active directory red-team engagement using the extrasids attack, covering credential dumping with Mimikatz, seeding a child domain, enterprise admins, and pass-the-ticket techniques to reach the domain controller.
Understanding Windows Active Directory is an invaluable skill for security professionals for several compelling reasons
1 Critical Infrastructure: Active Directory is a critical component in most Windows-based networks, serving as the backbone for authentication, authorization, and resource management. Penetrating Active Directory can lead to unauthorized access to sensitive information, making it a prime target for attackers. Understanding how to test and secure it is essential for protecting overall network security.
2 Common Attack Vector: Active Directory is a common target for attackers attempting to compromise an organization's network. Knowing how to conduct penetration testing allows security professionals to identify and address vulnerabilities before malicious actors can exploit them.
3 Risk Mitigation: By proactively testing Active Directory, security professionals can identify and mitigate potential risks and vulnerabilities. This proactive approach is essential for preventing security incidents and data breaches.
4 Career Advancement: For individuals pursuing a career in cybersecurity, having expertise in Active Directory penetration testing is a valuable skill. Employers often seek professionals who can assess and enhance the security of critical infrastructure components like Active Directory.
Red Team Operations: Active Directory penetration testing is a fundamental skill for red team operations. Red teams simulate real-world attacks to test an organization's defenses, and a strong understanding of Active Directory is essential for effective red teaming.
In summary, learning Active Directory penetration testing is important for enhancing cybersecurity, preventing unauthorized access, meeting compliance requirements, and staying ahead of evolving cyber threats. It equips security professionals with the skills needed to protect critical IT infrastructure and respond effectively to security challenges.