Last updated
Last updated
dev.cyberbotic.io also has a one-way inbound trust with dev-studio.com.
Because the trust is inbound from our perspective, it means that principals in our domain can be granted access to resources in the foreign domain. We can enumerate the foreign domain across the trust.
Get-DomainForeignGroupMember
will enumerate any groups that contain users outside of its domain and return its members.
This output shows that there's a member of the domain's built-in Administrators group who is not part of dev-studio.com. The MemberName field contains a SID that can be resolved in our current domain.
This means that members of DEV\Studio Admins are also members of the built-in Administrators group of dev-studio.com and therefore inherit local admin access to dc.dev-studio.com. If this is confusing, this is how it looks from the perspective of the foreign domain controller.
To hop this trust, we only need to impersonate a member of this Studio Admins domain group.
To hop a domain trust using Kerberos, we first need an inter-realm key. Obtain a TGT for the target user (here I am using asktgt
with their AES256 hash).
Next, use that TGT to request a referral ticket from the current domain to the target domain.
Notice how this inter-realm ticket is of type rc4_hmac
even though our TGT was aes256_cts_hmac_sha1
. This is the default configuration unless AES has been specifically configured on the trust, so this is not necessarily bad OPSEC.
Finally, use this inter-realm ticket to request TGS's in the target domain. Here, I'm requesting a ticket for CIFS.