BREACHOPERATORS
Home/ Research/ AD Trust Abuse
Research & Tradecraft /// Active Directory

Active Directory Tradecraft: Trust Abuse & Lateral Movement Trust misconfigurations // Cross-forest paths // ADCS ESC1–ESC8 // DCSync mechanics

A deep-dive into AD trust misconfigurations, cross-forest exploitation paths, certificate service abuse (ESC1–ESC8), and DCSync mechanics — built for operators who need technical depth, not surface-level overviews.

Active Directory ADCS Kerberos Lateral Movement Domain Trusts Red Team
01 Active Directory Series Read time: ~22 min Level: Advanced / Operator Status: Published
01

Trust Model Primer

Active Directory trusts exist to let security principals in one domain authenticate against resources in another. That single sentence is also the entire attack surface of this article — every technique below is a variation on convincing a trust boundary to honor an identity it shouldn't. Before touching exploitation, an operator needs the model straight: direction, transitivity, and authentication scope govern what a trust actually permits.

  • Direction — a one-way trust from A to B means A trusts B's principals; users in B can authenticate to resources in A, not the reverse. Two-way trusts collapse that distinction.
  • Transitivity — parent-child and tree-root trusts within a forest are transitive by default. External and forest trusts are non-transitive unless explicitly configured, which caps blast radius — in theory.
  • Authentication scope — forest-level trusts can be restricted with selective authentication, requiring explicit ACE grants on target computer objects before a foreign principal can even attempt logon. Most environments never turn this on.
Forest A— trust —▶Forest B viaTDO (Trusted Domain Object) carryingtrust key + SID filtering state

Every trust is backed by a Trusted Domain Object (TDO) holding the shared trust key and a set of security attributes — most importantly TRUST_ATTRIBUTE_QUARANTINED_DOMAIN (SID filtering) and TRUST_ATTRIBUTE_FOREST_TRANSITIVE. Operators should pull this from the target early: Get-DomainTrust, nltest /domain_trusts, or BloodHound's trust edges all surface it. The TDO's flags tell you which of the following techniques are even in scope before you burn time on them.

/// trust direction is not authorization scope /// SID filtering is the only real backstop /// transitivity multiplies blast radius /// map before you move ///
02

Trust Misconfiguration Abuse

SID History Injection & Filtering Gaps

The sIDHistory attribute exists for domain migrations — it lets a principal retain access from a legacy domain SID after being moved. When SID filtering is not enforced on a trust (common on intra-forest parent-child trusts, which don't filter by default), an attacker with domain-level compromise on one side can inject a privileged foreign SID — commonly the target domain's Enterprise Admins or Domain Admins RID — into a principal's sIDHistory. Kerberos then honors that SID inside the PAC on the next ticket issued, and the resource domain grants access as if the principal were a native member of the privileged group.

Operator note This only works where you already hold DA-equivalent rights in the source domain, and where the trust doesn't enforce TRUST_ATTRIBUTE_QUARANTINED_DOMAIN. In practice it's most relevant for child → parent escalation inside a single forest, not for hopping between unrelated forests — Microsoft ships SID filtering on by default for external and forest trusts precisely to close this off.

Unconstrained Delegation as a Trust Pivot

A computer object flagged for unconstrained delegation caches the full TGT of any principal that authenticates to it. Domain controllers and shared services are the classic targets. If a DC on either side of a trust — or any box in the trust path — holds unconstrained delegation, coercing an authentication from a privileged account (via PrinterBug/PetitPotam-class coercion over MS-RPRN or MS-EFSR) hands you a cached, reusable TGT without ever touching credentials. Combined with a trust hop, this converts a foothold in a low-value domain into a ticket usable against a high-value one.

Foreign Security Principals & ACL Sprawl

When a trust is two-way and someone grants a foreign principal (from the trusting domain) an ACE on an object in the trusted domain, AD creates a ForeignSecurityPrincipal object to represent it. These accumulate silently over years of nested group membership and ad-hoc access grants, and they're rarely audited because they don't show up in a normal domain user/group review — you have to walk the trust explicitly. BloodHound's CrossForest edges are the fastest way to enumerate them; look specifically for FSPs sitting inside GenericAll, WriteDacl, or WriteOwner paths back to Tier-0 objects.

Kerberos Delegation Across Trust Boundaries

Constrained delegation with protocol transition (TrustedToAuthForDelegation) scoped to a service that itself has a trust path outward is a frequently missed escalation. Resource-based constrained delegation (RBCD) is worse from a defensive standpoint because it's configured on the target object's msDS-AllowedToActOnBehalfOfOtherIdentity attribute — meaning any principal with WriteProperty or ownership on a computer object can grant themselves delegation rights to it without needing Domain Admin, then S4U2Self/S4U2Proxy their way to a service ticket as any user, including one with rights across a trust.

# Enumerate trust flags and SID filtering state before assuming a path is viable
Get-DomainTrust -Domain corp.local
nltest /domain_trusts /all_trusts /v

# Confirm whether RBCD is writable on a target computer object
Get-DomainComputer -Identity SVC-APP01 -Properties msDS-AllowedToActOnBehalfOfOtherIdentity
/// SID filtering closes what unconstrained delegation reopens /// RBCD is an ACL bug wearing a Kerberos feature's clothes /// audit FSPs like they're Tier-0 group members, because sometimes they are ///
03

Cross-Forest Exploitation Paths

Cross-forest movement is fundamentally about finding the one place an environment's segmentation model didn't get enforced. Forests are the hard security boundary Microsoft actually designs around — domains within a forest are not. Most orgs treat a forest trust the way they'd treat a domain trust, and that assumption gap is where the path lives.

Enumeration Before Movement

  • Pull the trust topology from both sides if you can — Get-DomainTrustMapping or a full BloodHound collection run against each reachable domain — since trust attributes can differ per direction.
  • Identify whether SID filtering is enforced (quarantined flag) and whether selective authentication is set. These two flags alone eliminate most theoretical paths before you spend cycles on them.
  • Enumerate group memberships that span the trust — Enterprise Admins, nested groups pulled in via FSPs, and shares/GPOs that apply cross-forest.

Common Realistic Paths

Shared Service Accounts

A service account provisioned in Forest B but run under a Forest A identity for "convenience" — password reuse or a shared gMSA becomes the bridge.

Trust-Spanning GPOs

Linked GPOs or SYSVOL scripts pushed across domains within the same forest carry credentials or LAPS-adjacent secrets readable by over-permissioned groups.

PAM Trust Misuse

Privileged Access Management (MIM PAM) shadow forests are meant to be one-way and time-bound; misconfigured shadow principals or stale expiration policies leave a standing bridge.

Certificate Trust Reuse

An enterprise CA trusted by multiple forests via cross-certification, where template permissions weren't re-scoped per forest — see ADCS section below.

Why this matters Cross-forest paths rarely involve a single dramatic bug. They're almost always a chain of individually "acceptable" decisions — a shared account here, a convenience GPO there — that nobody modeled together. Graph the whole thing before acting; don't chase the first edge you find.
/// forests are the real boundary, domains are administrative /// chain small decisions, not single bugs /// graph first, pivot second ///
04

AD Certificate Services Abuse — ESC1 through ESC8

Active Directory Certificate Services (ADCS) is, from an attacker's perspective, an alternate credential and authentication system layered on top of AD that most environments audit far less rigorously than Kerberos or NTLM. The ESC (Escalation) classification originates from SpecterOps' 2021 "Certified Pre-Owned" research and remains the standard taxonomy operators use to communicate findings. The table below is a reference map — full mechanics for each are broken out afterward.

IDRoot CausePrimary TargetSeverity
ESC1Template allows SAN specification by low-priv enrolleesAny template misconfigured for client authCritical
ESC2Template's Any Purpose / no EKU restrictionMisconfigured EKU templatesHigh
ESC3Certificate Request Agent (enrollment agent) misuseTemplates enabling agent enrollmentHigh
ESC4Weak ACLs on the certificate template object itselfTemplate object security descriptorCritical
ESC5Weak ACLs on CA, PKI AD objects, or containersCA object / PKI containersCritical
ESC6CA-wide "EDITF_ATTRIBUTESUBJECTALTNAME2" flag setCA configurationHigh
ESC7Weak CA-level access rights (Manage CA / Manage Certificates)CA role-based accessCritical
ESC8NTLM relay to HTTP/RPC certificate enrollment endpointsWeb enrollment / CES-CEPCritical
ESC1 — Misconfigured Certificate Templates (SAN Injection)

The template has CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT set, grants enroll rights to low-privileged principals, and is usable for client authentication. An attacker requests a certificate and specifies an arbitrary Subject Alternative Name — such as a Domain Admin's UPN — in the CSR. The CA issues a cert that authenticates as that user, since Kerberos PKINIT/Schannel trust the SAN over the requester's actual identity.

ESC2 — Any Purpose / No EKU Restriction

A template with the Any Purpose EKU, or no EKU at all, can be abused similarly to ESC1 or repurposed as a subordinate CA-style credential depending on issuance policy, because the resulting certificate isn't scoped to a narrow use case the way a correctly configured client-auth-only template would be.

ESC3 — Enrollment Agent Abuse

A template configured for the Certificate Request Agent EKU lets its holder request certificates on behalf of other users — a legitimate smart-card enrollment pattern. If enrollment agent rights are handed to a broad or low-privileged group, the holder can request a certificate impersonating any principal the target CA permits, including privileged accounts.

ESC4 — Vulnerable Template Access Control

If a low-privileged principal holds WriteProperty, WriteOwner, or WriteDacl on the template's AD object, they can simply rewrite the template's configuration — flipping on ENROLLEE_SUPPLIES_SUBJECT, adding the client-auth EKU, and granting themselves enroll rights — turning any template into an ESC1 primitive on demand.

ESC5 — Vulnerable PKI Object Access Control

The same idea as ESC4, but the weak ACL sits on a different link in the chain: the CA's AD computer object, the NTAuthCertificates container, or another PKI-adjacent object. Controlling any of these can let an attacker plant a rogue CA reference or otherwise subvert what the forest treats as a trusted issuer.

ESC6 — EDITF_ATTRIBUTESUBJECTALTNAME2

When this flag is set at the CA level, every template issued by that CA accepts attacker-specified SAN values in the request — regardless of individual template settings. It effectively makes every template on the CA behave like ESC1. Microsoft's May 2022 patch changed default cert-mapping behavior, which softened but did not eliminate this path depending on how StrongCertificateBindingEnforcement is configured.

ESC7 — Vulnerable CA Access Control

Holding Manage CA or Manage Certificates rights on the CA itself lets an attacker approve pending certificate requests (bypassing manager approval controls) or, combined with Manage CA, re-enable dangerous flags like the ESC6 SAN flag, effectively chaining back into template-level abuse from a CA administration foothold.

ESC8 — NTLM Relay to AD CS HTTP Enrollment

The Certificate Enrollment Web Service (CES) and Certificate Enrollment Policy (CEP) endpoints accept NTLM authentication over HTTP without signing or channel binding by default. Coercing a machine account to authenticate (via the same coercion primitives used in the trust-abuse section) and relaying that NTLM authentication to the enrollment endpoint yields a valid client-auth certificate for the coerced machine — often a domain controller — which converts directly into a usable Kerberos identity.

Operator note Certipy (certipy find -u user@corp.local -p pass -dc-ip x.x.x.x -vulnerable) and the original PowerShell tooling from the Certified Pre-Owned research are the standard enumeration paths. Treat ADCS findings as Tier-0 equivalent — a single ESC1/ESC4/ESC7/ESC8 finding is frequently a full domain compromise path, and it is consistently under-audited relative to its blast radius.
/// ADCS is a second identity plane most blue teams never modeled /// one bad template ACL beats a dozen patched CVEs /// audit templates like Tier-0 objects, because functionally they are ///
05

DCSync Mechanics

DCSync doesn't exploit a vulnerability — it abuses a legitimate replication protocol. Domain controllers replicate directory data (including password hashes) between each other using the MS-DRSR (Directory Replication Service Remote Protocol) interface, specifically the IDL_DRSGetNCChanges RPC call. Any principal holding the extended rights DS-Replication-Get-Changes and DS-Replication-Get-Changes-All (and, for RODC-relevant secrets, DS-Replication-Get-Changes-In-Filtered-Set) on the domain object can call this RPC and ask a real DC to hand over the secrets for any object — impersonating a domain controller without ever touching one.

Why It Works

  • The rights are stored as ACEs on the domain root object, not tied to actual DC membership — replication is authorization-based, not identity-based at the protocol layer.
  • Domain Admins, Enterprise Admins, and Administrators hold these rights by default, which is expected — the problem is how often the rights get delegated further down to service accounts, backup tooling, or Azure AD Connect (MSOL_*) accounts without anyone tracking it.
  • No event is logged on the requesting side beyond a standard authenticated RPC call; detection has to happen on the DC being asked to replicate, and it has to know what "normal" replication traffic looks like for that environment.
Attacker (holds DS-Replication-Get-Changes[-All]) ▶ IDL_DRSGetNCChanges ▶ Domain Controller ▶ returns ▶ NTLM hashes / Kerberos keys for requested object(s)
# Conceptual invocation pattern — requires DS-Replication-Get-Changes(-All)
# already granted on the domain object, either legitimately or via a prior
# ACL abuse chain (see Section 02).
lsadump::dcsync /domain:corp.local /user:krbtgt

# krbtgt is the highest-value target: its key signs every TGT in the domain,
# enabling offline Golden Ticket forgery independent of any single account's
# password state or lockout policy.
Operator note The path to DCSync is almost always more interesting than DCSync itself: it's the terminal step of an ACL abuse chain (see ESC4/ESC5 and the trust-abuse section) that granted replication rights indirectly — nested group membership, a delegated WriteDacl on the domain object, or an over-scoped Azure AD Connect service account. Enumerate how those rights got there; that's the finding worth reporting, not just the technique's existence.
/// replication is trust, not identity /// krbtgt compromise outlives any single password rotation /// the ACL chain that grants DCSync is the real finding ///
06

Detection & Hardening

TechniqueDetection SignalHardening Control
SID history injection Event 4765/4766 (SID History added); unexpected SIDs in PAC via 4624 correlation Enforce SID filtering (netdom trust /quarantine:yes) on all non-parent-child trusts
Unconstrained delegation / coercion Spike in inbound Kerberos auth to low-value hosts from DC/server accounts; MS-RPRN/MS-EFSR calls from unusual sources Eliminate unconstrained delegation; patch coercion vectors; enable EPA where supported
RBCD abuse Changes to msDS-AllowedToActOnBehalfOfOtherIdentity outside change windows Restrict WriteProperty/ownership on computer objects; alert on attribute writes
ADCS ESC1–ESC8 CA issuance logs for SAN mismatches; template/ACL change auditing; relay attempts on CES/CEP Enforce CA_DISABLE_UNIX_ADSUBJECTNAME/least-priv templates, require manager approval, enable EPA + HTTPS-only enrollment, run Certipy/PSPKIAudit regularly
DCSync Event 4662 with DS-Replication-Get-Changes-All GUID from a non-DC source Audit and tightly scope replication ACEs; monitor via SACL on the domain object; rotate krbtgt twice on suspected compromise
Baseline first Every detection above depends on knowing what legitimate replication, delegation, and enrollment traffic looks like in the specific environment. None of these signals are useful in isolation without a baseline to diff against — that baseline work is unglamorous and it's also the entire difference between a SOC that catches this and one that doesn't.
07

Closing Notes

None of the techniques above are novel. What separates an effective operator from someone running tools blind is the same thing in every section of this writeup: understanding why the trust relationship, delegation setting, template ACL, or replication right exists in the first place — and recognizing the exact conditions under which that legitimate mechanism becomes an escalation primitive. Map the environment, understand the mechanism, then move. In that order.

This writeup is part of the ongoing BreachOperators research archive. Future entries in this series will cover Kerberoasting economics at scale, hybrid Azure AD/on-prem trust abuse, and tiered administration bypass patterns.

BreachOperators Research
Offensive Security Research Collective — Active Directory Series, Vol. 01
08

References & Further Reading

  • 01 SpecterOps — "Certified Pre-Owned: Abusing Active Directory Certificate Services" (foundational ESC1–ESC8 taxonomy)
  • 02 Microsoft — MS-DRSR Directory Replication Service Remote Protocol specification
  • 03 Microsoft — MS-PKCA / Certificate mapping and StrongCertificateBindingEnforcement guidance (KB5014754)
  • 04 BloodHound / SharpHound documentation — trust and ACL edge collection
  • 05 Microsoft — Trusted Domain Object attributes and SID filtering reference