CredSSP / TSPKG
Last updated
Last updated
Credential Delegation is a feature that allows domain administartors to authorize certain machines or to be more precise - certain SPNs, to accept delegated passwords. In other words, this means that certain services on certain machines can be set to allow users to authenticate without the need to supply their credentials interactively - almost like a Single Sign On.
Additionally, we can use Parse-Polfile to parse the registry.pol of the linked GPO. First of, let's find the GPO that is being applied to the user spotless:
and then parse the policy file:
If credential delegation is set up, credentials can be dumped without touching lsass with a tool called kekeo.
Let's spin up a tsssp named pipe server where targets of whom the credentials we want to steal, will connect to, on the compromised pc1 (running as SYSTEM):
Kekeo on pc1 must be running as NT\SYSTEM for this to work
Now, let's connect to the tsssp server on pc1 from the target computer pc2 (we want currently logged on user's from pc2 credentials to be stolen by being sent to the tsssp server on pc1 over the named pipe):
Once on the box, we can check if credential delegation is turned on:
We can then check what SPNs accept delegated credentials.
Below shows that the box we have access to is allowed to delegate credentials to all termsrv SPNs - all RDP services:
For the technique to work with NTLM credentials, below needs to be enabled in AD in Computer Configuration > Policies > Administrative Templates > System > Credential Delegation.
the NTLM delegated credential dumping attack can be performed locally on the target system - we only need two kekeo instances running as low privileged users, unlike with kerberos credential dumping where the tsssp server had to be running as SYSTEM.
And connect to it from another console as the same user:
If you have admin rights on the compromised box, you can enable all credential delegation like so: