fix: update shadow credential detection to exclude forcechangepassword rights#332
Merged
Merged
Conversation
…ection **Changed:** - Updated documentation and logic to clarify that `forcechangepassword` and its ACL-prefixed form are not valid for shadow credential abuse, as they only grant password reset, not property writes for msDS-KeyCredentialLink - Modified `is_shadow_cred_candidate` to remove checks for `forcechangepassword` and `acl_forcechangepassword` - Updated tests to remove assertions for `forcechangepassword` and add negative tests confirming it is not accepted as a shadow credential candidate
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #332 +/- ##
==========================================
- Coverage 80.03% 80.03% -0.01%
==========================================
Files 433 433
Lines 125578 125577 -1
==========================================
- Hits 100502 100501 -1
Misses 25076 25076
🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Key Changes:
Changed:
forcechangepasswordandacl_forcechangepasswordto prevent false positives, reflecting that thisright only allows password reset, not the required property write
to password reset abuse, not shadow credential abuse
considered valid shadow credential candidates, and expanded with relevant
negative cases
Removed:
forcechangepasswordandacl_forcechangepasswordfrom the setof shadow credential candidate types in logic and tests