Priv Esc Trusts Across Forest
Kerberos working across forest is same as working between two domains for example a client wants to access a service from dollarcorp.moneycorp.local to eurocorp.local, if there is external trust configured first the client will request for TGT from their own dc receive TGT, present the TGT and request for ST for service in another forest here the dc will see that the service resides in another forest via the SPN and present the client with cross realm TGT which is encrypted using trust key whose copy is present in both the DC(dollarcorp's and eurocorp's) the client will send the cross realm TGT to dc of eurpcorp and request to access a service then the dc of eurpcorp will provide him/her ST for that particular service and the client will present the ST to that service and gain access. Here if it was between two domains inside the same forest and if we have DA access on one domain we could extract the trust key and forge an inter realm TGT with sid history as enterprise administrator and gain access to dc or computers in another domain inside same forest as enterprise administrator but in case of across forest there exist a security mechanism called sid filtering which prevents from doing so but we can access only explicitly allowed resources like cifs, file service, database, etc. for example
We extract trust key rc4_hmac_nt from [In] dollarcorp.moneycorp.local -> eurocorp.local
Forge cross realm tgt using bettersafetykatz
Using rubeus we reqest ST for CIFS of eurocorp.local and present the ST to CIFS service
Now here we will not be able to access C$ although we have forged the TGT and we will only be allowed to access the resource with explicit permission example
How do we find such explicitly allowed resources?
Enumerate how many machines are there in eurocorp.local
REquest ST for CIFS for every machine like above
Run net view against each machine and check if we can list shares
net view \\eurocorp-dc.eurocorp.local\
thendir \\eurocorp-dc.eurocorp.local\accessible-resource\
thentype \\eurocorp-dc.eurocorp.local\accessible-resource\flag.txt
Last updated