Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secretsdump.py: Dumping credentials without touching disk #1698

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antuache
Copy link

@antuache antuache commented Feb 9, 2024

This PR allows to remotely extract hashes from the SAM and SECURITY (LSA Secrets and cached credentials) registry hives without touching disk. There is no need to save these registry hives to disk and parse them locally.

This feature takes advantage of the WriteDACL privileges held by local administrators to provide temporary read permissions on registry hives. This work was already implemented by @jfjallid on the great tool https://github.com/jfjallid/go-secdump.

In order to use this technique, it is required to use the -inline flag. If a connection error occurs and the extraction is interrupted, the -restore flag can be used to restore the initial state of the registry.

secretsdump_inline

Also, the -use-ntds flag has been added as I noticed it was trying to launch the NTDS extraction every time the script was launched.

@edermi
Copy link

edermi commented Feb 11, 2024

Depending on the permissions to access the remote registry, you could also try to access the data with Backup privileges. I'm working on something similar and this avoids changing permissions on these objects.

@byinarie
Copy link

@antuache
Please consider submitting this PR to theporgs fork here as well https://github.com/ThePorgs/impacket

This repo doesn't get the care it deserves while theporgs is very much maintained with bug fixes and PRs

@AkechiShiro
Copy link

AkechiShiro commented Feb 18, 2024

@byinarie is the fortra/impacket repo unmaintained compared to theprogs fork?
There is like ~300 commits vs ~50 "new" commits in fortra/impacket.

EDIT : I've read the description of theprogs fork and better understand its purpose.

@sagiol
Copy link

sagiol commented Apr 17, 2024

@antuache
Got the following error:
Modifying ACLs failed: 'RemoteOperations' object has no attribute 'prepareDumpInline'

@anadrianmanrique anadrianmanrique self-assigned this Apr 26, 2024
@anadrianmanrique anadrianmanrique added the medium Medium priority item label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Medium priority item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants