basic-enumeration
For enumeration we can use the following tools:
The ActiveDirectory PowerShell module (MS signed and works even in PowerShell CLM)
https://learn.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps
https://github.com/samratashok/ADModule
BloodHound (C# and PowerShell Collectors)
https://github.com/BloodHoundAD/BloodHound
PowerView (PowerShell)
https://github.com/ZeroDayLab/PowerSploit/blob/master/Recon/PowerView.ps1
SharpView (C#) - Doesn't support filtering using Pipeline
https://github.com/tevora-threat/SharpView/
Basic Enumeration
ℹ️ Info:
PowerView is used primarily on this page unless stated otherwise.
Domain Enumeration
Get current domain
Get-DomainGet object of another domain
Get domain SID for the current domain
Domain Policy Enumeration
Get domain policy for the current domain
Get domain policy for another domain
Get Domain Kerberos Policy Information
Domain Controller Enumeration
Get Domain Controllers for the current domain
Get Domain Controller for another domain
Get Primary Domain Controller
Get Primary Domain Controller of different Domain
Domain User Enumeration
Get Domain Users Information
Get Domain Users Information of different Domain
Get list of all properties for users in the current domain
Get Domain Users with Descriptions
Get Domain Enabled Accounts
Get Domain Users and their Groups
Get Foreign Users
Get last Domain User logged on
Get actively logged users on a computer (needs local admin rights on the target)
Get locally logged users on a computer (needs remote registry on the target started by default on server OS)
Get Domain Kerberoastable Accounts
Get Domain AS-REP Roastable Accounts
Get Constrained Delegation enabled Accounts
Get Enterprise Admins
Domain User Hunting
Find all machines on the current domain where the current user has local admin access
This can also be done with the help of remote administration tools like WMI and PowerShell remoting. Pretty useful in cases ports (RPC and SMB) used by Find-LocalAdminAccess are blocked.
Find computers where a domain admin (or specified user/group) has sessions
Find computers where a domain admin session is available and current user has admin access
Find computers (File Servers and Distributed File servers) where a domain admin session is available.
List sessions on remote machines (InvokeSessionHunter)
https://github.com/Leo4j/Invoke-SessionHunter
An opsec friendly command would be (avoid connecting to all the target machines by specifying targets)
Domain Computer Enumeration
Get Domain Computers Information
Get short Domain Computers Information
Get Domain Computers Information of alive Computers
Get Domain Computers with Unconstrained Delegation enabled
Get Domain Computers with Constrained Delegation enabled
Get Domain Computers with specific Operating System
Domain Group Enumeration
Get Domain Groups Information
Get Domain Groups Information of different Domain
Get Domain Groups Name
Get Domain Groups a User is in
Get Members of Domain Group
Get Domain Groups and Members of Domain Groups
Get Recursive search of Domain Groups
Get Domain Groups containing a specific word
Get Domain Groups with Administrator privileges
Get Foreign Groups
Get Local Groups
Get Local Groups of different Computer
Get Members of Local Group
Get Local Groups of Domain Controllers
Domain Group Policy Enumeration
**Get Domain GPOs
Get Domain GPOs applied to Computer
Get Domain GPOs Restricted Groups
Get users which are in a local group of a machine using GPO
Get machines where the given user is member of a specific group
Get Domain GPOs Permissions
Get Domain GPO Restricted Groups and list each member of the groups
Domain Organizational Unit Enumeration
Get OUs in a domain
Get Domain Organizational Units of different Domain
Get GPO applied on an OU
Get users which are in a local group of a machine in any OU using GPO
**Get the users inside a OU **
Domain Acces Control List Enumeration
Get Domain ACLs
Get Domain ACLs of User
Get Domain ACLs of Computer
Get Domain ACE of File
Get Interesting Domain ACLs of User
Get ACLs of specific domain
Domain Trust Enumeration
Get Domain Trusts
Get Domain Trusts of different Domain
Get All Domain Trusts
Get Domain Forest
Get Domains inside the Forest
Get Global Catalog of Forest
Get Forest Trusts
Last updated