Given a suspected compromised network segment(s), access to a system that can gather the structure of the suspected domain.
Operator Note: Enumerating Active Directory structure is essential during incident response to detect unexpected organizational units, rogue accounts, or misconfigured objects.
Operator Note: Use baseline domain structure documentation when available to detect unauthorized additions or changes.
The structure of the domain is enumerated based on the specific sub-task accomplished and any anomalies on the domain will be identified.
Operator Note: Findings should be shared with the incident lead and mission partner domain administrators.
$adddomain = Get-ADDomain
$adddomain
Example output:
AllowedDNSSuffixes : {}
ChildDomains : {}
ComputersContainer : CN=Computers,DC=team01,DC=tgt
--snipped--
Get-ADObject -Filter { ObjectClass -eq 'organizationalunit' } -Properties CanonicalName | Select-Object -Property CanonicalName
Example output:
CanonicalName
-------------
team01.tgt/Domain Controllers
team01.tgt/Microsoft Exchange Security Groups
team01.tgt/Groups
team01.tgt/Chula Vista
--snipped--
Operator Note: This command lists the hierarchy of Organizational Units. Unexpected or newly created OUs should be reviewed carefully.
Output should follow naming convention format:
[mm/dd/yyyy_hh:mm:ss_AD_Structure_(xx.xx.xx.xx/x)]
Notify mission element lead and intelligence analyst of completion.
Download script from 2.14_Gather_AD_Structure_Information.
Run script:
.\2.14_GatherADStructureInfo.ps1
Example script output:
[+] Writing Active Directory structure to C:\Users\btadmin\Desktop\CyberSurfers\CyberSurfers_ACL_1593261366.22937.txt...
[+] Done!
CyberSurfers
directory for review.cat .\CyberSurfers\CyberSurfers_ACL_1593261366.txt
Example contents:
[+] Domains infrastructure master: Team01-DC01.team01.tgt
[+] The Active Directory structure as follows:
DC=team01,DC=tgt
--> OU=Alameda
----> OU=Computers
----> OU=Groups
----> OU=Servers
----> OU=Users
--snipped--
RSAT: Active Directory
)Import-Module ActiveDirectory
Operator Note: RSAT tools must be installed on the analyst workstation or jump box. Windows Server and domain-joined systems typically include them.
dsquery
(legacy command-line):dsquery ou -limit 0
Microsoft PowerShell AD Module Cmdlets
ADExplorer by Sysinternals
BloodHound AD Mapping
2.14_GatherADStructureInfo.ps1
script.Platform | Tool | Purpose |
---|---|---|
Windows | PowerShell + AD Module | Primary enumeration tool |
Windows | ADExplorer (Sysinternals) | Offline and advanced AD viewer |
Universal | BloodHound (optional) | Advanced AD relationship and path analysis |
Get-ADDomainController -Filter *
Get-ADReplicationSite -Filter *
dsquery ou -limit 0
Date | Version | Description | Author |
---|---|---|---|
2025-05-02 | 1.8 | Full original + enriched AD enumeration tooling, procedures, and operator notes | Leo |