Add a severity score to risky apps module#1999
Open
mitchelbaker-cisa wants to merge 17 commits intomainfrom
Open
Add a severity score to risky apps module#1999mitchelbaker-cisa wants to merge 17 commits intomainfrom
mitchelbaker-cisa wants to merge 17 commits intomainfrom
Conversation
21 tasks
2 tasks
…sky; resolve filtering issue
…All, IMAP.AccessAsUser.All, and POP.AccessAsUser.All
… onlinemeetings.read/readwrite, mailboxfolder.read/readwrite, and mailboxsettings.read/readwrite
…s in RiskyPermissions.json
… to entra id table
…rcentage-based severity score
5e8f93c to
5671f46
Compare
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.
🗣 Description
This PR adds a severity score to risky applications/service principals to more accurately determine their associated risk level during remediation efforts.
The severity score is based on the following parameters:
A new risk level property was added to each risky permission in the RiskyPermissions.json file, indicating the associated risk level of each permission. Both application/delegated permissions are given different weighted points based on their risk level:
Admin consented permissions have a max score of 50 points and non-admin consented permissions have a max score of 10 points as to not overly influence the other parameters comprising the final severity score. Other parameters like privileged roles and password/key/federated credentials also have max scores. Reference the
Get-SeverityWeightsfunction to see the full spread of weights/point totals for each parameter.The final severity score uses the same risk level descriptions, but is based on the following point totals:
The
SeverityScore,MaxScore,ScorePercentage,SeverityLevel, andScoreBreakdownproperties are added to each risky application/service principal object for analysis in the ScubaResults.json output. The severity score is also output in the Entra ID HTML report, with new improvements for sorting in ascending/descending order for each of the header rows.A couple other bugs were resolved and some additional risky delegated permissions were added that require admin consent. Microsoft's recommended user consent policy indicates end users can consent for any user consentable delegated permissions except for the following:
💭 Motivation and context
Closes #1995
Created follow-up issues #2008, #2009, and #2010.
🧪 Testing
Testing JSON data:
risky_applicationsproperty and confirm ifSeverityScore,MaxScore,ScorePercentage,SeverityLevel, andScoreBreakdownproperties are added.risky_third_party_service_principalsproperty and confirm ifSeverityScore,MaxScore,ScorePercentage,SeverityLevel, andScoreBreakdownproperties are added.Testing HTML output:
To simulate service principals assigned privileged roles:
For testing the validity of password/key/federated credential data, the majority of our test tenants should have apps/service principals with test credentials set. You can confirm the totals inside of Azure and cross check with the information in ScubaResults.json to confirm. Same for properties like multi-tenant status.
For confirming if a service principal is third party or not, check if it has a corresponding app registration in the "App Registrations" blade in Azure. If it doesn't, then it's a third party service principal.
For confirming which permissions are admin consented/non-admin consented, open an application in the "App Registrations" blade in Azure, there will be a green checkbox if the permission is admin consented, or there will be a yellow exclamation if the permission is not admin consented. This is only applicable for permissions that require admin consent.
✅ Pre-approval checklist
Functional tests added/updated to cover PowerShell and Rego changes.✅ Pre-merge checklist
PR passed smoke test check.
Feature branch has been rebased against changes from parent branch, as needed
Use
Rebase branchbutton below or use this reference to rebase from the command line.Resolved all merge conflicts on branch
Notified merge coordinator that PR is ready for merge via comment mention
Demonstrate changes to the team for questions and comments.
(Note: Only required for issues of size
Mediumor larger)✅ Post-merge checklist