The seEnableDelegationPrivilege gives an account the ability to enable both TRUSTED_FOR_DELEGATION and TRUSTED_TO_AUTH_FOR_DELEGATION flags in the userAccountControl attribute of a domain service account for which the account in question has Write rights, namely →
Futhermore, it allows the domain account in question to modify the msDS-AllowedToDelegateTo, an attribute required to perform KCD both with and without Protocol Transition
Note that it’s also required to have WriteProperty / GenericWrite / GenericAll ( aside from seEnableDelegationPrivilege ) over msDS-AllowedToDelegateTo of the target service account in order to populate or modify it
So, to sum up, without the seEnableDelegationPrivilege is not possible to enable both KUD and KCD ( both types )
Let’s suppose that we compromise a domain user account that belongs to the Remote Management Users group of the DC, so we can PSRemote to the latter
Once we establish a connection, we list the privileges associated with the current primary access token and see seEnableDelegationPrivilege set and enabled
Subsequently, we check if the user account has any Write rights over any service account in the domain, as we have to enable the TRUSTED_FOR_DELEGATION flag in the userAccountControl attribute of any of them in order to enable KUD on it
If not, we can check the value of the msDS-MachineAccountQuota domain attribute, if it’s greater than 0, we can leverage the controlled user account to add a new computer account to the domain
The user account in question, among other rights, has WriteProperty over the userAccountControl attribute of the added computer account, so now we really can enable KUD, as long as we have Write rights over userAccountControl and seEnableDelegationPrivilege enabled
A controlled domain account with seEnableDelegationPrivilege
To modify userAccountControl and enable KUD
WriteProperty / GenericWrite / GenericAll over userAccountControl
To modify it and enable KUD as well
Target account must be a Service Account
i.e. At least one registered SPN
msDS-MachineAccountQuota greater than 0
To add a new computer account
UNIX-Like
For instance, let’s suppose that our controlled user account has seEnableDelegationPrivilege set but it does not have Write rights over any existing service account in the domain
Then, as stated, we will have to leverage the msDS-MachineAccountQuota domain attribute to add a new computer account on which we can enable KUD as we will have WriteProperty over its userAccountControl attribute, along with the mentioned delegation privilege
Checking our current privileges
seEnableDelegationPrivilege enabled
whoami /priv
Checking the msDS-MachineAccountQuota domain attribute
Following the same example as with KUD, we compromise a domain user account that has seEnableDelegationPrivilege enabled
Then, we validate if the user account has any Write rights over any existing service account in the domain, as we must modify userAccountControl in order to enable KCD with PT
Note that, as stated, we need WriteProperty / GenericWrite / GenericAll over the userAccountControl attribute of a service account, in addition to seEnableDelegationPrivilege, to enable KCD with PT
In this case, we must enable the TRUSTED_TO_AUTH_FOR_DELEGATION within userAccountControl
Furthermore, we have to populate the msDS-AllowedToDelegate attribute of the given service account with a valid SPN for which we will request a service ticket during the S4U2Proxy
Namely, the SPN of an account that we want to compromise, such as a DC
To do so, we must have GenericWrite / GenericAll over msDS-AllowedToDelegateTo, along with, again, seEnableDelegationPrivilege
So yes, seEnableDelegationPrivilege is required to write in both userAccountControl and msDS-AllowedToDelegateTo attributes, along with the necessary and mentioned standard rights
At least WriteProperty over userAccountControl At least GenericWrite over msDS-AllowedToDelegateTo
In this case, it does not make sense to add a new computer account to the domain by leveraging msDS-machineAccountQuota as we will not have WriteProperty over its msDS-AllowedToDelegateTo, although we can enable TRUSTED_TO_AUTH_FOR_DELEGATION on its userAccountControl attribute
So, to sum up, in order to completely enable KCD with PT on a given domain service account, we must have seEnableDelegationPrivilege enabled and at least GenericWrite over it
Once again, following the scenario outlined in the previous cases, this time we want to configure KCD without Protocol Transition in a given domain service account
We have compromised a user account that has seEnableDelegation enabled
Similarly to KCD with PT, the user account in question must have at least WriteProperty over msDS-AllowedToDelegateTo in order to enable KCD, along with the mentioned privilege
In this case it’s not required to modify its userAccountControl attribute as we do not need Protocol Transition
We have to bear in mind that Protocol Transition is a feature enabled within the userAccountControl of a given service account that allows another service account to perform a S4U2Self and obtain a Forwardable Service Ticket to itself as any principal
Without PT, we will receive a non-forwardable service ticket when carrying out a S4U2Self, which cannot be submitted as additional-ticket during the subsequent S4U2Proxy, as the latter process requires a forwardable ticket
However, we can leverage RBCD to obtain a forwardable service ticket to the target service account as any domain principal. Then we can submit the latter as additional-ticket during a S4U2Proxy to obtain a valid service ticket for the provided SPN, which is the one we added on the msDS-AllowedToDelegateTo attribute previously
So, we must enable RBCD on the service account for which we have enabled KCD
To do so, we must have either at least WriteProperty / GenericWrite / GenericAll over its msDS-AllowedToActOnBehalfOfOtherIdentity attribute or the credentials of the given service account, as “any service account can edit its own RBCD attribute”
So, to sum up, in order to enable KCD w/o PT on a given domain service account, we must have seEnableDelegationPrivilege enabled and, at least, WriteProperty over both msDS-AllowedToDelegateTo and msDS-AllowedToActOnBehalfOfOtherIdentiy attributes
The latter can be replaced with “Having valid credential for the service account with KCD enabled” ( As stated )