ENUMERATE DOMAIN INFORMATION¶
-
Retrieve Detailed Information about a Domain User:
Get-DomainUser -Identity mmorgan -Domain inlanefreight.local | Select-Object -Property name, samaccountname, description, memberof, whencreated, pwdlastset, lastlogontimestamp, accountexpires, admincount, userprincipalname, serviceprincipalname, useraccountcontrol
-
List Members of the "Domain Admins" Group, Including Nested Group Memberships:
Get-DomainGroupMember -Identity "Domain Admins" -Recurse
-
List Trust Relationships for the Domain:
Get-DomainTrustMapping
-
Check Administrative Access to a Specific Machine:
Test-AdminAccess -ComputerName ACADEMY-EA-MS01
-
Identify Users with the SPN Property Set (Useful for Kerberoasting):
Get-DomainUser -SPN -Properties samaccountname, ServicePrincipalName
-
Enumerate Local Groups on a Specified Target:
Get-NetLocalGroup -ComputerName <target>
-
Enumerate Members of the Local Administrators Group on a Specified Target:
Get-NetLocalGroupMember -ComputerName <target> -GroupName "Administrators"
-
Enumerate Shares on a Specified Target:
Get-NetShare -ComputerName <target>
-
Find Reachable Shares on Domain Machines:
Find-DomainShare
-
Search for Files Matching Specific Criteria on Readable Shares in the Domain:
Find-InterestingDomainShareFile
-
Return a List of All Distributed File Systems for the Domain:
Get-DomainDFSShare
-
Return the Default Domain Policy or the Domain Controller Policy:
Get-DomainPolicy
DOMAIN INFORMATION¶
-
Get Current Domain:
Get-NetDomain
-
Enumerate Other Domains:
Get-NetDomain -Domain $DomainName
-
Get Domain SID:
Get-DomainSID
-
Get Domain Policy:
Get-DomainPolicy
(Get-DomainPolicy)."system access"
(Get-DomainPolicy)."kerberos policy"
-
Get Domain Controllers:
Get-NetDomainController
Get-NetDomainController -Domain $DomainName
-
Get Detailed Domain Info:
Get-NetDomain -FullData
ENUMERATE DOMAIN USERS¶
-
Enumerate Domain Users:
Get-NetUser
Get-NetUser -SamAccountName $user
Get-NetUser | select cn
Get-UserProperty
-
Check Last Password Change:
Get-UserProperty -Properties pwdlastset
-
Get Specific Attribute Value:
Find-UserField -SearchField Description -SearchTerm "wtver"
-
Enumerate Users Logged on a Machine:
Get-NetLoggedon -ComputerName $ComputerName
-
Enumerate Session Information:
Get-NetSession -ComputerName $ComputerName
-
Enumerate User Locations:
Find-DomainUserLocation -Domain $DomainName | Select-Object UserName, SessionFromName
ENUMERATE DOMAIN COMPUTERS¶
-
Enumerate Domain Computers:
Get-NetComputer -FullData
Get-NetComputer -Ping
-
Enumerate Live Machines:
Get-NetComputer -Ping
ENUMERATE GROUPS AND GROUP MEMBERS¶
-
Enumerate Group Members:
Get-NetGroupMember -GroupName "$GroupName" -Domain $DomainName
-
Get Group Members:
Get-DomainGroup -Identity $GroupName | Select-Object -ExpandProperty Member
-
Enumerate GPO Local Group Membership:
Get-DomainGPOLocalGroup | Select-Object GPODisplayName, GroupName
-
Enumerate All Groups:
Get-NetGroup -FullData
ENUMERATE SHARES¶
-
Enumerate Domain Shares:
Find-DomainShare
-
Enumerate Accessible Domain Shares:
Find-DomainShare -CheckShareAccess
ENUMERATE GROUP POLICIES¶
-
Get Group Policies:
Get-NetGPO
-
Get Group Policy for Machine:
Get-NetGPO -ComputerName $ComputerName
-
Get Local Admin Group Users:
Find-GPOComputerAdmin -ComputerName $ComputerName
ENUMERATE OUS¶
- Enumerate OUs:
Get-NetOU -FullData
Get-NetGPO -GPOname $GPO_GUID
ENUMERATE ACLS¶
-
Get ACLs for a User:
Get-ObjectAcl -SamAccountName $UserName -ResolveGUIDs
-
Get ACLs for a Specific Path:
Get-PathAcl -Path $Path
-
Search for Interesting ACEs:
Invoke-ACLScanner -ResolveGUIDs
ENUMERATION OF DATA¶
-
Enumerate Domain Trusts:
Get-NetDomainTrust
Get-NetDomainTrust -Domain $DomainName
-
Enumerate Forest Trusts:
Get-NetForestTrust
Get-NetForestDomain -Forest $ForestName
-
Get DNS Zones and Records:
Get-DNSZone
Get-DNSRecord
-
Get All Domain Sites and Subnets:
Get-NetSite
Get-NetSubnet