1. Resources
  2. Detection rules
  3. Domain Trust Modification

Domain Trust Modification detection rules

An attacker creates, removes or reconfigures a domain or forest trust, for example to trust a domain they control or to relax SID filtering. Domain controllers log 4706, 4707 and 4716, plus 4865-4867 for forest trust information.

Platform
Active Directory
Severity
High
Log source
Windows Security event log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Domain Admin or Enterprise Admin rights in the trusting domain, or delegated rights to create and modify trustedDomain objects.
Impact
Persistent access for an attacker-controlled domain, or escalation from a less protected trusted domain into this one when SID filtering is weakened.
Response
Remove a trust that was created without approval or restore the previous attributes of a changed one, and disable the account that made the change.
Mitigation
Keep SID filtering enabled on external trusts, use selective authentication, and restrict Domain Admin and Enterprise Admin membership.
Event IDs
470647074716486548664867

How the attack works

Trusts let accounts from one domain or forest authenticate to resources in another. Each trust is a trustedDomain object with a direction, a type and attributes such as TRUST_ATTRIBUTE_QUARANTINED_DOMAIN (SID filtering for external trusts) or TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, which control how strictly SIDs from the other side are filtered.

An attacker with Domain Admin or Enterprise Admin rights can add a trust to a domain they control, so that its accounts are accepted, or change an existing trust's attributes to weaken SID filtering, so that SID history from the trusted side is honored and a compromise there becomes a compromise here. Removing a trust can also be used to disrupt operations. Domain controllers log 4706 (trust created), 4707 (trust removed) and 4716 (trusted domain information modified) with the domain name, type, direction, attributes and SID filtering state, and 4865, 4866 and 4867 when forest trust information entries are added, removed or modified.

What an attacker needs

  • Domain Admin or Enterprise Admin rights (or delegated rights to create and modify trustedDomain objects) in the trusting domain.

Impact

Persistent cross-domain access for an external, attacker-controlled identity source, or escalation from a less protected trusted domain into this one when SID filtering is weakened. Trust changes affect authentication for the whole domain or forest.

Detection rules

Domain Trust Created or Removed

Detects the creation (4706) or removal (4707) of a trust to another domain or forest. Trusts change who can authenticate to the domain and are created or removed rarely, under change control. Requires Audit Authentication Policy Change on domain controllers.

LevelHighStatusExperimentalLog sourceWindows Security event log
title: Domain Trust Created or Removed
id: aa023adc-5d49-48fa-b6e9-f48779ee1226
status: experimental
description: >-
  Detects the creation (4706) or removal (4707) of a trust to another domain or
  forest. Trusts change who can authenticate to the domain and are created or
  removed rarely, under change control. Requires Audit Authentication Policy
  Change on domain controllers.
references:
  - https://attack.mitre.org/techniques/T1484/002/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4706
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4707
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.002
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID:
      - 4706
      - 4707
  condition: selection
falsepositives:
  - Planned trust creation or decommissioning during mergers, migrations or forest consolidation. Match the trust partner (DomainName) to a change record.
level: high

False positives

  • Planned trust creation or decommissioning during mergers, migrations or forest consolidation. Match the trust partner (DomainName) to a change record.

Domain or Forest Trust Settings Modified

Detects a change to an existing trust: trusted domain information modified (4716, covering type, direction, attributes and SID filtering) or forest trust information entries added, removed or modified (4865, 4866, 4867). Weakening SID filtering on a trust is a known way to escalate from a trusted domain. Requires Audit Authentication Policy Change on domain controllers.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Domain or Forest Trust Settings Modified
id: 798d2852-170b-421f-bac3-b419e480aedf
status: experimental
description: >-
  Detects a change to an existing trust: trusted domain information modified
  (4716, covering type, direction, attributes and SID filtering) or forest trust
  information entries added, removed or modified (4865, 4866, 4867). Weakening
  SID filtering on a trust is a known way to escalate from a trusted domain.
  Requires Audit Authentication Policy Change on domain controllers.
references:
  - https://attack.mitre.org/techniques/T1484/002/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4716
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4865
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4867
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484.002
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID:
      - 4716
      - 4865
      - 4866
      - 4867
  condition: selection
falsepositives:
  - Planned trust reconfiguration and forest name-suffix changes by administrators. Review TdoAttributes and SidFilteringEnabled in 4716 before closing.
level: medium

False positives

  • Planned trust reconfiguration and forest name-suffix changes by administrators. Review TdoAttributes and SidFilteringEnabled in 4716 before closing.

Triage

  • Identify the trust partner (DomainName, DomainSid), the change (TdoType, TdoDirection, TdoAttributes, SidFilteringEnabled) and who made it (SubjectUserName).
  • For 4716, convert TdoAttributes to hexadecimal and compare with the previous value; dropping quarantine (0x4) or adding treat-as-external (0x40) changes SID filtering.
  • Confirm the change with the identity team and a change record; a trust to an unknown domain is an incident.
  • Review authentications from the trusted domain (4624, 4769 with accounts from that domain) after the change.

Response

Once the attack is confirmed:

  1. Remove a trust that was created without approval, or restore the previous attributes of a changed trust so that SID filtering is in force again.
  2. Disable the account that made the change. Creating or changing a trust takes Domain Admin or Enterprise Admin rights, so treat it as a compromise at that level.
  3. Review what accounts from the other side of the trust did while the change was in effect, and remove the access they obtained, such as group memberships and permissions granted to them.
  4. Review the other changes the same account made in that period.
  5. Compare the trust inventory and the attributes of each trust with the approved state in every domain of the forest.

Mitigation

  • Keep SID filtering (quarantine) enabled on external trusts and SID history disabled on forest trusts unless a documented migration needs it.
  • Use selective authentication on forest and external trusts so only approved accounts can authenticate across them.
  • Restrict Domain Admin and Enterprise Admin membership and require change approval for trust operations.
  • Enable "Audit Authentication Policy Change" on all domain controllers and review the trust inventory regularly.

Frequently asked questions

Which change to an existing trust weakens SID filtering?

In event 4716, convert TdoAttributes to hexadecimal and compare it with the previous value. Dropping the quarantine bit (0x4) or adding treat-as-external (0x40) changes how strictly SIDs from the other side are filtered, and the SidFilteringEnabled field shows the resulting state. With weaker filtering, SID history from the trusted side is honored.

Do events 4865, 4866 and 4867 mean that a new trust was created?

No. They are written when forest trust information entries are added, removed or modified, for example when name suffixes change. A new trust is event 4706 and a removed one is event 4707. Review the entry that changed, but do not read these events as a new trust.

Why alert when a trust is removed and not only when one is added?

Removing a trust stops accounts from one side from authenticating to resources on the other, and it can be used to disrupt operations. Trusts are also created and removed rarely and under change control, so any such event without a change record needs an explanation.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.