Aller au contenu
Skillpedia
Rédaction35k · #7592

abusing-shadow-credentials-for-privesc

Ce qu’il fait

Cet outil permet à un attaquant de prendre complètement le contrôle d'un compte Active Directory. Pour cela, il ajoute une fausse clé publique au compte, ce qui lui permet d'usurper l'identité de la victime sans avoir besoin du mot de passe.

Quand l’utiliser

  • ✓Lorsque les outils de cartographie du réseau montrent que vous pouvez modifier les informations d'un compte.
  • ✓Pour prendre le contrôle d'un compte discrètement, sans déclencher d'alertes de changement de mot de passe.
  • ✓Pour accéder à des comptes d'ordinateurs et les utiliser pour atteindre d'autres ressources.

Lien du skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/abusing-shadow-credentials-for-privesc/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/abusing-shadow-credentials-for-privesc/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Comment puis-je prendre le contrôle du compte 'user1' sans que personne ne s'en aperçoive ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil exploite un paramètre de sécurité appelé 'Shadow Credentials'. Il ajoute une fausse clé d'accès au compte visé. Avec cette clé, l'attaquant peut s'authentifier en tant que la victime et obtenir son mot de passe chiffré.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Abusing Shadow Credentials for Privilege Escalation

Legal Notice: This skill is for authorized security testing and educational purposes only. Shadow Credentials grant full takeover of the targeted account. Use only against systems you own or are explicitly authorized in writing to test. Unauthorized access is a crime.

Overview

The Shadow Credentials technique abuses the msDS-KeyCredentialLink attribute of Active Directory user and computer objects. This attribute stores raw public keys ("Key Credentials") used by Windows Hello for Business and Azure AD device registration for passwordless certificate-based logon via PKINIT (Public Key Cryptography for Initial Authentication in Kerberos). If an attacker has write permission over a target object's msDS-KeyCredentialLink — typically granted by GenericWrite, GenericAll, WriteProperty, or AddKeyCredentialLink ACEs surfaced in BloodHound — they can append their own attacker-generated public key. They then request a TGT for the target via PKINIT using the matching private key and recover the target's NT hash, achieving complete account takeover without resetting the password, which is far stealthier than a forced password reset.

The technique was published by Elad Shamir ("Shadow Credentials: Abusing Key Trust Account Mapping for Account Takeover") and implemented in the C# tool Whisker. The Python equivalent pyWhisker (ShutdownRepo) manipulates the attribute over LDAP, and Certipy integrates the entire chain via certipy shadow auto. The target environment must support PKINIT and have at least one Domain Controller running Windows Server 2016 or later. Sources: pyWhisker, Whisker, The Hacker Recipes — Shadow Credentials.

When to Use

  • When BloodHound reveals GenericWrite/GenericAll/AddKeyCredentialLink over a higher-value user or computer
  • As a stealthier alternative to ForceChangePassword (no password reset = less disruption/alerting)
  • To take over a computer account to chain into Resource-Based Constrained Delegation (RBCD)
  • During red-team operations needing account takeover without locking out the legitimate user
  • For purple-team exercises generating msDS-KeyCredentialLink modification telemetry

Prerequisites

  • Authorized engagement scope including AD credential-access techniques
  • Control of a principal with write access to the target's msDS-KeyCredentialLink
  • A DC running Windows Server 2016+ with PKINIT enabled (domain functional level supporting Key Trust)
  • Network reachability to LDAP (389/636) and Kerberos (88) on a DC
  • Linux attack host with Python 3.8+; install the tooling:
    # pyWhisker (from source)
    git clone https://github.com/ShutdownRepo/pywhisker
    cd pywhisker && pip install .
    # Certipy (integrated shadow attack)
    pipx install certipy-ad
    # PKINITtools for manual TGT/NT-hash extraction
    git clone https://github.com/dirkjanm/PKINITtools
    

Objectives

  • Confirm write access over a target's msDS-KeyCredentialLink
  • Generate a key pair and append a Key Credential to the target object
  • Request a TGT for the target via PKINIT using the new key
  • Recover the target's NT hash for pass-the-hash / further movement
  • Clean up the injected Key Credential to restore the object's state
  • Document the ACL path that enabled the attack for remediation

MITRE ATT&CK Mapping

ID Technique Application in this skill
T1098.005 Account Manipulation: Device Registration Writing an attacker-controlled Key Credential (device key) to msDS-KeyCredentialLink to register an alternate authentication credential for the target account

Workflow

Step 1: Confirm the write primitive

List existing Key Credentials on the target to verify you have the required access. An empty or readable result confirms write access for the add step.

python3 pywhisker.py -d "corp.local" -u "attacker" -p "Passw0rd!" \
    --target "victim" --action "list"

Step 2: Add a Shadow Credential with pyWhisker

Generate a certificate/key pair and write it into the target's msDS-KeyCredentialLink. pyWhisker outputs a PFX you control.

python3 pywhisker.py -d "corp.local" -u "attacker" -p "Passw0rd!" \

…
Questions fréquentes

Est-ce légal ?

Non, sauf si vous avez une autorisation écrite explicite pour tester le système. Utiliser cet outil sur des systèmes non autorisés est un délit.

Ai-je besoin du mot de passe de la victime ?

Non, le but est justement de prendre le contrôle sans avoir besoin du mot de passe.

Qu'est-ce qu'Active Directory ?

C'est un système utilisé par de nombreuses entreprises pour gérer les ordinateurs et les utilisateurs de leur réseau.

Détails

Description originale de l’auteur

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target's NT hash without a password reset. Use when BloodHound shows GenericWrite/GenericAll/AddKeyCredentialLink over a target, as a stealthier alternative to ForceChangePassword, during autho

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularité

Étoiles GitHub
35k
Position au classement
#7592
Licence
Apache-2.0
Mis à jour
31/08/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires