You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refactor the --database argument to comply with security checks - #1259
This PR modifies the --database option to comply with security checks such as checking if the self.conn.lastError value is set by tds.py at some point.
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
Screenshots (if appropriate):
Nothing changed:
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
One day we should probably either do some stub function that does the error handling (similar to .search() in ldap) or implement exception raising/handling in tds.
One day we should probably either do some stub function that does the error handling (similar to .search() in ldap) or implement exception raising/handling in tds.
We already do, if any error occurs, the self.conn.lastError value is filled. We simply have to check that value every query
Nice one, thanks for the PR!
One day we should probably either do some stub function that does the error handling (similar to .search() in ldap) or implement exception raising/handling in tds.
We already do, if any error occurs, the self.conn.lastError value is filled. We simply have to check that value every query
Yeah but I meant that we substitute the normal query and do this if lastError exists... automatically in NetExec's own query function, so we don't have to do this check in all places.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR modifies the --database option to comply with security checks such as checking if the self.conn.lastError value is set by tds.py at some point.
Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
Screenshots (if appropriate):
Nothing changed:
Checklist:
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
poetry run ruff check ., use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)