Active Directory Enumeration Part-1
Last updated
Was this helpful?
Last updated
Was this helpful?
In this blog post, we will be enumerating data manually from the current domain, other sub-domains, forest, external trusts along with getting a basic understanding of the Active Directory infrastructure.
This all enumeration can also be achieved using BloodHound (an excellent tool) to enumerate the Active Directory Environment. However, we need to understand on a surface level that how things work in AD to proceed with the further exploitation and lateral movement.
We need to understand the domain trust as we will be enumerating the data from other domains.
Uni-directional
Bi-Directional
Unidirectional (One-way trust): Users in the trustee domain can access resources in the trusting domain but not vice-versa.
Bi-directional (Two-way trust): Users of both domains can access resources from each other.
Transitive
Non-transitive
Transitive - Can be extended to establish a trust relationship with other domains.
All the default intra-forest trust relationship (Tree-root, Parent-Child) between domains within the same forest are transitive (two-way trusts).
Nontransitive - cannot be extended to other domains in the forest. Can be two-way or one-way.
This is the default trust (called external trust) between two domains in different forests when forests do not have a trust relationship.
Current Domain
Sister/child Domain
Forest
From all the above-mentioned points we will be enumerating the following data:
Users
Computers
Groups
Group Membership of users
ACLs
Logged ON Users
Domain Administrators
Enterprise Administrators
Network Shares
OUs
GPOs
Applied ACLs for the user group
Domain Trust Mapping
Forest Mapping
Local Admin Access
PowerView
ADModule
Before enumerating the data from other domains we need to understand the trust between the current domain(where the current laptop is assigned) and other domains.
I want you to analyze which kind of trust and connectivity should be established to enumerate data from other domains
Dividing into multiple parts:
Part-1:
Trust Enumeration
Domain Enumeration
Forest Enumeration
Domain Controllers
Domain trusts for the current & other domain
Forest Trust Enumeration
Get Current Domain (where the current laptop is assigned)
Get the object of another domain
Get details about the current forest
Get details about the other forest
Get all domains in the current forest
Global catalogs for the current forest
Get SID of the current domain
Get the domain policy of the current domain
Get the domain policy of another domain
Get the domain controller for the current domain
Get the domain controller for another domain
NOTE: You may find challenges while loading these scripts. To avoid it kindly refer execution policy and AMSI bypassing techniques which can be achieved without privileged/local admin access.
References