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.
Related SMB Tool Recommendations
Knowledge Check
Frequently Asked Questions
Continue Learning
BloodHound Guide: Mapping Active Directory Relationships
Learn how to use BloodHound and SharpHound for Active Directory reconnaissance, attack path analysis, privilege escalation detection, and security assessment.
Active Directory · AdvancedLateral Movement: Moving Through Network Environments
A comprehensive guide to lateral movement techniques in Windows networks including pass-the-hash, pass-the-ticket, PSExec, WMI, DCOM, and WinRM for authorized penetration testing.
Active Directory · AdvancedActive Directory Fundamentals: Windows Network Domains
A comprehensive introduction to Microsoft Active Directory covering domain services, LDAP, Group Policy, authentication protocols, and security fundamentals for Windows enterprise environments.
Active Directory · AdvancedGolden Ticket Attacks: Kerberos Ticket Forging Explained
Deep technical analysis of golden ticket attacks against Kerberos authentication, including how forged TGTs work, creation techniques, detection methods, and prevention strategies.
Related Security Tools
Enum4linux
Learn how to use Enum4linux to enumerate Windows and Samba systems over SMB: install it on Kali Linux, run your first scan, read the users, shares, groups and password policy it returns, and switch to enum4linux-ng for modern hosts that block null sessions.
Information Gatheringldapsearch
ldapsearch is a shell-accessible interface to the ldap_search_ext library function, designed to open active queries against corporate Active Directory database frameworks.
Information GatheringSMBClient
Learn how to use SMBClient on Kali Linux: install Samba's FTP-like SMB/CIFS client, list shares, connect as a guest or with credentials, browse folders, and upload or download files on Windows, Samba, or NAS devices. For authorized assessments, check ports 139/445 with Nmap before testing share permissions.
Information Gatheringenum4linux-ng
enum4linux-ng is a next-generation version of the classic enum4linux script, rewritten from scratch in Python 3 to parse and enumerate Windows/Samba information efficiently with cleaner output formats.