Add --history option for NTDS
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):
- [x] I have ran Ruff against my changes (via poetry:
poetry run python -m ruff check . --preview, use--fixto 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)
Thanks for the PR!
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:
Other than the [HISTORY] thing and the white spaces, looks good to me:
Thank you I will update the code asap
Thank you very much,
Looks good to me :)