Back to Home

AD Fundamentals

Just as Uranium-235 is the fundamental element that makes nuclear fission possible, these are the foundational concepts that make Active Directory attacks possible. Master these, or remain clueless when the meltdown happens.

U
235
Understanding
AD

AD Structure: The Hierarchy

Active Directory is a hierarchical database with a specific structure. Understanding this structure is essential for understanding attack paths, privilege escalation, and why compromising one thing often leads to compromising everything.

Forests, Domains, and Trusts

Forest: The security boundary. The top of the hierarchy. Contains one or more domains. All domains in a forest trust each other by default with transitive trusts.

Domain: A partition of the directory. Has its own DCs, its own KRBTGT account, its own policies. NOT a security boundary. Child domains do NOT provide isolation from the forest root.

Trust: A relationship allowing authentication across boundaries. The trust arrow points FROM the trusting domain TO the trusted domain. Access flows the opposite direction. See diagram below.

Child domains are not security boundaries. A Domain Admin in a child domain can escalate to Enterprise Admin by forging a Golden Ticket containing the Enterprise Admins SID (leveraging SIDHistory semantics). Intra-forest trusts don't filter SIDs by default. Within AD's trust architecture, the forest is the security boundary—though administrative tiering models can create additional operational security boundaries through policy controls.

OUs, Groups, and Group Scopes

Organizational Units (OUs): Containers for organizing objects. Used for Group Policy application and delegation. GPOs can be linked to Sites, Domains, or OUs—with OUs providing the most granular scope for targeting specific groups of users or computers. OUs are NOT security boundaries and are NOT used for access control.

Security Groups: Used for access control. Grant permissions to resources. Come in three scopes:

Domain Local (permissions in this domain), Global (users from this domain, used anywhere in forest), Universal (users from any domain, used anywhere in forest, stored in GC)

AGDLP/AGUDLP: A common mnemonic for group nesting best practice. Accounts go in Global groups, Global groups go in Domain Local groups, Domain Local groups get Permissions. The "U" variant adds Universal groups to bridge domains in multi-domain forests. (See Microsoft's group scope documentation for the underlying concepts.)

Group nesting creates hidden attack paths. User is in Group A, which is in Group B, which is in Group C, which is in Domain Admins. BloodHound exists because this is impossible to track manually.

☢ Trust Direction vs Access Direction ☢
DOMAIN A
Trusting Domain
TRUST ――――→
←―――― ACCESS
DOMAIN B
Trusted Domain
"A trusts B" means B can access A's resources.
The trust arrow points FROM trusting TO trusted.
Access flows the opposite direction.
Trust points toward who you trust. Access flows back toward who trusts you.

Domain Controllers

DCs hold the keys to the kingdom. They store the AD database (NTDS.dit), authenticate users, issue Kerberos tickets, and replicate with each other.

Critical Files:
NTDS.dit (AD database), SYSTEM hive (boot key), SECURITY hive (LSA secrets)

Every DC has a full copy of all credential material for its domain. Compromise one DC, you have everyone's hashes. DCSync doesn't even require DC access, just replication rights.

DCs are Tier 0 assets. Admin on a DC = Domain Admin. Domain Admins should ONLY log on to Domain Controllers, never to workstations or member servers. DA credentials on a compromised workstation = game over.

Group Policy Objects (GPOs)

GPOs push configuration to domain members. Security settings, software deployment, scripts, preferences. Applied based on OU structure.

Local, then Site, then Domain, then OU (LSDOU). Last applied wins.

GPOs are stored in SYSVOL (\\domain\SYSVOL). Writable GPOs = code execution on every machine that processes them. GPO abuse is a common privilege escalation path.

Group Policy Preferences used to store passwords in SYSVOL. MS14-025 patched creation but old cpassword values may still exist.

FSMO Roles

Most AD operations are multi-master (any DC can process them). Five operations require a single authoritative DC. These are the Flexible Single Master Operations roles:

Forest-Wide (one per forest):
Schema Master (schema changes), Domain Naming Master (add/remove domains)
Domain-Wide (one per domain):
RID Master (allocates RID pools for SID creation), PDC Emulator (password changes, time sync, account lockout), Infrastructure Master (cross-domain reference updates)

PDC Emulator: Most critical for operations. Receives urgent password changes, is the authoritative time source, processes account lockouts. Often targeted first in attacks.

Kerberos Time Sensitivity: Kerberos requires clocks to be synchronized within 5 minutes by default (MaxClockSkew). The PDC Emulator is the authoritative time source for the domain. Time skew beyond this tolerance causes authentication failures. Attackers forging tickets need accurate time; defenders can use time-based anomalies for detection.
RID Master: Allocates RID pools to domain controllers for creating new accounts. If the RID Master is unavailable, new account creation will eventually fail once DCs exhaust their allocated pools. Note: The RID Master has no role in Kerberos ticket validation—Golden Tickets can contain any arbitrary RID because the KDC trusts tickets signed with the KRBTGT hash, not because it validates RID allocation.

Sites & Physical Topology

Forests and domains are logical structures. Sites represent physical network topology. AD uses sites to optimize replication and client authentication.

Sites Control:
Replication scheduling, DC locator (which DC clients authenticate to), DFS referrals, service discovery

DC Locator: When a client needs a DC, it queries DNS for SRV records. Site-aware clients prefer DCs in their own site. This affects which DC receives your authentication.

Replication latency: Inter-site replication is scheduled (not instant). Password changes and other updates may take time to propagate. This creates windows where credentials work on some DCs but not others.

Attackers exploit replication delays for persistence: After a password reset, the old credential may still work on DCs that haven't received the update yet. Backdoor accounts created on one DC take time to appear on others. If an account is disabled on the PDC, an attacker can target a different DC where the change hasn't replicated. Attackers can also specifically target DCs in remote sites with known replication lag to extend their access window.

Schema & Partitions

The AD database is divided into partitions, each replicated differently:

Defines object classes and attributes. Forest-wide, replicated to all DCs. Changes are nearly irreversible.
Sites, subnets, replication topology, service connection points. Forest-wide, replicated to all DCs.
Domain Partition:
Users, computers, groups, GPOs for that domain. Replicated only to DCs in that domain.

This explains why schema changes affect the entire forest (Schema Admins are forest-wide dangerous), while user changes only affect one domain.

Global Catalog

The Global Catalog (GC) is a partial replica of all objects in the forest, stored on designated DCs.

GC Contains:
All objects from all domains, but only a subset of attributes. Includes attributes commonly needed for searches and universal group membership.

Why it exists: Without GC, cross-domain queries would require contacting every domain. GC enables forest-wide searches from a single server.

Universal group membership: GCs resolve universal group membership during logon. If no GC is available, logons can fail (unless universal group caching is enabled).

GC doesn't contain password hashes (those stay in domain partitions). But it contains enough for enumeration: usernames, group memberships, SPNs, and other attributes attackers want.
ACL

Security Descriptors & ACLs: Who Controls What

Almost every AD attack reduces to one question: who can modify which object? Understanding Windows authorization means understanding Security Descriptors, DACLs, and why certain permissions are effectively ownership.

Security Identifiers (SIDs): The Foundation of Identity

Before diving into security descriptors, you need to understand SIDs. A Security Identifier (SID) is a unique value that identifies a security principal (user, group, or computer). Every ACE in a DACL references SIDs, not names.

SID Structure:
S-1-5-21-<domain>-<RID>
Example: S-1-5-21-3623811015-3361044348-30300820-1013
• S-1: SID revision
• 5: SECURITY_NT_AUTHORITY
• 21: SECURITY_NT_NON_UNIQUE (domain SID follows)
• 3623811015-3361044348-30300820: Domain identifier (unique per domain)
• 1013: Relative Identifier (RID) - unique within the domain

Why SIDs matter: Windows doesn't care about names. "Domain Admins" is just a friendly name. The DACL contains S-1-5-21-domain-512. If you rename a group, its permissions persist because the SID doesn't change. If you recreate a deleted group with the same name, it gets a NEW SID and loses all permissions.

Well-Known SID Name Why It Matters
S-1-5-18 SYSTEM Local system account. Highest privilege on local machine.
S-1-5-21-domain-500 Administrator Built-in admin. RID 500 is always the original admin account.
S-1-5-21-domain-502 KRBTGT Kerberos service account. Its hash forges Golden Tickets.
S-1-5-21-domain-512 Domain Admins RID 512. Full domain control. The classic target.
S-1-5-21-root domain-519 Enterprise Admins RID 519 in forest root. Full forest control.
S-1-5-32-544 Builtin\Administrators Local Administrators group. Note: 32 prefix = builtin domain.
SID History Attacks: The sIDHistory attribute can contain additional SIDs that are added to a user's token at logon. Originally for migrations, attackers abuse it to inject privileged SIDs (like S-1-5-21-domain-512) into regular accounts. Golden Tickets can include arbitrary SIDs in the PAC. Intra-forest trusts don't filter sIDHistory by default.
RID Hijacking: The RID (last part of the SID) determines the account. An attacker with registry access can modify the RID associated with a local account, effectively making a low-privilege account become the Administrator (RID 500) on next logon. This persists across reboots.
☢ Security Descriptor Anatomy ☢
SECURITY_DESCRIPTOR
Owner SID Who owns this object (can always modify DACL)
Group SID POSIX compatibility (rarely used)
DACL Discretionary Access Control List — contains ACEs (rules)
ACE = Access Control Entry (SID → what access)
✗ DENY S-1-5-21-...-513 (Domain Users) → Write
✓ ALLOW S-1-5-21-...-512 (Domain Admins) → Full Control
✓ ALLOW S-1-10-0 (SELF) → Write userPassword
✓ ALLOW [inherited from parent OU...]
SACL System Access Control List — what gets audited
The DACL contains SIDs, not names. The Owner can always modify the DACL regardless of ACEs.

The Security Descriptor

Every securable object in Windows (files, registry keys, AD objects, services) has a Security Descriptor containing:

Owner: Can always modify the DACL, even if explicitly denied. Ownership is a backdoor to full control.

DACL: Discretionary Access Control List. Contains Access Control Entries (ACEs)—each ACE is a rule specifying a security principal (by SID) and what access they're allowed or denied. If DACL is null, everyone has full access. If DACL is empty (zero ACEs), no one has access.

SACL: System Access Control List. Controls auditing, not access. Requires SeSecurityPrivilege to read/write.

DACL Evaluation

When you try to access an object, the Security Reference Monitor (SRM) walks the DACL, comparing each ACE against your access token's SIDs and requested access mask.

Canonical Order (typical, not guaranteed):
Explicit Deny → Explicit Allow → Inherited Deny → Inherited Allow

Important: This ordering assumes the DACL is in canonical order, which is the default when using standard Windows APIs. However, canonical order is NOT enforced by the kernel—it's the responsibility of the API or caller that creates/modifies the DACL. Low-level manipulation can create non-canonical DACLs where Allow ACEs appear before Deny ACEs.

There is no "default deny ACE." Unlike a firewall with an implicit deny rule, DACLs simply have no match = no access. The SRM walks the list; if it doesn't find an Allow ACE granting the requested access, the request is denied. This is why an empty DACL means no access, while a null DACL means full access to Everyone. (Thanks to Jim Sykora for the correction.)

Attackers look for ACEs that grant write access to objects they shouldn't control. One misconfigured ACE on a privileged object can be a direct path to Domain Admin.

Dangerous Permissions

Not all permissions are equal. Some are effectively ownership:

Ownership-Equivalent:
WriteDACL, WriteOwner, GenericAll, Full Control

WriteDACL: Modify the DACL itself. Grant yourself any other permission. Game over.

WriteOwner: Change the owner. Owners can modify DACLs. Game over.

GenericAll: Full control over the object. Includes WriteDACL. Game over.

These are what BloodHound looks for. If you have WriteDACL on a user, you own that user. If you have it on a group, you can add yourself to that group.

AD-Specific Permissions

AD objects have extended rights and property-specific permissions beyond standard file ACLs:

Critical Extended Rights:
DS-Replication-Get-Changes, DS-Replication-Get-Changes-All (DCSync), User-Force-Change-Password, Self-Membership

Property-level ACEs: Can grant write to specific attributes (e.g., msDS-AllowedToActOnBehalfOfOtherIdentity for RBCD, msDS-KeyCredentialLink for Shadow Credentials).

Validated writes: Self-membership lets you add yourself to a group if granted.

This is why object-level permissions matter more than group membership. Having WriteProperty on the right attribute can be more powerful than being in a "privileged" group.
☢ AccessCheck Flow ☢
INPUT
Access Token (SIDs)
+
INPUT
Access Mask
SECURITY REFERENCE MONITOR
Match token SIDs against ACE SIDs
⊘ DENIED
Deny ACE matches
✓ GRANTED
Allow ACE matches
⊘ DENIED
No ACE matches
No "default deny ACE" exists—if nothing grants access, access is simply denied
TKN

Access Tokens & Logon Types: Auth to Action

Credentials authenticate you. Tokens authorize your actions. Understanding the difference, and understanding logon types, explains why certain attacks work and why "just don't log in there" is real advice.

What Is an Access Token?

When you authenticate, Windows creates an access token. This token is attached to every process you run and determines what you can access.

Token Contains:
User SID, Group SIDs, Privileges (SeDebugPrivilege, etc.), Integrity level, Logon session reference

When you access a resource, Windows compares your token's SIDs against the resource's DACL. The token is the bridge between authentication (who you are) and authorization (what you can do).

Token theft is different from credential theft. Steal a token, impersonate that session. Steal credentials, create new sessions anywhere.

Privileges vs Permissions

Permissions are on objects (DACLs). Privileges are in tokens. They're different security mechanisms.

SeDebugPrivilege: Debug any process. Read memory from LSASS. Dump credentials.

SeImpersonatePrivilege: Impersonate tokens. If you can get SYSTEM to connect to you, become SYSTEM.

SeBackupPrivilege: Read any file regardless of DACL. Extract NTDS.dit.

Local admin isn't about group membership. It's about what privileges that membership grants in your token. This is why UAC exists (and mostly fails): it tries to strip dangerous privileges from admin tokens.

Logon Types

How you authenticate determines what credentials get cached on the target system:

Type 2/10 - Interactive:
Console logon (Type 2), RDP (Type 10). Password sent to target, hashes cached in LSASS. Full credential exposure.
Type 3 - Network:
SMB, WMI, WinRM, PsExec. Challenge-response only. No password sent, minimal credential caching.*
Type 9 - NewCredentials:
runas /netonly. Local access uses original token; outbound network uses specified credentials.

This is why RDP with DA credentials to a compromised workstation is catastrophic, but network logon is safer. Interactive logons cache credentials. Network logons (mostly) don't.

*Type 3 caching detail: For Kerberos, the service ticket for that specific service is cached. For NTLM, just the session key for that connection. Neither enables lateral movement—you can't use a service ticket to request tickets for other services, and NTLM session keys are connection-specific. The dangerous credentials (TGT, NT hash) never touch the target system.

Type 9 (NewCredentials) Explained

runas /netonly creates a Type 9 logon session. This is confusing because it creates a split identity:

How Type 9 Works:
Local access: Uses your original token (your current user)
Network access: Uses the credentials you specified

Use case: You're on a non-domain workstation but need to access domain resources. Run runas /netonly /user:DOMAIN\admin cmd.exe. That cmd window can access domain shares as DOMAIN\admin, but locally it's still you.

Security implication: The NT hash of the specified credentials IS cached in LSASS on YOUR machine (for network auth). If your machine is compromised, those credentials can be extracted. Type 9 protects the remote system, not your local machine.

Why LSASS Holds What It Holds

LSASS (Local Security Authority Subsystem Service) is the process that handles Windows authentication. It caches credentials to enable single sign-on.

What LSASS May Contain:
NT hashes, Kerberos tickets (TGTs, service tickets), plaintext passwords (WDigest—disabled by default since 8.1/2012 R2), cached credentials for offline logon

What's cached depends on logon type, credential delegation settings, and OS configuration. Interactive logons expose the most. This is why:

Privileged accounts should only log on interactively to hardened systems. Every interactive logon leaves credentials in LSASS. Every system you log into is a system where your creds can be dumped.

Credential Guard uses virtualization to isolate secrets from LSASS, making them resistant to extraction even with kernel access. But it doesn't protect everything, and many environments don't enable it.
☢ Logon Type Credential Exposure ☢
TYPE 2/10: INTERACTIVE
Console (2), RDP (10), RunAs
TARGET LSASS.EXE
NT Hash
Kerberos TGT
Session Keys
Plaintext*
⚠ FULL CREDENTIAL EXPOSURE
TYPE 3: NETWORK
SMB, PsExec, WMI, WinRM
TARGET LSASS.EXE
NT Hash
Kerberos TGT
Service ticket (Krb) / Session key (NTLM)†
Plaintext
✓ MINIMAL EXPOSURE
TYPE 9: NEWCREDENTIALS
runas /netonly
YOUR LSASS.EXE‡
NT Hash
Kerberos TGT
Session Keys
Plaintext
⚠ CACHED LOCALLY
Type 2/10 exposes creds on target. Type 3 is safe. Type 9 exposes creds on YOUR machine.

*WDigest: Plaintext caching disabled by default since Windows 8.1/Server 2012 R2.

Type 3 caching: Kerberos caches the service ticket (only valid for that service). NTLM caches just the session key (connection-specific, expires when session ends). Neither enables lateral movement.

Type 9 caches on YOUR machine: The NT hash and TGT for the /netonly credentials are stored in YOUR local LSASS for outbound network authentication. Remote systems see Type 3 network logon.

TCP

Core Protocols: The Plumbing

Before you can understand AD attacks, you need to understand how Windows machines talk to each other. These protocols are the pipes that carry everything. Attackers don't break the pipes. They use them as intended, just for unintended purposes.

SMB (Server Message Block)

The file sharing protocol. Every \\server\share connection uses SMB. But it's not just files. SMB carries named pipes, which are how services communicate remotely.

Default Ports:
TCP 445 (Direct), TCP 139 (over NetBIOS)

SMB is the transport for PsExec, remote registry, and dozens of lateral movement techniques. When you see "ADMIN$" or "C$" shares, that's SMB.

SMB Signing: Domain controllers have required SMB signing since Windows 2000. Workstations and member servers do NOT require signing by default. This enables NTLM relay attacks between non-DC systems. See the History for when this finally changed.

RPC (Remote Procedure Call)

RPC lets you call functions on remote systems as if they were local. It's how Windows services expose functionality over the network.

Key Interfaces:
MS-RPRN (Print), MS-EFSRPC (EFS), MS-DFSNM (DFS), MS-SAMR (SAM), MS-DRSR (DRS/DCSync)

Every coercion attack (PrinterBug, PetitPotam, DFSCoerce) abuses legitimate RPC interfaces. They call real functions, just with malicious intent.

RPC can travel over SMB named pipes (port 445) or direct TCP (port 135 + dynamic ports). This is why firewalls are complicated.

LDAP (Lightweight Directory Access Protocol)

LDAP is the primary and most commonly used interface to query and modify Active Directory. User lookups, group membership checks, GPO fetches. Not the only way (ADSI, WMI, PowerShell cmdlets wrap various interfaces), but the most direct.

Default Ports:
TCP 389 (LDAP), TCP 636 (LDAPS), TCP 3268 (Global Catalog)

BloodHound's collection? LDAP queries. Finding Kerberoastable accounts? LDAP. Enumerating trust relationships? LDAP. It's the primary read/write interface to AD.

LDAP Signing/Channel Binding: Not enforced by default in most environments prior to Server 2025, and upgrades preserve existing (often insecure) settings. This enables LDAP relay attacks on the majority of real-world environments.

DNS (Domain Name System)

DNS translates names to IP addresses. More importantly for AD, it's how clients find services: domain controllers, Kerberos KDCs, LDAP servers, Global Catalogs.

Domain controllers are typically (but not always) DNS servers. AD-integrated DNS stores zone data in AD itself and replicates it with AD replication. This is convenient but means DNS data is as sensitive as AD data.

Critical Records:
_ldap._tcp.dc._msdcs.domain.com (DC locator), SRV records for every AD service

Compromise DNS, and you gain powerful primitives for compromising AD. DNS poisoning can redirect authentication. Dynamic DNS updates (often open by default) allow record injection.

Name Resolution Fallbacks

When DNS fails, Windows doesn't give up. It checks local files first, then falls back to broadcast protocols that anyone on the network can respond to.

Typical Fallback Order:
Hosts file, then DNS, then multicast/broadcast protocols (LLMNR, NBT-NS). Exact order varies by OS version and configuration.

The hosts file (C:\Windows\System32\drivers\etc\hosts) is checked before DNS. Malware often modifies it for persistence or redirection.

LLMNR (Link-Local Multicast Name Resolution) and NBT-NS (NetBIOS Name Service) are broadcast protocols. Responder and similar tools answer these broadcasts, capturing authentication attempts.

LLMNR and NBT-NS are enabled by default on all Windows systems. Every mistyped share path is a potential credential leak.

WPAD (Web Proxy Auto-Discovery)

WPAD allows browsers and applications to automatically discover proxy settings by looking for a wpad.dat file. The lookup uses DNS first, then falls back to LLMNR/NBT-NS.

Lookup Target:
http://wpad.domain.com/wpad.dat or http://wpad/wpad.dat

If an attacker can respond to WPAD requests (via DNS poisoning, LLMNR/NBT-NS spoofing, or rogue DHCP), they can inject a malicious proxy configuration. All HTTP traffic then flows through the attacker.

WPAD combined with LLMNR/NBT-NS poisoning is a classic attack. The machine asks "who is WPAD?" and the attacker answers, then captures or manipulates all web traffic.

WMI (Windows Management Instrumentation)

Windows' management infrastructure for querying system info and executing operations. Administrators use it for inventory and remote management. Attackers use it for the same reasons—plus lateral movement.

Default Ports:
TCP 135 (RPC endpoint mapper) + dynamic high ports (DCOM), or TCP 5985/5986 (WinRM)

Why attackers love WMI: Built-in (no tools to upload), fileless execution via Win32_Process Create, blends with legitimate admin activity, and remote WMI = Type 3 logon = minimal credential caching.

Detection: Watch for wmiprvse.exe spawning cmd.exe/powershell.exe. Check WMI-Activity/Operational log (events 5857, 5860, 5861). Note: wmic.exe is deprecated (disabled by default in Windows 11), but WMI itself remains fully functional via PowerShell and direct APIs.
ID

Authentication Basics: The Identity Layer

How does Windows know you are who you say you are? Two protocols: NTLM (old, everywhere) and Kerberos (newer, complicated). Understanding the difference is critical. Deep technical details are in the Authentication Protocols section.

NTLM: The Legacy Protocol

Challenge-response protocol from 1993. Client proves it knows the password by encrypting a server challenge with a hash derived from the password. Simple but with significant security considerations.

The Core Issue:
The NT hash can be used directly for authentication without knowing the plaintext password.

Pass-the-Hash: Use stolen hash directly for authentication.
NTLM Relay: Forward authentication to another server.
Cracking: NTLMv1 responses are trivially crackable. NTLMv2 is significantly stronger but still susceptible to offline cracking with weak passwords or captured challenge/response pairs.

NTLM can be hardened (require NTLMv2, enable Extended Protection for Authentication, require signing), but these mitigations are rarely fully deployed. Most environments have NTLM enabled everywhere for backward compatibility.

Kerberos: Tickets as Credentials

Ticket-based authentication. You authenticate once to the KDC (Key Distribution Center, running on DCs), get a TGT (Ticket Granting Ticket), then exchange TGT for service tickets.

Key Concept:
Tickets ARE credentials. If you can steal or forge them, you can impersonate the user.

Kerberoasting: Request service tickets, crack them offline to get service account passwords.
AS-REP Roasting: Request encrypted data for accounts without pre-auth, crack offline.
Golden Ticket: Forge TGTs with the KRBTGT hash. Become anyone.
Silver Ticket: Forge service tickets with service account hash.

Attack techniques covered in detail in the relevant Attacks sections.

PAC (Privilege Attribute Certificate)

Kerberos proves WHO you are. The PAC says WHAT you can do. It's Microsoft's extension to Kerberos for carrying authorization data inside tickets.

PAC Contains:
Your SID, group SIDs, account flags, logon info. Signed twice by KDC (krbtgt key + service key).

Golden Ticket: You forge the PAC. Put Domain Admins SID in there. Sign with stolen krbtgt hash. KDC trusts it completely.

Silver Ticket: You forge a service ticket PAC. Most services don't validate PAC signatures with the DC—they just trust whatever's in the ticket.

The bottom line: Whoever controls the signing key controls the PAC. Control the PAC, control authorization.

The Fundamental Truth

In Windows authentication, you don't need to know someone's password to become them. You need their credentials, and credentials take many forms.

Credentials Include:
Passwords, NT hashes, Kerberos tickets (TGT, service tickets), cached credentials, session tokens, certificates

An NT hash can be used directly to authenticate via NTLM (pass-the-hash). A TGT can be used to request service tickets (pass-the-ticket). A certificate can be used to request a TGT (PKINIT). Neither requires knowing the original password.

This is why Mimikatz exists. This is why credential dumping is step one of every AD attack. This is why "just change the password" doesn't help if the attacker already has a Golden Ticket (which remains valid until KRBTGT is rotated twice) or a certificate (valid until it expires or is revoked).

The defensive implication: Protecting passwords is necessary but not sufficient. You must also protect hashes (Credential Guard), tickets (short lifetimes, Protected Users), and certificates (proper ADCS security). Credential theft detection matters as much as prevention.
PC$

Machine Accounts: Users That Never Log Out

A computer account is not a special type of object. It's a user account with a $ at the end. Understanding this mental shift explains why machine accounts are first-class security principals and why compromising them matters.

Computers Are Just Users

The computer account (WORKSTATION$) is a security principal just like a user account. It has:

Machine Account Properties:
Password (120+ chars, auto-rotated), SID, Group memberships, TGT, Can authenticate via NTLM and Kerberos

When a computer boots and joins the domain, it authenticates with its machine account password. It gets a TGT. It can then access network resources as itself.

Many admins think "computers authenticate, users do things." Reality: computers ARE users. They can query LDAP, access shares, be granted permissions, be delegated to.

Why Machine Compromise Matters

Compromise a machine, get its machine account. This gives you:

Machine Account Access:
LDAP queries as authenticated user, Kerberos tickets, potential delegation rights, SPN-based service access

DC machine accounts: Domain Controllers are computers. Their machine accounts (DC01$) are effectively Tier 0. Compromise a DC's machine account = domain compromise.

Relay attacks: Coerce a machine to authenticate to you, relay that authentication. You're now acting as that machine account.

This is why printer coercion works. Coerce DC01$ to authenticate to your relay server, relay to LDAP, modify AD as the DC's machine account. Machine accounts often have more rights than you'd expect.

RBCD and Machine Accounts

Resource-Based Constrained Delegation (RBCD) abuse relies entirely on machine accounts:

RBCD Attack Flow:
1. Create/control a machine account → 2. Write to target's msDS-AllowedToActOnBehalfOfOtherIdentity → 3. Impersonate any user to that target

Step 1 is why ms-DS-MachineAccountQuota matters. Any authenticated user can create machine accounts by default. You create one, you control its password, you have a principal for RBCD.

Step 2 requires write access to the target. But if you have it (via ACL misconfiguration, relay, etc.), you can configure the target to trust your controlled machine account for delegation.

For comprehensive coverage of delegation attacks (unconstrained, constrained, and RBCD), see the Delegation page.

Machine Account Passwords

Machine account passwords are managed automatically by Windows:

120-character random password (UTF-16, 240 bytes), stored in LSA secrets on the machine, rotated every 30 days by default

The machine stores its own password in the SECURITY registry hive. Extract it (SYSTEM access required), and you can authenticate as that machine anywhere.

Silver ticket implication: A machine account password hash lets you forge service tickets for any service that machine hosts, without touching the DC.

LAPS manages local admin passwords. Machine account passwords are separate. Don't confuse the two.
SPN

Service Accounts & SPNs: Identity Meets Services

Services need identities. Those identities need to be findable. SPNs (Service Principal Names) are the mapping between "I want to access this service" and "which account runs this service?" Understanding this explains Kerberoasting, delegation, and credential sprawl.

What Is an SPN?

An SPN is an attribute on an account that says "this account runs this service." When you request a Kerberos service ticket, the KDC looks up the SPN to find which account to encrypt the ticket for.

SPN Format:
serviceclass/host:port (e.g., MSSQLSvc/sql01.corp.local:1433, HTTP/web01.corp.local)

Machine accounts have SPNs automatically (HOST/computername). User accounts only have SPNs if manually configured, usually for services running under user accounts.

The SPN-to-account mapping is how Kerberos knows which key to use. This is also why Kerberoasting works.

Kerberoasting: The SPN Problem

Any authenticated user can request a service ticket for any SPN. The ticket is encrypted with the service account's password hash.

Kerberoasting Flow:
1. Find user accounts with SPNs → 2. Request service tickets → 3. Extract tickets → 4. Crack offline

Machine accounts have 120-character random passwords. They're not crackable. But user accounts? Often have weak, human-chosen passwords. If a service runs under a user account with an SPN, that password is crackable.

Service accounts frequently have old, weak passwords AND excessive privileges. "The SQL service account needs DA rights" is a sentence that has caused many breaches.

Kerberoasting was introduced by Tim Medin at DerbyCon 2014.

Service Account Types

Not all service accounts are equal:

User-Based Service Accounts:
Regular user accounts running services. Human-managed passwords. Kerberoastable. Legacy approach.
AD-managed passwords. Single-computer only. 240-byte random passwords (120 UTF-16 characters). Not Kerberoastable in practice.
AD-managed, can be used by multiple computers. Password retrieved from AD by authorized computers. The modern solution.

gMSAs solve Kerberoasting for services that can use them. Many legacy applications can't. Those still need user-based service accounts with all their problems.

Service Account Sprawl

Service accounts accumulate privileges over time:

Common Problems:
Same account for multiple services, passwords never rotated, "just make it DA to fix permissions", logged-on interactively for troubleshooting

One compromised service account often leads to lateral movement across every system where it's used. If it's DA, game over. If it has interactive logon rights, its credentials are cached everywhere it logged in.

Service account hygiene: unique accounts per service, minimal permissions, long random passwords, no interactive logon, use gMSAs where possible. Most environments violate all of these.
DRS

Replication: The Keys to the Kingdom

AD replication isn't just data copying. It's credential material access. Understanding replication rights explains why DCSync works, why replication is a security boundary, and why these rights are DA-equivalent.

What Replication Actually Is

Domain Controllers replicate the AD database to stay in sync. This includes all objects and all attributes, including password hashes.

Replication Protocol:
MS-DRSR (Directory Replication Service Remote Protocol) over RPC

When a DC replicates, it requests changes from another DC. The responding DC sends objects, attributes, and secrets. This is how all DCs have all credentials for their domain.

DCSync isn't an exploit. It's using the replication protocol as intended, just from a non-DC. The DC doesn't care if the requestor is a DC or an attacker with the right permissions.

The Replication Rights

Two extended rights control replication:

Replicate non-secret data. Required but not sufficient for credential theft.
Replicate secret data (password hashes, etc.). This is the dangerous one.

Both rights together = DCSync = dump every credential in the domain. By default, Domain Admins, Enterprise Admins, Administrators, and Domain Controllers have these rights.

Granting these rights to any account is equivalent to making it a Domain Admin. There is no legitimate reason for a non-DC, non-admin account to have these rights. If you find one, it's either misconfiguration or backdoor.

Replication Across Boundaries

Replication happens within domains and across certain trust boundaries:

Replication Scope:
Intra-domain (all DCs), Intra-forest (GC replication of partial attribute set), Cross-forest (limited, trust-dependent)

The Global Catalog contains a partial replica of all objects in the forest. GC replication doesn't include password hashes, but it does include enough for enumeration.

This is another reason why the forest is the security boundary, not the domain. Replication topology follows forest trust, not domain isolation.

RODCs and Replication

Read-Only Domain Controllers exist specifically to limit replication risk:

RODC Limitations:
Can't replicate secrets by default. Only caches passwords for accounts in the Password Replication Policy. Can't write changes to AD.

RODCs were designed for branch offices where physical security is weak. Compromise an RODC, and you only get the credentials it was allowed to cache, not the entire domain.

But if the Password Replication Policy is misconfigured (e.g., "allow all"), the RODC becomes a full credential store. Configuration matters.

RODC compromise is still serious. The machine account can be used for relay attacks, and any cached credentials are exposed. But it's containable in a way that full DC compromise is not.
Adm

Privileged Groups: The Keys to the Kingdom

Some groups have enormous power. Some are obvious (Domain Admins). Others are sneaky (Account Operators, Backup Operators). These groups are considered "protected" by Active Directory—but what does that actually mean?

Why "Protected" Groups?

In AD, permissions flow downward through inheritance. If someone grants "HelpDesk → Reset Passwords" on the Users OU, that permission propagates to every user object below it. This is convenient for delegation—but catastrophic if it applies to Domain Admins.

To prevent inherited permissions from accidentally (or maliciously) granting control over privileged accounts, AD has a protection mechanism: the AdminSDHolder object and the ProtectAdminGroups background task.

☢ Inheritance vs AdminSDHolder Protection ☢
OU=Company
+ HelpDesk → Reset Password
↓ inheritable permissions flow down ↓
OU=Users
+ IT → Modify Group Membership
↓ ↓ ↓
👤
jsmith
Inherits all ACEs
👤
mjones
Inherits all ACEs
🛡️
admin-jsmith
Protected by AdminSDHolder
👤 Normal user (inherits permissions)
🛡️ Protected user (DACL replaced every 60 min)
Permissions rain down from parent OUs. Protected accounts have an umbrella.
How AdminSDHolder Protection Works: Every 60 minutes, a background task called ProtectAdminGroups runs on the PDC Emulator. It finds all members of protected groups and replaces their security descriptors with the template stored in the AdminSDHolder object (CN=AdminSDHolder,CN=System,DC=domain,DC=com). It also sets the DACL_Protected flag to block future inheritance.

Common misconception: This process is widely (but incorrectly) called "SDProp." SDProp (Security Descriptor Propagator) is actually a completely different background task that handles inheritance propagation—when you modify an ACL or move an object, SDProp ensures inherited ACEs flow down correctly. SDProp runs on every DC, triggered by security descriptor changes. The AdminSDHolder protection mechanism is ProtectAdminGroups, not SDProp. Even Microsoft's own documentation gets this wrong.

Thanks to Jim Sykora for the correction.

The Protected Groups

These groups (and their members) receive AdminSDHolder protection. Know what they can do, or be surprised when a "low privilege" account owns your domain.

Group Scope What They Can Do Why It Matters Risk
Enterprise Admins Forest Full control over entire forest. Can modify schema, create/delete domains, access any resource. Exists only in forest root. Can compromise any domain instantly. CRITICAL
Domain Admins Domain Full control over domain. Admin on all DCs and domain systems. Has replication rights (DCSync). The classic target. Can dump all credentials, create persistence. CRITICAL
Schema Admins Forest Modify AD schema. Add new object classes and attributes. Schema changes are forest-wide and nearly irreversible. Should have zero members day-to-day. CRITICAL
Administrators (Builtin) Domain Full admin on all DCs. Can manage AD, modify DC GPO, access SYSVOL. Often overlooked. Domain Admins nested inside by default. Equivalent to DA for DC access. CRITICAL
Account Operators Domain Create/modify/delete users and groups (except protected). Reset passwords. Add to most groups. Reset service account password, then Kerberoast it. Add users to groups with paths to DA. HIGH
Backup Operators Domain Backup/restore any file on DCs, bypass ACLs. Log on locally. SeBackupPrivilege, SeRestorePrivilege. Extract NTDS.dit and SYSTEM hive using backup APIs. "Backup" rights = Domain Admin in practice. HIGH
Server Operators Domain Log on to DCs, start/stop services, manage shares, backup files. Start/stop services to inject DLLs. Modify service binary paths. Multiple escalation paths to SYSTEM. HIGH
Print Operators Domain Manage printers on DCs. Historically could load kernel drivers. Driver restrictions tightened, but legacy paths may exist on older systems. MEDIUM
DNS Admins Domain Manage DNS. Can set ServerLevelPluginDll registry key. ServerLevelPluginDll loads arbitrary DLLs into DNS service. SYSTEM-level code execution on DCs. HIGH
GPO Creator Owners Domain Create GPOs. Own GPOs they create. GPO creation alone isn't dangerous. If they can link GPOs, they get code execution on targets. MEDIUM
Remote Desktop Users Varies RDP access where granted. Not privileged itself. RDP to servers often leads to local privesc. Watch on sensitive systems. MEDIUM
Protected Users Domain NOT privileged. PROTECTION group. No NTLM, no cached creds, short TGT lifetime. Defensive control. Breaks RDP to IP, NTLM-only apps. Use for privileged accounts. DEFENSIVE
AdminSDHolder as a Backdoor: Modifying AdminSDHolder's ACL creates persistent backdoor access. Every 60 minutes, your malicious ACE will be stamped onto Domain Admins, Enterprise Admins, and all other protected accounts. Even if defenders remove your ACE from individual accounts, it returns on the next ProtectAdminGroups cycle. The fix requires modifying AdminSDHolder itself—which many defenders don't know to check.
!!

Dangerous Defaults: Why Is This On?

Microsoft loves backward compatibility. The result: settings that should be off are on, permissions that should be restrictive are permissive, and services that should be disabled are running.