Cross-Forest Trust Abuse
When you compromise a domain within one forest and a trust exists to another forest, SID filtering (enabled by default on inter-forest trusts) blocks privilege escalation via SID history injection. The attack surface shifts to Kerberos enumeration across the trust boundary, cracking service account hashes in the target forest, and authenticating to resources in the trusted domain using harvested credentials or inter-realm tickets.
This page covers attacks on external forest trusts where SID filtering is active. For intra-forest child-to-parent escalation see Domain Trust Abuse.
Enumerate cross-forest trusts and target forest structure
Confirm trust direction and type before choosing an attack path. A bidirectional trust means both forests accept authentication from the other. A one-way trust means only users from the trusted domain can authenticate to the trusting domain.
trustPartner: trusted.local trustDirection: 3 (bidirectional) trustAttributes: 8 (forest trust) flatName: TRUSTED Name Email PasswordLastSet ------------- ---------------------- ------------------- Administrator [email protected] 2023-10-01 12:00:00 svc-sql [email protected] 2022-05-10 08:00:00
Kerberoasting across the trust
Service accounts in the trusted forest are roastable from the source domain. Impacket and PowerView both support targeting a remote domain over a trust. Cracked hashes give valid credentials in the target forest — check if any service account has elevated rights.
$krb5tgs$23$*svc-sql$TRUSTED.LOCAL$trusted.local/svc-sql*$8a3f... [*] Cracked: svc-sql:Summer2023!
Authenticate to trusted forest with cracked credentials
Cracked service account hashes are valid credentials in the target forest. Use them to enumerate further or access services. Even a low-privileged account in the target forest may reveal additional misconfigurations or have access to sensitive resources.
SMB 10.20.10.10 445 TRUSTED-DC [+] TRUSTED.LOCAL\svc-sql:Summer2023! (Pwn3d!)
Trust account hash — inter-realm ticket forging
Every forest trust relationship creates a corresponding machine account in AD named after the trusted domain (e.g., TRUSTED$). Its NT hash is the inter-realm trust key. With this key you can forge inter-realm tickets that authenticate to services in the trusted forest as any user in your domain. SID filtering prevents privilege escalation, but the tickets allow accessing resources the source-domain user already has rights to — useful for lateral movement, not escalation.
TRUSTED.LOCAL\TRUSTED$:1234:aad3b435b51404eeaad3b435b51404ee:a8f3c2d1b9e4f7a2... [*] Service ticket saved for cifs/trusted-dc.trusted.local
With SID filtering active, the inter-realm ticket technique provides lateral movement but not privilege escalation. For privilege escalation to succeed across a forest trust boundary, selective authentication must be misconfigured, or a user account in the source domain must have explicit rights in the target forest.
References
-
Impacket (GitHub)github.com/fortra/impacket (opens in new tab)
GetUserSPNs -target-domain for cross-trust Kerberoasting, getST for inter-realm tickets
-
PowerView (GitHub)github.com/PowerShellMafia/PowerSploit (opens in new tab)
Get-DomainTrust, Invoke-Kerberoast -Domain for cross-trust enumeration and roasting
-
A Guide to Attacking Domain Trusts — harmj0yharmj0y.medium.com/a-guide-to-attacking-domain-trusts-ef5f8992bb9d (opens in new tab)
Cross-forest trust attack paths, SID filtering behavior, inter-realm ticket abuse
Was this helpful?
Your feedback helps improve this page.