Domain Enumeration: Active Directory Reconnaissance Techniques
Comprehensive guide to Active Directory enumeration using native tools, PowerShell, and specialized utilities for discovering users, groups, computers, and trust relationships.
The Importance of Domain Enumeration
Domain enumeration gathers information about an Active Directory environment. It is the foundation of every AD assessment, whether offensive or defensive. Understanding what exists in a domain — users, groups, computers, trusts, ACLs, GPOs, and service accounts — is essential for identifying attack paths and security gaps.
Prerequisites
Native Windows Enumeration
net user /domain # List domain users
net group "Domain Admins" /domain # Domain Admins members
net view /domain # List computers
nltest /dclist:corp.local # List domain controllers
nltest /domain_trusts # List trusts
dsquery user -name "*admin*" # Find admin users
PowerShell Enumeration
# AD Module cmdlets
Get-ADUser -Filter * -Properties Name,SamAccountName,Enabled,LastLogonDate
Get-ADGroupMember -Identity "Domain Admins" -Recursive
Get-ADComputer -Filter {OperatingSystem -like "*Server*"}
Get-ADTrust -Filter *
# Service Principal Name enumeration
Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName
PowerView for Advanced Enumeration
Import-Module .\PowerView.ps1
Get-NetDomain # Domain information
Get-NetUser -SPN # Kerberoastable users
Get-NetGroupMember -GroupName "Domain Admins"
Get-NetComputer -OperatingSystem "Windows 10*"
Get-NetSession -ComputerName target-server # Session enumeration
Get-ObjectAcl -ResolveGUIDs # ACL enumeration
Get-NetDomainTrust # Trust enumeration
Enumeration Focus Areas
Users: Enabled/disabled status, last logon, password policies, SPN presence, group membership.
Groups: Nested membership (effective access often differs from explicit membership).
Computers: Operating system, last logon, IPv4 address.
ACLs: GenericAll, WriteDacl, WriteOwner, GenericWrite permissions on critical objects.
Trusts: Direction (bidirectional, one-way), type (external, forest), transitivity.
Sessions: Where do Domain Admins have active sessions? This reveals lateral movement opportunities.
Real-World Example
A tester gains access to a workstation and uses PowerView to enumerate: 1,200 users, 80 groups (including nested Domain Admin membership revealing 12 effective DAs), 40 kerberoastable accounts, and 3 domain trusts. Session enumeration shows a DA logged into a file server. The tester moves laterally to the file server and dumps credentials.
Common Mistakes
Best Practices
Related Tools
Related Articles
Summary
Domain enumeration is the most critical phase of any AD assessment. Using native tools, PowerShell, and PowerView, security professionals can build a comprehensive picture of users, groups, computers, ACLs, GPOs, and trust relationships. Thorough enumeration reveals the attack surface and provides the foundation for both offensive exploitation and defensive remediation.