-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Adding regsecrets and dpapidump #1898
Adding regsecrets and dpapidump #1898
Conversation
We could easily integrate this to nxc @NeffIsBack !!! Nice work @laxaa 💪 |
Looks really nice! |
Just tested againt top tier EDR, works like a charm. Great job bro! |
Hi @laxaa, thank for the great new features you add in this PR. |
dpapidump.py offers an alternative and stealthy way to perform a specific task. While dploot implements a similar functionality - amongst other things - and may or may not be adapted in the future to implement the stealthier registry dump technique, it performs actions in its own way, with differences that could be relevant for pentesters / red teamers (e.g. retrieving all master keys vs only the one needed to decrypt a specific credential). As for the reason #1137 was never merged, given it predates dploot by over a year (and its SCCM feature by 3), this has probably less to do with that - at least initially - and supposedly more with the lack of people/time to manage incoming requests at the time and/or a lack of perceived interest in the features - which maybe I could have done a better job explaining at the time. Anyway, having an example/reference implementation of the technique - for projects that want to implement it - that's also useful as a standalone tool seems like a good thing IMHO, even when trying to ignore my obvious bias :) |
Hello, I am using my primary account to answer, I don't have any specific thoughts about |
@clavoillotte thanks for the feedback! |
e8f4372
to
9c98503
Compare
I have split made |
merging regsecrets.py, thanks! |
Thanks @anadrianmanrique ! PR open on NXC Pennyw0rth/NetExec#599 |
Hello there, this PR includes two different scripts.
regsecrets.py
:This script is a modification of
secretsdump.py
that uses a different technique to extract registry secrets (the logic regarding DCSync operations has been removed). It does not write files on the disk and does not performreg save
like operations. This allow recovering the SAM database and the LSA secrets while being less prone to detection by security product.All required keys are accessed using registry queries. To access keys within the SAM and SECURITY hives, the
dwOption
ofBaseRegOpenKey
allows passing theREG_OPTION_BACKUP_RESTORE
value to disable any ACL checks performed, thus, allowing to access these registry keys normally restricted to the SYSTEM user.One may wonder why not integrating these changes in the original
secretsdump.py
. From my point view, the original script already integrates a high number of cases and I was afraid of making its logic even more bloated than its currently is, making testing of every case very complicated and increasing the risk of bugs. However, if the maintaining team thinks it's better to integrate this new extraction logic into the original script, I could give it a go.dpapidump.py
:Now in #1917