-
Notifications
You must be signed in to change notification settings - Fork 147
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
BED-4887: AZResetPassword edge false positive on a role-assignable group. #1151
base: main
Are you sure you want to change the base?
Conversation
populates this map of bitmaps, which is then used in resetPasswordEndNodeBitmapForRole() to filter out users who have membership in a role assignmable group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than this missing error handling, this seems pretty sane to me. The loop doesn't appear to be a significant security concern on its face. If we ingested specterdev without noticing an impact, we're likely fine.
…g the following edges: azure.ResetPassword azure.GlobalAdmin azure.PrivilegedRoleAdmin azure.PrivilegedAuthAdmin azure.AddMembers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise this looks good, let's review the results of performance regression testing, but I'm approving to remove blockers once that's complete
Description
Before creating AZResetPassword from an AZRole to an AZUser, make sure the user is not a member of a role assignable group.
Motivation and Context
This PR addresses: https://specterops.atlassian.net/browse/BED-4887
How Has This Been Tested?
Ingest SpecterDev.
Run pathfinding between
PARTNER TIER1 SUPPORT@SPECTEROPS DEVELOPMENT
and[email protected]
You should get the following results (important part is that there is no AZPasswordReset edge directly between the two):

Prior to this fix, you would see the following:

This is not correct because [email protected] is a member of a role assignable group (ALL SPECTERDEV USERS@SPECTEROPS DEVELOPMENT)

Since it's a member of a role assignable group, only Global Administrator Role, Privileged Authentication Administrator Role, or Partner Tier2 Support Role can perform a reset password operation.
You can quickly disable my change by commenting out these lines I added in TenantRoleAssignments()

Types of changes
Checklist: