Security Cipher
Home Blog About Us
Resources β–Ό
πŸ—ΊοΈ Penetration Testing Roadmap 🌐 Web Application Security Checklist πŸ€– OWASP Top 10 for LLM Applications 🧠 LLM AI Security Checklist πŸ› οΈ Security Tools 🎯 Penetration Testing Tricks πŸ“„ Secure Code Explain πŸ“– Vulnerability Explain ☁️ AWS Cloud Security Checklist
My Resume
Contact UsContact
← Security Tools View on GitHub

Whisker

C# tool to take over AD accounts by abusing msDS-KeyCredentialLink (shadow credentials).

Whisker

Whisker is a C# tool for taking over Active Directory user and computer accounts by manipulating their msDS-KeyCredentialLink attribute, effectively adding "Shadow Credentials" to the target account.

This tool is based on code from DSInternals by Michael Grafnetter (@MGrafnetter).

For this attack to succeed, the environment must have a Domain Controller running at least Windows Server 2016, and the Domain Controller must have a server authentication certificate to allow for PKINIT Kerberos authentication.

More details are available at the post Shadow Credentials: Abusing Key Trust Account Mapping for Takeover.

Usage

Add a new value to the msDS-KeyCredentialLink attribute of a target object:

  • /target:<samAccountName>: Required. Set the target name. Computer objects should end with a '$' sign.

  • /domain:<FQDN>: Optional. Set the target Fully Qualified Domain Name (FQDN). If not provided, will try to resolve the FQDN of the current user.

  • /dc:<IP/HOSTNAME>: Optional. Set the target Domain Controller (DC). If not provided, will try to target the Primary Domain Controller (PDC).

  • /path:<PATH>: Optional. Set the path to store the generated self-signed certificate for authentication. If not provided, the certificate will be printed as a Base64 blob.

  • /password:<PASWORD>: Optional. Set the password for the stored self-signed certificate. If not provided, a random password will be generated.

Example: Whisker.exe add /target:computername$ /domain:constoso.local /dc:dc1.contoso.local /path:C:\path\to\file.pfx /password:P@ssword1

Remove a value from the msDS-KeyCredentialLink attribute of a target object:

  • /target:<samAccountName>: Required. Set the target name. Computer objects should end with a '$' sign.

  • /deviceID:<GUID>: Required. Set the DeviceID of the value to remove from the attribute msDS-KeyCredentialLink of the target object. Must be a valid GUID.

  • /domain:<FQDN>: Optional. Set the target Fully Qualified Domain Name (FQDN). If not provided, will try to resolve the FQDN of the current user.

  • /dc:<IP/HOSTNAME>: Optional. Set the target Domain Controller (DC). If not provided, will try to target the Primary Domain Controller (PDC).

Example: Whisker.exe remove /target:computername$ /domain:constoso.local /dc:dc1.contoso.local /deviceid:2de4643a-2e0b-438f-a99d-5cb058b3254b

Clear all the values of the the msDS-KeyCredentialLink attribute of a target object:

  • /target:<samAccountName>: Required. Set the target name. Computer objects should end with a '$' sign.

  • /domain:<FQDN>: Optional. Set the target Fully Qualified Domain Name (FQDN). If not provided, will try to resolve the FQDN of the current user.

  • /dc:<IP/HOSTNAME>: Optional. Set the target Domain Controller (DC). If not provided, will try to target the Primary Domain Controller (PDC).

Example: Whisker.exe clear /target:computername$ /domain:constoso.local /dc:dc1.contoso.local

⚠️ Warning: Clearing the msDS-KeyCredentialLink attribute of accounts configured for passwordless authentication will cause disruptions.

List all the values of the the msDS-KeyCredentialLink attribute of a target object:

  • /target:<samAccountName>: Required. Set the target name. Computer objects should end with a '$' sign.

  • /domain:<FQDN>: Optional. Set the target Fully Qualified Domain Name (FQDN). If not provided, will try to resolve the FQDN of the current user.

  • /dc:<IP/HOSTNAME>: Optional. Set the target Domain Controller (DC). If not provided, will try to target the Primary Domain Controller (PDC).

Example: Whisker.exe list /target:computername$ /domain:constoso.local /dc:dc1.contoso.local

References

  • https://github.com/MichaelGrafnetter/DSInternals
  • https://posts.specterops.io/shadow-credentials-abusing-key-trust-account-mapping-for-takeover-8ee1a53566ab
Press Escape to close the search panel.

Donate

Buy me a Coffee

Penetration Testing Services - Fiverr

Buy me a Coffee

Penetration Testing Services

penetration Testing Services

Web Application Security Quiz

Web Application Security Quiz

Daily Bug Bounty Writeups - Twitter

Daily Bug Bounty Writeups

Download our Latest Android Application

Guide for Penetration Testing

Daily Bug Bounty Writeups - Telegram

Daily Bug Bounty Writeups

Author

Piyush
Senior Product Security Engineer

Ethical Hacker || Penetration Tester || Gamer || Blogger || Application Security Engineer

READ ARTICLE

Donate

Buy me a Coffee

Recent Posts

  • Software Supply Chain Security in 2026: Packages, Pipelines, and Provenance
    Software Supply Chain Security in 2026: Packages, Pipelines, and Provenance
    August 10, 2026/
    0 Comments
  • I Ran Codex Security on a Shop API Lab: 14 Bugs, $1.64, Full Playbook
    I Ran Codex Security on a Shop API Lab: 14 Bugs, $1.64, Full Playbook
    August 3, 2026/
    0 Comments
  • How I Would Hack Your Startup in 24 Hours (Real-World Pentest Guide)
    How I Would Hack Your Startup in 24 Hours (Real-World Pentest Guide)
    July 27, 2026/
    0 Comments

Follow Us

SecurityCipher

Practical security guides, vulnerability deep-dives, and hands-on resources for bug bounty hunters and penetration testers.

Useful Links

  • Start Here
  • Cybersecurity Jobs
  • CVE Lookup
  • Bug Bounty Programs
  • Security Conferences
  • Payload Cheatsheets
  • Interview Prep
  • Report Templates
  • Blogs
  • About
  • Contact
  • RSS Feed

Recent Post

  • Software Supply Chain Security in 2026: Packages, Pipelines, and Provenance
  • I Ran Codex Security on a Shop API Lab: 14 Bugs, $1.64, Full Playbook
  • How I Would Hack Your Startup in 24 Hours (Real-World Pentest Guide)
Β© 2026 SecurityCipher. All rights reserved. Privacy Policies Β· Terms & Conditions