githubEdit

Shadow Credentials

Tools: Whisker https://github.com/eladshamir/Whisker , pyWhisker https://github.com/ShutdownRepo/pywhisker , ShadowSpray https://github.com/Dec0ne/ShadowSpray/

Requirements

1) Domain Controller on (at least) Windows Server 2016

2) Domain must have Active Directory Certificate Services and Certificate Authority configured

3) PKINIT Kerberos authentication

Exploitation

Windows

2) # Generates a public-private key pair and adds a new key credential to the target object.

Linux

Scenarios:

Scenario 1: Shadow Credential relaying

1) Trigger an NTLM authentication from DC01 (PetitPotam)

2) Relay it to DC02 (ntlmrelayx)

3) Edit DC01 's attribute to create a Kerberos PKINIT pre-authentication backdoor (pywhisker)

Alternatively :

Trigger a callback via browser with the account having the proper rights as mentioned above by using their credentials

After a few minutes, we receive an HTTP connection from the DC$ computer account along with its NTLM credentials. These credentials are then relayed to the LDAP service on the domain controller and the msDS-KeyCredentialLink attribute of the relayed computer account is updated.

Use the certificate to dump NTDS

Scenario 2: Workstation Takeover with RBCD

Only for C2: Add Reverse Port Forward from 8081 to Team Server 81

1) Set up ntlmrelayx to relay authentication from target workstation to DC

2) Execute printer bug to trigger authentication from target workstation

3) Get a TGT using the newly acquired certificate via PKINIT

4) Get a ST (service ticket) for the target account

5) Utilize the ST for future activity

Last updated