Kerberos Constrained Delegation is a feature in Kerberos authentication protocol that allows a service to impersonate a client and access other services on behalf of that client. It provides a way to delegate a user's credentials to a service so that the service can authenticate and access resources on behalf of the user. This feature is used to enable scenarios like multi-tier applications, where a front-end service needs to access back-end services on behalf of the user.
Constrained delegation adds an extra layer of security by limiting the services that a service can impersonate and the target services that it can access. This helps prevent unauthorized access and reduces the attack surface.
By using Kerberos Constrained Delegation, organizations can achieve a balance between security and functionality, allowing services to perform delegated tasks while still maintaining control over the scope of the delegation.
The three types of Kerberos Constrained Delegation are:
To illustrate a constrained delegation attack, we'll make the assumption that the web_service user, which is trusted for delegation, has been compromised. The password for this account is 'Slavi123'. We'll kick off the process by employing the 'Get-NetUser' function from PowerView to list user accounts in the domain that are trusted for constrained delegation.
PS C:\Users\bob\Downloads> Get-NetUser -TrustedToAuth

It seems that the web-service delegates the HTTP to DC1. Therefore, any threat actor gaining control over web_service can request a Kerberos ticket for any user in Active Directory and use it to connect to DC1 over PowerShell Remoting.

When im trying to attempt getting a ticket, it says that i must impersonate as a /tgs

therefore im trying to impersonate as admin first
