Unconstrained Delegation
Last updated
Last updated
This section requires the SPN set during the Constrained Delegation setup on FILE01
.
Login on DC02
with the username Administrator
and password Welcome01!
.
Open the "Active Directory Users and Computers" administration tool.
3. Open the "Computers" directory and right click the FILE01
server and select "Properties".
4. Open the "Delegation" tab and select "Trust this computer for delegation to any service (Kerberos only)".
5. Click on "Apply" and "OK".
If a system has unconstrained delegation configured it saves kerberos tickets of users in the LSASS so it can be used to authenticate to other services. An attacker could extract these saved tickets and use them against any other service.
Example: We have a webserver and webapplication that authenticates to a database too change some entries on behalf of the user. To do this kerberos unconstrained delegation is configured on the webserver.
The attack will start from the perspective of already owning the FILE01
server from the constrained delegation abuse.
Login to WS01
as Richard with the password Sample123
.
Start PowerShell and download and execute an amsi and PowerView in memory:
3. Execute the following PowerView Query to retrieve all domain computers which have unconstrained delegation and only print the samaccountnames:
4. There are two systems with unconstrained delegation. One which is the domain controller, which always had unconstrained delegation. The other is FILE01
. Since we got access to this system we can check if there are any tickets onto the system with Rubeus.
To simulate that unconstrained delegation is configured with a purpose we need to login to the FILE01 server as the administrator user. This will make sure that there are TGT tickets on the system available.
5. There is a TGT ticket from the domain administrator, we can dump this using the following Rubeus command.
6. Then on WS01
we can import this ticket with the following Rubeus command:
7. After importing the ticket we can simply create a pssession to the DC or execute a DC sync attack.
Tightly secure and monitor the user of AD objects with delegation set.
Set strong passwords and rotate them periodically.
Limit logons to systems.
Harden the systems these accounts are used.
Add the flag "this account is sensitive and cannot be delegated"
Add all high privileged accounts to the protected users group.