"Note that the Active Directory domain is not the security boundary; the AD forest is." (Sean Metcalf, )
Theory
Trust 👉🏻 a link between the authentication systems of two domains.
Transitive trust 👉🏻 the trust is extended to objects which the child domain trusts.
Non-transitive trust 👉🏻 only the child domain itself is trusted.
Bidirectional (two-way) trust 👉🏻 users from both trusting domains can access resources.
One-way trust 👉🏻 only users in a trusted domain can access resources in a trusting domain, not vice-versa (the direction of trust is opposite to the direction of access).
Some trust types:
Trust Type
Description
Parent-child
A trust between domains within the same forest. The child domain has a bidirectional transitive trust with the parent domain.
Cross-link (shortcut)
A trust between child domains (used to speed up authentication).
Tree-root (intra-forest)
A bidirectional transitive trust between a forest root domain and a new tree root domain. Created implicitly when a new domain tree is created in the forest.
Forest
A transitive trust between two forest root domains. Enforces SID filtering.
External (inter-forest)
A non-transitive trust between two separate domains in separate forests that are not already joined by a forest trust. Enforces SID filtering.
Having just an RC4/AES keys of a user in target forest (that's a foreign user in target domain, but a native user in current domain), we can request Kerberos tickets manually with Rubeus.
Abusing Bidirectional ParentChild (WITHIN_FOREST) trust between child.megacorp.local ⟷ megacorp.local.
Check if SID filtering is enabled for a trust:
Cmd > netdom.exe trust child.megacorp.local /domain:megacorp.local /quarantine
SID filtering is not enabled for this trust. All SIDs presented in an
authentication request from this domain will be honored.
Raise Child
For creating a cross-trust golden ticket (Golden Ticket + ExtraSid) we'll need:
Child domain FQDN (child.megacorp.local);
Name of the child domain's DC machine account and its RID (DC01$, 1337);
SID of the child domain (S-1-5-21-4266912945-3985045794-2943778634);
SID of the parent domain (S-1-5-21-2284550090-1208917427-1204316795);
Compomised krbtgt hash from the child domain (00ff00ff00ff00ff00ff00ff00ff00ff);
???
PROFIT.
1. Child domain FQDN:
PS > $env:userdnsdomain
CHILD.MEGACORP.LOCAL
2. Name of the child domain's DC machine account and its RID:
If SID history is enabled (e. g., if domain is on its migration period, netdom trust b.net /d:a.net /enablesidhistory:yes) then the forest trust is treated as external.
We can try to locate non-default (with RID greater than 1000) admin account:
No authentication enumeration via MS-NRPC (Netlogon) with :
This helps to use such tickets with Impacket.
Manually craft an IR TGT injecting a privileged SID (example for WITHIN_FOREST trust but can also be adopted for TREAT_AS_EXTERNAL ):
List user accounts from a target domain with SPNs set for :
If such an account is a member of a domain local security group (not a global group like Enterprise Admins or Domain Admins) and allows us to compromise a user or a computer in the target domain, we can create a cross-trust golden ticket for her the same way as described .