Domain Trust Without SID Filtering
A trust to another domain or forest does not filter security identifiers, so an attacker who controls the trusted side can claim privileged group membership in this domain.
| Severity | Medium |
| CVSS 3.1 | 6.6 CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 7.5 CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-346: Origin Validation Error |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1134.005 SID-History Injection, T1558.001 Golden Ticket |
| Category | Security Misconfiguration |
Description
When a user from a trusted domain accesses resources across a trust, their Kerberos ticket or NTLM authentication carries the security identifiers (SIDs) of their groups, and can also carry SIDs from the account's sIDHistory attribute. SID filtering is the check by which the trusting domain discards SIDs that do not belong to the trusted domain, so that the trusted domain can only make claims about its own principals. Without it, administrators of the trusted domain, or an attacker who gains administrative control of it, can add the SIDs of the trusting domain's groups, such as a group with administrative rights there, to an account's sIDHistory or to a forged ticket, and receive those groups' rights across the trust. Only the trusting side is at risk, and only after the trusted side has been compromised, but the trusted domain may be less well protected than this one: for example a partner's domain, an acquired company's domain or an old domain kept for a migration.
SID filtering is applied by default to external and forest trusts created by Windows Server 2003 and later domain controllers. It is removed when quarantine is turned off on an external trust (the /quarantine:no option of netdom trust), and relaxed when SID history is enabled on a forest trust (/enablesidhistory:yes), which lets some SIDs from the trusting forest through, potentially including groups with administrative rights, so the impact depends on which of those can still be claimed. Both are usually done to support a migration and then left in place, and the risk grows with the number of such trusts and the weakness of the domains on the other side. Trusts between domains in the same forest are not filtered: the forest, not the domain, is the security boundary.
Trust settings can be read by any domain user from the trust objects' trustAttributes or with Get-ADTrust, are reported by tools such as PingCastle, and are displayed by netdom trust with the /quarantine or /enablesidhistory option and no value.
Remediation
- Enable SID filtering on every external trust with the
/quarantine:yesoption ofnetdom trust, run with administrative credentials for the trusting domain. - Disable SID history on forest trusts (
/enablesidhistory:no) once any migration that needed it has finished, and removesIDHistoryvalues from migrated accounts after confirming that resources no longer depend on them. - Before enabling filtering, check that no access across the trust relies on SID history or on SIDs from outside the trusted domain, as that access will stop working.
- Remove trusts that are no longer needed, and for those that remain, use selective authentication, so that accounts from the trusted domain can only authenticate to the servers they are explicitly allowed to use.
- Where two environments must be separated administratively, keep them in separate forests, since domains in the same forest cannot be isolated from each other.
Confirm the fix by displaying the trust settings again with netdom trust or Get-ADTrust, and by repeating the trust checks of the assessment tool used.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.