Skip to content

Comments

SAM History Dumping#1110

Open
Coontzy1 wants to merge 1 commit intoPennyw0rth:mainfrom
Coontzy1:main
Open

SAM History Dumping#1110
Coontzy1 wants to merge 1 commit intoPennyw0rth:mainfrom
Coontzy1:main

Conversation

@Coontzy1
Copy link

Description

Modified --history parameter for SMB to extract password history hashes for SAM in addition to NTDS.

This has minor modifications to the SAM dumping path. Then, modified the logging of hashes into the database if _history is found in the hash name to show accurate count of hashes.

The --history argument was then removed from being exclusive to --ntds as it is needed for --sam.

relevant PRs: fortra/impacket#2059

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 third party update (such as Impacket, Dploot, lsassy, etc)

Setup guide for the review

Change the passwords of one (1) or more local users at with default Windows settings to have stored password history hashes.
Then, proceed to target the system with --sam --history

Screenshots (if appropriate):

Default Behavior (pre-PR)
Default_behvaior
Updated Behavior (With-PR and --history)
Updated_tool
Related NTDS argument still working as expected
NTDS_Still_Working

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
    New e2e tests pass. Various other ones don't, but they should not be affected by my PR.
e2e_tests
  • 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 (PR here: https://github.com/Pennyw0rth/NetExec-Wiki)

smb: update proto args

tests: add --sam --history example
@NeffIsBack
Copy link
Member

Thanks for the PR! I'll look into it soon.

@NeffIsBack NeffIsBack added the enhancement New feature or request label Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants