Last updated: April 29, 2026
The first step of every AD attack is enumeration. Before exploitation, before lateral movement, before privilege escalation — you map the terrain. AD’s fundamental design choice of “authenticated users read everything” means attackers and defenders enumerate with the same tools, seeing the same data. The difference is what they do with it.
Why enumeration works so well
AD’s LDAP schema is open by design. Any authenticated user can query for:
- All user objects (names, descriptions, email, employee IDs, last logon)
- All group memberships (including privileged groups)
- All computer objects (hostnames, operating systems, last logon)
- All OU structure
- All Group Policy Objects (name, links, CDN paths to SYSVOL)
- All ACLs on nearly every object
- All trust relationships to other forests
- All service principal names (attack target for Kerberoasting)
This information was intended for sysadmins. It is equally useful to anyone with any authenticated credential. And getting one authenticated credential is usually trivial (Responder, phishing, password spray).
Enumeration toolkit
# BloodHound Python data collector (most common 2026)
bloodhound-python -u alice.smith -p 'Password1' \
-d corp.local -c All -ns 10.1.1.1
# SharpHound (Windows, C# — stealthier on monitored networks)
SharpHound.exe -c All -d corp.local
# Impacket — raw LDAP + SMB enumeration
GetADUsers.py -all CORP/[email protected]
GetNPUsers.py CORP/ -usersfile users.txt -no-pass
GetUserSPNs.py CORP/alice:'Password1' -dc-ip 10.1.1.1
# CrackMapExec — multi-protocol lateral enumeration
crackmapexec smb 10.0.0.0/24 -u alice -p 'Password1' --shares --users --groups
crackmapexec ldap 10.1.1.1 -u alice -p 'Password1' --trusted-for-delegation
crackmapexec smb 10.0.0.0/24 -u alice -p 'Password1' --loggedon-users
# ldapsearch (Linux native, safest for noisy networks)
ldapsearch -H ldap://dc.corp.local -D '[email protected]' -w 'Password1' \
-b 'DC=corp,DC=local' '(objectClass=user)'
# PowerView (PowerShell, from within a Windows session)
Get-DomainUser | Select samaccountname, description
Get-DomainGroupMember 'Domain Admins'
Find-DomainShare -CheckShareAccess
Get-DomainComputer -Properties Name, OperatingSystem, LastLogon
Data you gather
A full BloodHound collection on a 10,000-employee AD yields ~2 GB of JSON. Key categories:
- Users: every user object with attributes. Reveals naming conventions, admin accounts (names like ‘admin’, ‘backup’, ‘svc_’), service accounts.
- Groups: privileged groups (Domain Admins, Enterprise Admins, Schema Admins, backup groups, custom “Server Admins”). Group nesting often reveals paths.
- Computers: operating systems (Windows XP/Server 2003 still live = unpatched), trust relationships, delegation settings.
- Sessions: which users have logged onto which computers recently (cached sessions = credential cache opportunities).
- ACLs: who can write to what. Common attack path: “Service Desk” group has WriteDacl on Domain Admins (for password resets). Compromise any helpdesk account → reset DA password.
- GPOs: group policy objects and where applied. Finding GPP cPassword is still possible.
- Trusts: which other domains trust this one, with what flags (SID filtering? transitive?).
BloodHound queries that matter
# In BloodHound GUI, common queries:
# 1. Shortest Paths to Domain Admins
# (from any user you compromised)
# 2. Shortest Paths from Kerberoastable Users
# 3. Find Principals with DCSync Rights
# 4. Find Computers where Domain Users are Local Admin
# 5. Shortest Path from Owned (marked) to Domain Admins
# Custom Cypher queries for attack paths not in default set:
MATCH p=shortestPath((u:User {owned:true})-[r*1..]->(g:Group {name:'DOMAIN [email protected]'}))
RETURN p
# Find ACL-based paths (not just group membership)
MATCH p=shortestPath((u:User {owned:true})-[r:WriteDacl|GenericAll|GenericWrite|WriteOwner*1..]->(g:Group))
RETURN p
Enumeration without credentials
Some enumeration works with anonymous bind (if enabled) or SMB null session (if enabled):
# Anonymous LDAP bind
ldapsearch -H ldap://dc.corp.local -b 'DC=corp,DC=local' '(objectClass=*)'
# SMB null session
rpcclient -U '' -N dc.corp.local
rpcclient$> enumdomusers
rpcclient$> enumdomgroups
# Usually disabled in modern AD, but mergers + legacy = found in the wild
# CVE-2020-1472 (Zerologon) also required zero credentials
# CVE-2022-30216 (Kerberos delegation) similar
Real enumeration findings
Engagement statistics from published pentest retrospectives:
- Average BloodHound run finds 3-8 distinct paths from a standard user to Domain Admins on un-hardened domains
- ~70% of domains have at least one Kerberoastable service account with a crackable password
- ~40% have ACL-based paths to sensitive groups from non-privileged users
- ~25% have GPP cPassword remnants in SYSVOL despite 2014 patch
- ~15% have ADCS misconfigurations enabling ESC1-ESC8 attack paths
- ~10% have anonymous LDAP bind still enabled
Enumeration as defender
Defenders benefit from the same enumeration. Run BloodHound quarterly against your own domain. Fix the findings. Repeat. Commercial alternatives: BloodHound Enterprise (paid), PingCastle, Purple Knight (Semperis), ADRecon.
# PingCastle — free domain security scoring
PingCastle.exe --healthcheck --server corp.local
# Produces HTML report with rated findings
# Purple Knight — free Semperis tool
# GUI; generates posture report + remediation suggestions
# ADRecon (PowerShell) — reconnaissance report
# Generates Excel workbook with all AD objects + risk indicators
Detection of enumeration
Attacker enumeration generates LDAP queries. Volume + patterns differ from normal admin use. Detections:
- Large LDAP queries returning many objects (Windows event 1644 if enabled, or Directory Services logs)
- User account running BloodHound-like query patterns (many sequential queries)
- Unusual source — normal user’s workstation running LDAP queries for every user object
- SharpHound-specific detections: PowerShell command lines, specific API calls, temp files
In practice, many organizations don’t monitor LDAP query volume. Attackers routinely run full BloodHound collection without tripping alerts.
Mindset takeaway
AD enumeration is free for any authenticated user. The information gathered (attack paths, ACL misconfigurations, service accounts) often maps directly to domain compromise. If your program’s posture relies on attackers not knowing your AD layout, your posture is fragile. Assume adversaries have a full BloodHound export and build defense from there.
Module Quiz · 10 questions
Pass with 80%+ to mark this module complete. Unlimited retries. Each question shows an explanation.
Custom team training + practitioner advisory
Beyond the free academy — we run private workshops, vCISO advisory, and red-team exercises tailored to your stack. For Indian SMBs scaling past their first hire.