impacket
impacket copied to clipboard
secretsdump.py: Dumping credentials without touching disk
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.
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.
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.
@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
@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.
@antuache Got the following error: Modifying ACLs failed: 'RemoteOperations' object has no attribute 'prepareDumpInline'
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 :)
I'll be working on this. In the meanwhile PR needs to get conflicts resolved @antuache
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