Active Directory · Learn

What are shadow credentials?

An attacker with write access to a target account can add their own certificate key to it, then log in as that account with Kerberos and recover its password hash, no password reset needed.

Active Directory · LearnAll services Download PDF
TL;DR

A Shadow Credentials attack abuses the msDS-KeyCredentialLink attribute, which stores public keys for certificate-based (PKINIT) authentication. An attacker who can write that attribute on a target account adds their own key, authenticates as the account via Kerberos PKINIT, and recovers its NT hash, a stealthy account takeover that needs no password reset. It requires the domain to support Key Trust (PKINIT, typically via AD CS). Defend by auditing write access to msDS-KeyCredentialLink and monitoring changes to it.

By John Dill, Red Team Lead, SecureLayer7Updated

What shadow credentials are

Windows lets an account authenticate with a certificate instead of a password, and the trusted public keys live in the account's msDS-KeyCredentialLink attribute. If an attacker can write that attribute, they can register a key they control and then log in as the account, without touching its password. The attribute is rarely watched, which makes the technique quiet.

How the attack works

With write access to a target's msDS-KeyCredentialLink (often via GenericWrite or a delegation), the attacker adds a key with Whisker add /target:victim$, then requests a TGT via PKINIT with Rubeus asktgt /certificate:... /getcredentials, which returns the account's NT hash. From there they impersonate the account. It relies on the domain supporting PKINIT (Key Trust via AD CS). Payloads are shown for defensive testing.

How to defend against it

Audit which principals can write msDS-KeyCredentialLink on your accounts, especially tier-0, and remove unnecessary write access. Monitor changes to the attribute and alert on additions, and keep AD CS locked down since the attack depends on certificate authentication. Removing an unexpected key credential evicts the attacker.

References

  1. [1]MITRE ATT&CK Enterprise Matrix(MITRE ATT&CK)
  2. [2]Microsoft: Key Trust authentication (Windows Hello for Business)(Microsoft)
Related terms

A single writable attribute can hand an attacker any account you have. Talk to a security expert about testing your key-credential exposure.

Related service
Red Team Assessment
Goal-based adversary emulation across your people, apps, and network, the full path an attacker would take.
Red team assessment

FAQ

Shadow credentials, asked often

Scope an engagement

Test your Active Directory before an attacker does.

Our red team maps the real path from a foothold to domain dominance, and ships findings with reproducible attacks and fixes your team can implement.