Imagine a massive phone book that not only lists everyone in a company but also knows their permissions, what computers they can access, and what software they can run. That's Active Directory (AD) - Microsoft's directory service that's the backbone of nearly every enterprise Windows network.
Understanding AD architecture is essential before attacking it. You need to know what forests, domains, and trusts are before you can exploit them. Think of this as learning the layout of the building before planning the heist.
AD is Everywhere
Core AD Components
Domain
A domain is a logical grouping of objects (users, computers, groups) that share the same AD database and security policies. Think of it as a company's main office - everyone inside shares resources and follows the same rules.
- Has a unique name (e.g., corp.local, contoso.com)
- Contains a shared database of objects
- Has at least one Domain Controller (DC)
- Enforces security policies across all members
Domain Controller (DC)
The Domain Controller is the server that runs AD and manages authentication and authorization. It's the crown jewel - compromise the DC, compromise the domain.
Forest
A forest is a collection of one or more domains that share a common schema and global catalog. It's the highest level of organization - like a parent company with subsidiaries.
Organizational Units (OUs)
OUs are containers within a domain that organize objects. They're used to apply Group Policies and delegate administration. Think of them as departments within the company.
OUs vs Groups
AD Objects
Users
User accounts for authentication and authorization.
Computers
Machine accounts for domain-joined computers.
Groups
Collections of users, computers, or other groups.
- Security Groups: Used for permission assignment
- Distribution Groups: Used for email distribution
- Domain Local: Used in a single domain
- Global: Used across domains in forest
- Universal: Used across forests
Important Built-in Groups
Trust Relationships
Trusts allow users in one domain to access resources in another. They're like partnerships between companies - "I trust your IDs, so your employees can enter my building."
Trust Types
- Parent-Child: Automatic, two-way between parent and child domains
- Tree-Root: Between root domains of different trees
- Shortcut: Optimize authentication in large forests
- External: Between domains in different forests
- Forest: Between entire forests
Trust Direction
Trust Attack Surface
Key AD Services
- LDAP (389/636): Query and modify directory data
- Kerberos (88): Authentication protocol
- DNS (53): Name resolution (AD-integrated)
- SMB (445): File sharing, Group Policy
- RPC (135, dynamic): Remote procedure calls
- Global Catalog (3268/3269): Forest-wide search
AD Replication
Multiple DCs replicate data between each other for redundancy. This replication is exploitable via DCSync attacks - we pretend to be a DC and request the password database.
Knowledge Check
Challenges
Key Takeaways
- Active Directory is the backbone of most enterprise networks
- A forest contains domains that share schema and global catalog
- Domain Controllers store the AD database (NTDS.dit) with all credentials
- Trusts allow cross-domain access and are often misconfigured
- Domain Admins control one domain; Enterprise Admins control the forest
- Key ports: 88 (Kerberos), 389 (LDAP), 445 (SMB), 636 (LDAPS)