Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is a Shadow Credentials Attack?

A shadow credentials attack adds an attacker-controlled public key to an Active Directory account, creating a second, certificate-based way to authenticate as that account indefinitely.

Illustration for the cybersecurity term Shadow Credentials Attack
Home / Blog / Cybersecurity Terms / What Is a Shadow Credentials Attack?
17 November 2026

What Is a Shadow Credentials Attack?

What Is a Shadow Credentials Attack?

A shadow credentials attack writes an attacker-controlled key pair into the msDS-KeyCredentialLink attribute of an Active Directory user or computer object. That attribute exists to support Windows Hello for Business, which lets a user authenticate with a device-bound key instead of a password. Adding an entry to it therefore does not change the account’s password or lock anyone out—it simply gives the account a second valid way to authenticate, one that the attacker controls.

Elad Shamir described the technique in 2021 in “Shadow Credentials: Abusing Key Trust Account Mapping for Account Takeover”, and it has largely displaced resource-based constrained delegation as the preferred follow-up to write access on an object.

How It Works

Key Trust authentication relies on Kerberos PKINIT, the extension that allows a certificate to be presented for initial authentication instead of a password-derived key. When a client authenticates this way, the domain controller checks the presented public key against the msDS-KeyCredentialLink values on the account and, if it matches, issues a ticket-granting ticket.

The attack sequence is short:

  1. The attacker generates a certificate and key pair of their own.
  2. Using write access to the target object—GenericWrite, GenericAll, WriteProperty on that attribute, or membership of Key Admins—they append a key credential structure containing their public key.
  3. They authenticate with PKINIT using the matching private key and receive a TGT for the target account.
  4. They optionally request the account’s NT hash through a user-to-user Kerberos exchange, which gives them a password-equivalent credential as well.

Whisker, pywhisker, Certipy’s shadow auto command, and the --shadow-credentials option in Impacket’s ntlmrelayx all automate this. The relay option matters: a coerced authentication relayed to LDAP is enough to write the attribute, with no prior access to the target at all.

Why Attackers Prefer It

Compared with the delegation route, shadow credentials is quieter and has fewer prerequisites. It does not require creating a computer account, so MachineAccountQuota being set to zero is no obstacle. It does not require the target to have a service principal name. And it does not alter the account’s password, so the legitimate user continues working and nothing prompts an investigation.

It is also durable. The added key remains valid until somebody notices and removes it. An account whose password is reset on a schedule is unaffected, because the certificate path does not involve the password at all—which makes this a persistence mechanism as much as an escalation one.

What It Requires

The environment must support PKINIT, which in practice means a domain controller holding a certificate suitable for the Kerberos Authentication or Domain Controller Authentication template—typically because Active Directory Certificate Services is deployed. Domain functional level 2016 or higher is needed for the key trust mapping. Many organisations meet both conditions without having deliberately enabled anything, because AD CS was installed years ago for another purpose.

Detecting and Preventing It

If you are not using Windows Hello for Business at all, any value in that attribute anywhere in the domain is an anomaly, which makes the review trivial and the detection even stronger.

Our internal Penetration Test Services test this path alongside the broader Active Directory Certificate Services configuration, because the two share the same underlying dependency and the same remediation owners.

FAQ – Frequently Asked Questions

Does a Shadow Credential Change the Account’s Password?

No, and that is a large part of why it is effective. The attacker adds an alternative certificate-based authentication path while the existing password continues to work normally. The legitimate user notices nothing, no lockout occurs, and routine password rotation does not remove the attacker’s access, because the certificate route never involves the password.

What Permissions Does an Attacker Need?

Write access to the msDS-KeyCredentialLink attribute on the target object. In practice this means GenericWrite, GenericAll, WriteProperty on that attribute, or membership of Key Admins or Enterprise Key Admins. Such permissions are frequently held by help desk groups, deployment accounts, and inherited organisational unit grants that nobody reviewed, which is why the attack surfaces so often in testing.

Are We Vulnerable If We Do Not Use Windows Hello for Business?

Possibly, because the requirement is that the domain supports PKINIT rather than that you have deployed Windows Hello. If a domain controller holds a suitable authentication certificate, usually because Active Directory Certificate Services is installed, key trust mapping will work. The upside is that any populated msDS-KeyCredentialLink value is then unambiguously suspicious and trivial to alert on.

How Do We Remove a Shadow Credential?

Clear the attacker’s entry from the account’s msDS-KeyCredentialLink attribute, then treat the account as compromised: reset its password, and for a computer account reset the machine account so existing tickets are invalidated. Investigate how the write permission was obtained, because the underlying excessive privilege will otherwise allow the same thing to be done again.

Related Terms

You May Be Interested In These

What Is the Volatility Framework?

Cybersecurity Terms

17 November 2026

What Is the Volatility Framework?

Read More
What Is Access Card Cloning?

Cybersecurity Terms

17 November 2026

What Is Access Card Cloning?

Read More
What Is Socat?

Cybersecurity Terms

17 November 2026

What Is Socat?

Read More