NetExec icon indicating copy to clipboard operation
NetExec copied to clipboard

Add --history option for NTDS

Open KriyosArcane opened this issue 6 months ago • 5 comments

Description

This new option also makes netexec output NTDS history to help cracking passwords. Idea from https://github.com/Pennyw0rth/NetExec/discussions/758

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update
  • [ ] This requires a third party update (such as Impacket, Dploot, lsassy, etc)

Screenshots (if appropriate):

250624_07h27m31s_screenshot

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

KriyosArcane avatar Jun 25 '25 20:06 KriyosArcane

Thanks for the PR!

NeffIsBack avatar Jul 03 '25 15:07 NeffIsBack

Hey man! First, thanks for the PR. That is something I thought was missing as well. That said, I'd not print the [HISTORY] block as it breaks the NT hash format when using hashcat and we already know that these password are history because of the USERNAME_history marker.

Also ruff tells me that there are too much spaces there:

image

Dfte avatar Jul 07 '25 09:07 Dfte

Other than the [HISTORY] thing and the white spaces, looks good to me:

image

Dfte avatar Jul 07 '25 09:07 Dfte

Thank you I will update the code asap

KriyosArcane avatar Jul 07 '25 09:07 KriyosArcane

Thank you very much,

image

Looks good to me :)

Dfte avatar Jul 07 '25 09:07 Dfte