AD Fundamentals
Domains and trusts.
AD Fundamentals is a free Ethical Hacking Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Is Active Directory?
Active Directory (AD) is Microsoft's directory service for managing users, computers, and resources in a Windows network. It provides centralized authentication and authorization.
Almost every enterprise runs AD, which makes it a prime target. Compromising AD often means compromising the entire organization.
Domains
A domain is the core administrative boundary in AD. It groups objects (users, groups, computers) under a shared database and security policy.
Each domain has a name like corp.example.com. All authentication within the domain is handled by domain controllers.
Domain Controllers
A Domain Controller (DC) is a server that runs AD Domain Services. It stores the directory database, authenticates logins, and enforces policy.
The directory database lives in the file NTDS.dit. Stealing this file (along with the boot key) lets an attacker extract every password hash in the domain.
C:\Windows\NTDS\ntds.dit
# directory database, contains all account hashesForests and Trees
A tree is one or more domains sharing a contiguous namespace. A forest is the top-level container holding one or more trees.
The forest is the real security boundary in AD. Within a forest, domains can be reached through trust relationships.
Trusts
A trust is a relationship that lets users in one domain access resources in another. Trusts can be:
- One-way or two-way: defines direction of access.
- Transitive or non-transitive: whether trust flows through to other domains.
Misconfigured trusts allow attackers to pivot across domains and forests.
Organizational Units and GPOs
Organizational Units (OUs) are containers used to organize objects and delegate administration.
Group Policy Objects (GPOs) apply configuration and security settings to OUs, domains, or sites. Attackers who can edit a GPO can push malicious settings or scripts to many machines at once.
Kerberos Authentication
AD uses Kerberos as its primary authentication protocol. Instead of sending passwords, clients exchange tickets issued by the Key Distribution Center (KDC) running on the DC.
A user first gets a Ticket Granting Ticket (TGT), then uses it to request service tickets. Many AD attacks abuse this ticketing system.
LDAP and Enumeration
AD exposes its directory over LDAP (Lightweight Directory Access Protocol). Authenticated users can query enormous amounts of information: users, groups, computers, and their attributes.
This is why even a low-privileged domain account is valuable. It can enumerate the entire directory to find paths to higher privileges.
ldapsearch -x -H ldap://dc.corp.local -b 'dc=corp,dc=local' '(objectClass=user)'Key Privileged Groups
Certain groups are the crown jewels of any domain:
- Domain Admins: full control of the domain.
- Enterprise Admins: control across the entire forest.
- Schema Admins: can modify the AD schema.
Privilege escalation in AD usually means finding a path into one of these groups.
Service Principal Names
A Service Principal Name (SPN) uniquely identifies a service instance tied to an account. Kerberos uses SPNs to issue service tickets.
Accounts with SPNs are interesting targets because their service tickets can be requested and cracked offline, a technique called Kerberoasting that you will study next.
setspn -Q */*
# enumerate service principal names in the domainWhy AD Is a Target
AD centralizes identity for the whole organization, so a single foothold can cascade into total control. Attackers chain low-privilege access, enumeration, and credential theft to reach Domain Admin.
Understanding the structure (domains, trusts, Kerberos, LDAP, privileged groups) lets you spot these paths before an adversary does.
Quick Check
Test your understanding of AD structure.
Recap
You now know the building blocks of Active Directory:
- Domains group objects; domain controllers authenticate and store the
NTDS.ditdatabase. - Forests are the security boundary; trusts enable cross-domain access.
- Kerberos and LDAP drive authentication and enumeration.
- Domain Admins and SPNs are high-value targets.
Next you will attack Kerberos directly with Kerberoasting.
Frequently asked questions
Is the “AD Fundamentals” lesson free?
Yes — the full text of “AD Fundamentals” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.
What will I learn in “AD Fundamentals”?
Domains and trusts. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Ethical Hacking Academy?
No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “AD Fundamentals” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Ethical Hacking Academy lesson?
Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- AD Fundamentals
- Kerberoasting
- Pass-the-Hash
- BloodHound