Join our Newsletter — 33% off our NHI Course
Home› Guides› Active Directory Trusts and SID Filtering Guide: Containing…
Guide Identity & Access Management (IAM)

Active Directory Trusts and SID Filtering Guide: Containing Risk Between Domains and Forests

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 13 min read
On this page

An Active Directory trust lets one domain accept another domain's authentication, so a compromise on the trusted side can become access on the trusting side unless the trust is deliberately limited. Trusts accumulate through mergers, divestments, test environments and partner projects, and many are wider than anyone intended: two-way when one-way would do, forest-wide authentication instead of selective, SID filtering relaxed during a migration and never restored. This guide explains how trusts and SID filtering actually work, which trust attributes matter, how SID history becomes an escalation path, how to log and detect trust changes, and the hardening baseline every trust should meet. It is for AD architects, identity engineers and the teams running mergers and divestments. For federation between identity providers rather than AD domains, see the Federation and Trust Relationships Guide.

This is an independent guide from NHI Mgmt Group, based on Microsoft's public documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.

Key takeaways

  • The forest is the security boundary. Domains in the same forest trust each other transitively and their SIDs are not filtered between them, so a compromised child domain should be treated as a compromised forest.
  • SID filtering is what makes cross-forest trusts safe. Microsoft's protocol specification filters forest-local and well-known privileged SIDs at cross-forest and external boundaries; relaxing it hands the trusted side a route to your privileged groups.
  • Selective authentication limits blast radius. Instead of letting every user in the trusted forest authenticate everywhere, grant the right to authenticate only on the servers they need.
  • Trust attributes tell you the real configuration. The trustAttributes bitmask records quarantine, forest transitivity, cross-organisation (selective authentication), treat-as-external and TGT delegation, and is the first thing to review.
  • Trust changes are rare and high value to log. Events 4706, 4707 and 4716 on domain controllers should alert, and event 4675 shows SID filtering doing its job.

How identity and access work in Active Directory trusts

A trust is a relationship in which the trusting domain accepts authentication performed by the trusted domain. Users in the trusted domain can then be granted access to resources in the trusting domain. Microsoft's trust documentation describes the key properties:

  • Direction: in a one-way trust, users in the trusted domain can access resources in the trusting domain but not the reverse. A two-way trust is two one-way trusts in opposite directions.
  • Transitivity: transitive trusts extend to other domains along the trust path; non-transitive trusts are limited to the two domains. Forest trusts are not implicitly extended to a third forest.
  • Trust secrets: each trust has a shared password stored in the trusted domain object (TDO). The trusting domain's PDC emulator changes it every 30 days and keeps the previous password as a fallback.
  • Kerberos across trusts: the client's domain issues a referral ticket encrypted with the inter-realm trust key, which the trusting domain's KDC accepts. The authorisation data in that ticket, the privilege attribute certificate (PAC), carries the user's SIDs, and those SIDs are what SID filtering inspects.
Trust typeBetweenTransitiveSID filtering by defaultTypical use
Parent-childDomains in the same tree, created automaticallyYes, two-wayNo (within forest)Multi-domain forests
Tree-rootTree root and forest root in the same forestYes, two-wayNo (within forest)Multiple namespaces in one forest
ShortcutTwo domains in the same forestYesNo (within forest)Shortening authentication paths
ForestTwo forest root domainsYes, between the two forests onlyYesMergers, partner forests, resource or admin forests
ExternalA domain and a domain in another forestNoYes (quarantined)Narrow access to one domain
RealmAD and a non-Windows Kerberos realmConfigurableNot applicableMIT Kerberos interoperability

How SID filtering works

The MS-PAC specification defines SID filtering by trust boundary and SID class. In summary:

  • Always filtered: most well-known SIDs (such as Everyone, Authenticated Users and BUILTIN\Administrators) never cross any trust boundary.
  • Forest-specific SIDs: domain SIDs with RIDs below 1000, which include Administrator, krbtgt, Domain Admins and Enterprise Admins, are filtered at cross-forest, external and quarantined boundaries.
  • Forest-local SIDs: at a cross-forest boundary, SIDs belonging to the trusting forest's own domains are not allowed in from the other side. This is what stops a trusted forest placing your Domain Admins SID in its users' SID history.
  • Namespace checks: SIDs whose domain does not belong to the trusted domain (external trusts) or the trusted forest's domains (forest trusts) can be filtered. The forest trust information can be narrowed to exclude specific domains of the other forest.
  • Quarantined external trusts: only SIDs of the trusted domain itself are allowed.

Event 4675, "SIDs were filtered", records each filtering action with the target account, trust information and the filtered SIDs.

Trust attributes that matter

Flag (MS-ADTS)ValueSecurity meaning
TRUST_ATTRIBUTE_NON_TRANSITIVE0x1Trust cannot be used transitively
TRUST_ATTRIBUTE_QUARANTINED_DOMAIN0x4Trusted domain is quarantined and subject to SID filtering (external trusts)
TRUST_ATTRIBUTE_FOREST_TRANSITIVE0x8Cross-forest trust between forest roots
TRUST_ATTRIBUTE_CROSS_ORGANIZATION0x10Trust to a domain or forest outside the organisation; this is how selective authentication is recorded
TRUST_ATTRIBUTE_WITHIN_FOREST0x20Trusted domain is in the same forest
TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL0x40Cross-forest trust treated as external for SID filtering, which relaxes the forest-level checks; often set during migrations so SID history works
TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION0x80MIT realm trust can use RC4 keys
TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS0x100TGTs across the trust encrypted with AES
TRUST_ATTRIBUTE_PIM_TRUST0x400With treat-as-external, a Privileged Identity Management trust that allows forest-local SIDs (bastion forest designs)
TRUST_ATTRIBUTE_CROSS_ORGANIZATION_ENABLE_TGT_DELEGATION0x800Tickets under the trust may be delegated; since KB4490425 delegation across the trust is off unless this is set

Admin roles and privileged access

  • Who can create trusts: Microsoft documents that creating a forest trust requires Domain Admins in the forest root domain or Enterprise Admins. Trust creation should be a Tier 0 change with approval from both organisations' identity owners.
  • Child domain administrators are forest administrators in practice: because SIDs are not filtered inside a forest, an attacker with control of any domain can obtain privileges across the forest, including through SID history (T1134.005). Separate domains do not create separate administrative boundaries; separate forests do.
  • Cross-forest administration: avoid granting groups from a trusted forest administrative rights in yours. If a partner or acquired forest's administrators need access, give them accounts in your forest under your controls rather than relying on their groups.
  • Admin and bastion forests: PIM trusts let a dedicated administrative forest's groups carry forest-local SIDs into a production forest. That design concentrates privilege, so the bastion forest must be more tightly controlled than production; the Tiered Administration and Enterprise Access Model Guide covers the current enterprise access model, which Microsoft now favours over separate admin forests for most organisations.
  • SID history management: adding SID history is a privileged operation used by migration tools. Event 4765 records it. After a migration, the attribute should be cleared so old SIDs stop granting access.

Integrations, API tokens and service accounts

Trusts carry their own non-human identities and are often why service accounts end up with access across organisational boundaries:

  • Trust accounts: each trust is backed by an account and shared secret. Microsoft states the PDC emulator rotates the password every 30 days and that a domain controller holding only the N-2 password cannot use the trust. Monitor these accounts like any machine credential and investigate unexpected resets.
  • Cross-forest service accounts: applications in one forest running under accounts from another are a common reason teams resist selective authentication. Inventory them, grant "Allowed to Authenticate" only on the servers they use, and plan to replace them with accounts local to the resource forest.
  • Delegation across trusts: since KB4490425, unconstrained delegation of TGTs across a forest trust requires the enable-TGT-delegation flag. Leave it unset; a service in a partner forest configured for unconstrained delegation could otherwise receive your users' TGTs. See the Kerberos Delegation Security Guide.
  • Synchronisation and identity tools: Entra Connect, IGA connectors and migration tools often need accounts in multiple forests. Scope each to the forests and OUs it manages and keep their credentials in a vault.
  • Cloud directory trusts: Microsoft Entra Domain Services supports one-way outbound forest trusts to on-premises AD (Microsoft documents a limit of five). The same rules apply: one-way, scoped and monitored.

Logging and detection

EventSubcategoryWhat it showsAlert on
4706 A new trust was created to a domainAudit Authentication Policy ChangeTrusted domain name and SID, trust type, direction, attributes, SID filtering stateEvery occurrence; Microsoft recommends triggering alerts on trust creation
4707 A trust to a domain was removedAudit Authentication Policy ChangeTrust removalUnplanned removals (possible disruption or cover)
4716 Trusted domain information was modifiedAudit Authentication Policy ChangeChanges to direction, attributes or SID filteringAny change that clears quarantine, sets treat-as-external, enables TGT delegation or makes a trust two-way
4675 SIDs were filteredAudit LogonFiltered SIDs for an account crossing a trustFiltered SIDs mapping to privileged RIDs or your own forest's domains (an attempted injection)
4765 SID History was added to an accountAudit User Account ManagementSID history addedAny addition outside an approved migration
4766 An attempt to add SID History failedAudit User Account ManagementFailed attemptEvery occurrence
4769 Kerberos service ticket requestedAudit Kerberos Service Ticket OperationsReferral and cross-trust ticket requestsAccounts from a trusted forest requesting tickets to Tier 0 services

Also watch for trust discovery (T1482 Domain Trust Discovery), which commonly precedes cross-trust movement: unusual LDAP queries for trustedDomain objects and trust enumeration API calls from workstations. The Active Directory Security Monitoring and Event IDs Guide covers the audit policy needed for these events.

Hardening baseline

  1. Inventory every trust: list each domain's trusts with partner, type, direction, transitivity, attributes, business owner and expiry date. ATT&CK's mitigation for T1482 is simply to map trusts and keep them to a minimum.
  2. Remove what has no owner: trusts left from completed migrations, divested units and old partner projects are the easiest risk to remove. Test removal by disabling access paths first and watching for failures.
  3. Make trusts one-way: most resource access needs only the resource side to trust the account side. Two-way trusts double the exposure.
  4. Keep SID filtering on: confirm external trusts are quarantined and that forest trusts do not carry treat-as-external unless a time-boxed migration needs SID history. Record the end date and restore the setting.
  5. Use selective authentication for external parties: enable it on trusts to forests outside your organisation and grant "Allowed to Authenticate" on specific computer objects to specific groups.
  6. Narrow the forest trust information: where a partner forest has domains you never need, exclude them from the trust's name suffix routing and SID namespace.
  7. Disable TGT delegation across trusts: keep the enable-TGT-delegation flag unset.
  8. Prefer AES: ensure trusts support AES keys and plan to remove RC4 use on realm trusts.
  9. Clean SID history: after migrations, clear sIDHistory on migrated accounts and groups, as ATT&CK's M1015 mitigation for T1134.005 recommends.
  10. Segment: restrict network paths between forests to the domain controllers and servers that need them, recognising that AD RPC traffic cannot be confined to a few ports.

Decision guidance: choose a forest trust with selective authentication when a partner or acquired company needs access to a defined set of servers. Choose an external, quarantined trust when only one domain is involved. Choose no trust at all, using federation or guest accounts in a cloud identity provider, when the access is to web or SaaS applications; it removes Kerberos-level coupling entirely. For mergers, a time-limited two-way forest trust with SID history may be justified, but it should have an end date, a named owner and a plan to migrate and remove it. Small organisations with a single forest rarely need any external trust and should treat a request for one as a design review, not a ticket.

Common misconfigurations

  • Treating a domain as a boundary: giving an acquired company its own domain inside your forest and assuming its administrators are contained.
  • SID filtering relaxed for a migration and never restored: treat-as-external set or quarantine removed so SID history works, then left in place for years.
  • Two-way forest-wide trusts with partners: every user in the partner forest can authenticate to every server in yours, and vice versa.
  • Stale SID history: migrated accounts still carry old domain SIDs, so access granted to those SIDs in either forest persists and is hard to review.
  • Orphaned trusts: trusts to divested or decommissioned domains whose DCs nobody now patches but whose trust secret still works.
  • Trust events not collected: Audit Authentication Policy Change not enabled on domain controllers, so trust creation and modification go unseen.

Framework mapping

FrameworkReferenceRelevance
MITRE ATT&CK v20T1482 Domain Trust Discovery; T1134.005 SID-History Injection; T1550.003 Pass the Ticket; T1558 Steal or Forge Kerberos TicketsTrust enumeration, SID history abuse and ticket use across trusts
NIST SP 800-53 Rev. 5AC-3 Access Enforcement; AC-6 Least Privilege; CA-3 Information Exchange; SC-7 Boundary Protection; AU-6 Audit Record Review, Analysis, and ReportingScoped cross-domain access, documented interconnections, segmentation, trust event review
NIST CSF 2.0PR.AA-05; ID.AM-03; DE.CM-03Least privilege, documented data flows and connections, monitoring
CIS Controls v8.1Control 6 Access Control Management; Control 12 Network Infrastructure ManagementAccess across boundaries and network segmentation between forests
ISO/IEC 27001:2022 Annex AA.5.15 Access control; A.5.19 Information security in supplier relationships; A.8.22 Segregation of networksTrust scope, partner trusts, network segregation

Practitioner checklist

  • Export every trust with its trustAttributes value decoded, and assign an owner and review date.
  • Remove trusts with no owner or no current business need.
  • Convert two-way trusts to one-way wherever access is only needed in one direction.
  • Confirm SID filtering: external trusts quarantined, forest trusts without treat-as-external unless a dated migration requires it.
  • Enable selective authentication on trusts to external organisations and grant Allowed to Authenticate per server and group.
  • Keep TGT delegation across trusts disabled and ensure AES is supported.
  • Clear sIDHistory from migrated accounts once migrations are complete.
  • Enable Audit Authentication Policy Change and alert on 4706, 4707 and 4716; review 4675 and 4765.
  • Treat every domain in a forest as one security boundary when planning administration and acquisitions.

Standards and references

Related NHI Mgmt Group resources: Federation and Trust Relationships Guide · Active Directory and Entra ID Hardening Guide · Kerberos Security Guide · Active Directory ACL and Delegation Hygiene Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.