Added Shadow Credentials Module#1234
Conversation
|
I also have a module for performing Unpac-The-Hash off of this that I am looking at add after this and am looking to create an additional third module replicating the ShadowSpray tool (Link: https://github.com/Dec0ne/ShadowSpray/) but am unsure if this is something you would want in NetExec |
|
Thanks for the PR, but unfortunately this is duplicate to #936 |
Definitely looks interesting, although I would need to take a closer look at that to be able to properly say something about it. At the end, isn't at least ShadowSpray covered when we have a ShadowCredentials module? |
ShadowSpray works by taking 1 input account and recursively adding shadow credentials to all possible accounts and authenticating with those discovered accounts and continuing the spray |
Apologies I didn't see this module in the latest version and didn't know it had been made. Also if needed aspects of my code can be added to the module that will come in the update as well that's completely fine |
No worries :) I think we just add the module and then we can see if we can do any useful additions from your code (e.g. supplying a list of users that we can add the keys). Regarding Unpac-the-hash, there is already pfx auth that pretty much does this, so I don't think there is much added value if we add a second module. |
Description
Adds a new LDAP module
shadow-credsthat automates the Shadow Credentials attack against Active Directory targets.The module writes a key credential to the target account's
msDS-KeyCredentialLinkattribute via LDAP, then exports a PFX certificate for use withcertipy-adto perform PKINIT authentication and retrieve an NT hash.Key features:
LDAPConnection.__init__to drop the unsupportedsigningkwarg present in newer buildsDependencies:
pywhisker(pip:pywhisker)impacketAI assistance: Initial module structure and logger adapter were drafted with assistance from Claude (Anthropic). All logic was reviewed, tested, and modified manually..
Type of change
pywhiskerSetup guide for the review
Local environment:
pipx/ dev cloneTarget:
enclave.localDependencies to install:
To test the full module:
Note: The attacking account requires
GenericWriteorGenericAllover the target, or explicit write access tomsDS-KeyCredentialLink. The DC must support PKINIT (i.e. have a CA or support Windows Hello for Business key trust).Screenshots
Success:


Output:
Fail:



Invalid Permissions:
Invalid Name:
Checklist
poetry run ruff check .)tests/e2e_commands.txtfile if necessary