Active Directory Enumeration

Before you exploit anything in Active Directory, you need to understand what you’re working with. Enumeration is the most critical phase of attacking AD — because if you skip it or do it poorly, you’ll miss the attack paths that matter.

This post covers how to map out users, groups, computers, trusts, and permissions using the most effective tools available to pentesters.

In AD, the key to compromise isn’t always a zero-day — it’s misconfiguration, and excessive trust. Enumeration reveals:

  • Who the users are
  • What groups they belong to
  • Where admins log in
  • What accounts are roastable
  • Which systems are vulnerable to lateral movement or privilege escalation

You’re building the blueprint for everything that follows.

  • PowerView
  • BloodHound / SharpHound
  • Kerbrute
  • rpcclient
  • smbclient
  • ldapsearch
  • CrackMapExec (light use here)

PowerView is a PowerShell toolset for querying Active Directory objects.

Import the module:

Import-Module .\PowerView.ps1
Get-DomainUser
# Lists all domain users
Get-DomainUser -SPN
# Lists accounts with registered service SPNs
Get-DomainGroup
# Lists all domain groups
Get-DomainGroupMember -Identity "Domain Admins"
# Shows who has the highest privilege
Find-DomainUserLocation -UserName Administrator
# Attempts to find where the user is logged in

BloodHound maps relationships and permissions in AD that are hard to spot manually.

.\SharpHound.exe -c All --zipfilename data.zip
# Collects all AD data
# Drag-and-drop into the BloodHound GUI

Use built-in queries like:

  • Shortest Paths to Domain Admins
  • Users with Kerberoastable SPNs
  • Accounts with GenericAll on high-priv targets

BloodHound shows you where your current access can go.

Kerbrute is great for enumerating valid usernames and performing password sprays against the KDC.

kerbrute userenum -d corp.local users.txt --dc 192.168.56.101
# Identifies valid users based on Kerberos error responses

Useful for basic info gathering when SMB ports (139/445) are open.

rpcclient -U "" 192.168.56.101
# Anonymous bind

Then:

enumdomusers
queryuser <RID>
enumdomgroups

This is an old-school but reliable method.

Enumerate shared folders over SMB:

smbclient -L //192.168.56.101 -N
# Lists available shares anonymously

If you have creds:

smbclient //192.168.56.101/share -U username
# Connects to a specific share

Look for:

  • Backup shares
  • IT or SYSVOL folders
  • Scripts or config files

Search Active Directory over LDAP directly:

ldapsearch -x -h 192.168.56.101 -b "dc=corp,dc=local"
# Pulls AD data anonymously

With creds:

ldapsearch -x -D "corp\\user" -w 'Password123' -H ldap://192.168.56.101 -b "dc=corp,dc=local"

Great for parsing raw AD data if you need low-level access.

crackmapexec smb 192.168.56.0/24 -u user -p 'Password123'
# Quickly finds where credentials are valid

You can also check for admin access:

crackmapexec smb 192.168.56.0/24 -u user -p 'Password123' --local-auth
  • Users with SPNs → For Kerberoasting
  • Users with DoesNotRequirePreAuth → For AS-REP Roasting
  • Where users are logged in → For lateral movement
  • Group memberships → For privilege escalation
  • Misconfigured ACLs → For BloodHound attacks

Active Directory enumeration is about discovery, not exploitation. You’re gathering information to make smart decisions later. Don’t rush it.

TargetTool Example
Users, groupsPowerView, BloodHound, Kerbrute
SPNs, roastablesPowerView, Rubeus, GetUserSPNs.py
Trusts, sessionsBloodHound
Shares and loginssmbclient, rpcclient
LDAP structureldapsearch

Scroll to Top