Kerberos
Kerberosting
Check the Imported Ticket
after that you can test it with ls
Unconstrained Delegation
User
--- authenticates to ---> IIS server
---> authenticates on behalf of the user ---> DB server
Any user authentication (i.e CIFS) to the computer with unconstrained delegation enabled on it, will cache that user's TGT in memory, which can later be dumped and reused by an adversary.
use tool -> powerview.ps1
Exploit:
We could wait for user to connect with IIS01 or do phishing attack to force user connect to IIS01.
Then check mimikatz again for TGT in the memory:
After we got OFFENSE.LOCAL/administrator, mean we got the administrator for entire domain.
run this command to export the TGT.
Then import the ticket with mimikatz
login with PSExec or PSSession
Note:
Reference:
Constrained Delegation
note:
cn
(common name) -> current computer name
msds-allowedtodelegateto
-> target computer
useraccountcontrol
-> TRUSTED_TO_AUTH_FOR_DELEGATION
example: IIS01 allows to contrained delegation to FILE_01
User has to have an attribute TRUSTED_TO_AUTH_FOR_DELEGATION
in order for it to be able to authenticate to the remote service.
TRUSTED_TO_AUTH_FOR_DELEGATION - (Windows 2000/Windows Server 2003) The account is enabled for delegation. This is a security-sensitive setting. Accounts that have this option enabled should be tightly controlled. This setting lets a service that runs under the account assume a client's identity and authenticate as that user to other remote servers on the network.
Exploit on the computer that has trusted_to_auth_for_delegation
When get the Base64 rubeus ticket.
Note:
When access kerberost things, make sure your clock screw is good.
DC PrintSpooler
Our environment for this lab is:
ws01 - attacker compromised host with kerberos delegation enabled (attacker, server)
dc01 - domain controller running a print service (victim, target)
check with this
Before attack (administrator cmd in breached computer ws01 )
Then run SpoolSample.exe (cmd.exe) in IIS01
Rubeus could also import the TGT directly to memory:
We indeed got a TGT for DC01$ computer!
With this, we can make our compromised system ws01$
appear like a Domain Controller and extract an NTLM hash for the user offense\spotless
which we know has high privileges in the domain:
reference:
Last updated