Skip to content

Add reg-query support for MSSQL#1256

Open
Dfte wants to merge 4 commits into
Pennyw0rth:mainfrom
Dfte:mssql_regquery
Open

Add reg-query support for MSSQL#1256
Dfte wants to merge 4 commits into
Pennyw0rth:mainfrom
Dfte:mssql_regquery

Conversation

@Dfte

@Dfte Dfte commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds support to the reg-query module for the MSSQL protocol. MSSQL allows reading, deleting and adding registry keys via multiple stored procedure. As such, and if you have admin privileges via the MSSQL server (means it is running as a local administrator), you can query, add and delete registry keys.

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

Spawn a MSSQL DB and run the commands above.

Screenshots (if appropriate):

  • SMB
image
  • MSSQL
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)

@NeffIsBack

Copy link
Copy Markdown
Member

Very nice!

@NeffIsBack NeffIsBack added the enhancement New feature or request label Jun 1, 2026
Comment thread nxc/modules/reg-query.py
Comment thread nxc/modules/reg-query.py
Comment thread nxc/modules/reg-query.py
Comment thread nxc/modules/reg-query.py
Comment thread nxc/modules/reg-query.py
Comment thread nxc/modules/reg-query.py
Comment thread nxc/modules/reg-query.py Outdated
Aurélien CHALOT added 2 commits June 2, 2026 10:58
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.

3 participants