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
Contributor

@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'

@zblurx
Copy link
Contributor

zblurx commented Aug 2, 2024

Hey, can I help on anything with this PR ? I really need this to be merge for https://github.com/Pennyw0rth/NetExec and https://github.com/login-securite/DonPAPI :)

@anadrianmanrique
Copy link
Contributor

I'll be working on this. In the meanwhile PR needs to get conflicts resolved @antuache

@anadrianmanrique
Copy link
Contributor

anadrianmanrique commented Aug 14, 2024

Ok I'll create a separte PR with these changes. Conflicts should be related to #1719. This will be merged in the context 0.13-dev

@anadrianmanrique anadrianmanrique added the waiting for response Further information is needed from people who opened the issue or pull request label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Medium priority item waiting for response Further information is needed from people who opened the issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants