Skip to content

Add Shadow credentials module ! - #936

Closed
qu35t-code wants to merge 8 commits into
Pennyw0rth:mainfrom
qu35t-code:shadow_creds
Closed

qu35t-code wants to merge 8 commits into
Pennyw0rth:mainfrom
qu35t-code:shadow_creds

Conversation

@qu35t-code

Copy link
Copy Markdown

Description

This PR introduces the shadow-creds module, which leverages modification of the LDAP attribute msDS-CredentialLink on a target user in order to retrieve its authentication PFX certificate.
The module is based on pywhisker by ShutdownRepo (Aka Charlie le king) and comes with options for customizing the PFX password and output directory.

Options

6

Common errors (examples)

  • TARGET is required
2
  • No permissions to modify msDS-KeyCredentialLink on the target (INSUFF_ACCESS_RIGHTS)
1
  • Invalid account in LDAP
5

Valid examples

  • With valid permissions
3
  • Authentication with exported PFX works
4
  • NT_HASH authentication supported
10
  • Custom PFX password
7 8
  • Custom Outdir
9

Type of change

Insert an "x" inside the brackets for relevant items (do not delete options)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Deprecation of feature or functionality
  • This change requires a documentation update
  • This requires a new third party (pywhisker)

Setup guide for the review

  • MacOS
  • Linux

Checklist:

Insert an "x" inside the brackets for completed and relevant items (do not delete options)

  • I have ran Ruff against my changes (via poetry: poetry run python -m ruff check . --preview, use --fix to automatically fix what it can)
  • I have added or updated the tests/e2e_commands.txt file if necessary (new modules or features are required to be added to the e2e tests)
  • New and existing e2e tests pass locally with my changes
  • If reliant on changes of third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (WIP...)

@NeffIsBack

Copy link
Copy Markdown
Member

Thanks for the PR! Looks cool.

@qu35t-code

Copy link
Copy Markdown
Author

Hello, any updates ?

@NeffIsBack

Copy link
Copy Markdown
Member

Hi, i think the best is we wait for fortra/impacket#2097 to be merged and implement the cryptography in the module itself and then use impackets ldap for modification of the attribute

@azoxlpf

azoxlpf commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Hi @qu35t-code, the PR mentioned just above has just been merged so we can now use it in the module without having to import new libraries

@NeffIsBack

Copy link
Copy Markdown
Member

@qu35t-code any updates on this?

@NeffIsBack NeffIsBack added this to the v1.6.0 milestone Mar 22, 2026
@NeffIsBack NeffIsBack mentioned this pull request May 7, 2026
9 of 14 tasks
@qu35t-code qu35t-code closed this by deleting the head repository Jun 29, 2026
@NeffIsBack

Copy link
Copy Markdown
Member

@qu35t-code any reason for the close? Done by accident?

@NeffIsBack NeffIsBack removed this from the v1.6.0 milestone Jul 11, 2026
@SoftAndoWetto

Copy link
Copy Markdown
Contributor

Wait does this mean we're not getting a shadow credentials module? :(

@NeffIsBack

Copy link
Copy Markdown
Member

Wait does this mean we're not getting a shadow credentials module? :(

We will, I am on it :)

@SoftAndoWetto

Copy link
Copy Markdown
Contributor

Will it still use pywhisker, or will it be implemented "raw"? I know pywhisker uses ldap3

@NeffIsBack

Copy link
Copy Markdown
Member

Will it still use pywhisker, or will it be implemented "raw"? I know pywhisker uses ldap3

I'll probably just implement the crypto manually.

@SoftAndoWetto

Copy link
Copy Markdown
Contributor

I'll probably just implement the crypto manually.

Awesome, I look forward to seeing it and thank you :)

@NeffIsBack NeffIsBack mentioned this pull request Aug 16, 2026
1 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants