Given domain credentials with the appropriate permissions, and an incident response workstation with necessary tools and access to the Primary Domain Controller (DC) for the target domain.
Operator Note: Identifying AD groups and their attributes allows responders to detect rogue groups, privilege escalation attempts, and unauthorized changes.
Canonical Name | Display Name | Distinguished Name |
---|---|---|
Group Category | Group Scope | Object GUID |
sAMAccountName | Security Identifier (SID) | Creation Date/Time |
Modified Date/Time |
Operator Note: Attributes such as creation and modification dates help identify suspicious group creation or changes during an incident.
All Domain Groups have been exported to a CSV file with sufficient information to allow for detection of malicious activity.
Import-Module ActiveDirectory
Get-ADGroup -Filter * -Properties * |
Select-Object Name, DisplayName, DistinguishedName, GroupCategory, GroupScope, ObjectGUID, sAMAccountName, SID, whenCreated, whenChanged |
Export-Csv ADGroupsExport.csv -NoTypeInformation
Operator Note: Adding
whenCreated
andwhenChanged
provides vital timeline data for analysis.
Get-ADGroup -Filter * | ForEach-Object {
Get-ADGroupMember $_ | Select-Object Name, SamAccountName, objectClass | Export-Csv "$($_.Name)_Members.csv" -NoTypeInformation
}
Operator Note: This optional step helps in identifying suspicious group members.
dsa.msc
Operator Note: Use only if PowerShell is unavailable. This method provides limited attributes.
Import-Module ActiveDirectory
Tool | Platform | Use Case |
---|---|---|
PowerShell + AD Module | Windows | Primary export method for comprehensive group attributes |
ADUC (RSAT - dsa.msc) | Windows | Manual export |
ADExplorer (Sysinternals) | Windows | AD object viewer, supports export |
LDAP Search Tools | Cross-platform | Lightweight alternate method |
Get-ADGroup PowerShell syntax
Get-ADGroupMember syntax
Compare-Object syntax
Date | Version | Description | Author |
---|---|---|---|
2025-05-02 | 1.9 | Full original + enriched PowerShell export, alternate tooling, operator checklist and recommendations | Leo |