Skip to content

Commit 06e1643

Browse files
authored
Merge pull request #11571 from Azure/ashwin/uebascorefixes-dec24
Fixes related to UEBARiskscore calculation and threshold logic
2 parents 25eefbf + 84ac8fe commit 06e1643

File tree

6 files changed

+795
-793
lines changed

6 files changed

+795
-793
lines changed

Solutions/Microsoft Entra ID/Analytic Rules/MFARejectedbyUser.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: MFA Rejected by User
33
description: |
44
'Identifies occurances where a user has rejected an MFA prompt. This could be an indicator that a threat actor has compromised the username and password of this user account and is using it to try and log into the account.
55
Ref : https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-user-accounts#monitoring-for-failed-unusual-sign-ins
6-
This query has also been updated to include UEBA logs IdentityInfo and BehaviorAnalytics for contextual information around the results.'
6+
This query has also been updated to include UEBA logs IdentityInfo and BehaviorAnalytics for contextual information around the results.
7+
Please note, MFA Failed logons from known IP ranges can be benign depending on the conditional access policies. In case of noisy behavior, consider tuning the source IP ranges or location filter after careful consideration'
78
severity: Medium
89
requiredDataConnectors:
910
- connectorId: AzureActiveDirectory
@@ -27,13 +28,13 @@ relevantTechniques:
2728
tags:
2829
- AADSecOpsGuide
2930
query: |
30-
let riskScoreCutoff = 20; //Adjust this based on volume of results
31+
let riskScoreCutoff = 3; //Adjust this score threshold based on volume of results. Activities identified as the most abnormal receive the highest scores (on a scale of 0-10)
3132
SigninLogs
3233
| where ResultType == 500121
3334
| extend additionalDetails_ = tostring(Status.additionalDetails)
3435
| extend UserPrincipalName = tolower(UserPrincipalName)
3536
| where additionalDetails_ =~ "MFA denied; user declined the authentication" or additionalDetails_ has "fraud"
36-
| summarize StartTime = min(TimeGenerated), EndTIme = max(TimeGenerated) by UserPrincipalName, UserId, AADTenantId, IPAddress
37+
| summarize StartTime = min(TimeGenerated), EndTIme = max(TimeGenerated) by UserPrincipalName, UserId, AADTenantId, FailedIPAddress = IPAddress
3738
| extend Name = tostring(split(UserPrincipalName,'@',0)[0]), UPNSuffix = tostring(split(UserPrincipalName,'@',1)[0])
3839
| join kind=leftouter (
3940
IdentityInfo
@@ -48,19 +49,19 @@ query: |
4849
by AccountUPN
4950
| extend UserPrincipalName=tolower(AccountUPN)
5051
) on UserPrincipalName
52+
//Below it will be joined with BehaviorAnalytics table to the Failed IP Addresses
5153
| join kind=leftouter (
5254
BehaviorAnalytics
5355
| where ActivityType in ("FailedLogOn", "LogOn")
5456
| where isnotempty(SourceIPAddress)
55-
| project UsersInsights, DevicesInsights, ActivityInsights, InvestigationPriority, SourceIPAddress
56-
| project-rename IPAddress = SourceIPAddress
57+
| project UsersInsights, DevicesInsights, ActivityInsights, InvestigationPriority, SourceIPAddress, UserName
58+
| project-rename FailedIPAddress = SourceIPAddress, Name = UserName
5759
| summarize
58-
UsersInsights = make_set(UsersInsights, 1000),
59-
DevicesInsights = make_set(DevicesInsights, 1000),
60-
IPInvestigationPriority = sum(InvestigationPriority)
61-
by IPAddress)
62-
on IPAddress
63-
| extend UEBARiskScore = IPInvestigationPriority
60+
MaxInvestigationScore = max(InvestigationPriority) // Only retrieve maximum Investigation Property score for both FailedIP and User
61+
by FailedIPAddress, Name)
62+
on FailedIPAddress, Name // Joining on both IP and User so as to only return context associated with same user
63+
| extend UEBARiskScore = MaxInvestigationScore
64+
| project-away *1 // removing duplicate columns post outer join from output
6465
| where UEBARiskScore > riskScoreCutoff
6566
| sort by UEBARiskScore desc
6667
entityMappings:
@@ -79,6 +80,6 @@ entityMappings:
7980
- entityType: IP
8081
fieldMappings:
8182
- identifier: Address
82-
columnName: IPAddress
83-
version: 2.0.3
83+
columnName: FailedIPAddress
84+
version: 2.0.4
8485
kind: Scheduled

Solutions/Microsoft Entra ID/Data/Solution_AAD.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"Solutions/Microsoft Entra ID/Playbooks/Revoke-AADSignInSessions/entity-trigger/azuredeploy.json"
9191
],
9292
"BasePath": "C:\\GitHub\\Azure-Sentinel",
93-
"Version": "3.2.9",
93+
"Version": "3.2.10",
9494
"Metadata": "SolutionMetadata.json",
9595
"TemplateSpec": true,
9696
"StaticDataConnectorIds": [
97.4 KB
Binary file not shown.

Solutions/Microsoft Entra ID/Package/createUiDefinition.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@
600600
"name": "analytic32-text",
601601
"type": "Microsoft.Common.TextBlock",
602602
"options": {
603-
"text": "Identifies occurances where a user has rejected an MFA prompt. This could be an indicator that a threat actor has compromised the username and password of this user account and is using it to try and log into the account.\nRef : https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-user-accounts#monitoring-for-failed-unusual-sign-ins\nThis query has also been updated to include UEBA logs IdentityInfo and BehaviorAnalytics for contextual information around the results."
603+
"text": "Identifies occurances where a user has rejected an MFA prompt. This could be an indicator that a threat actor has compromised the username and password of this user account and is using it to try and log into the account.\nRef : https://docs.microsoft.com/azure/active-directory/fundamentals/security-operations-user-accounts#monitoring-for-failed-unusual-sign-ins\nThis query has also been updated to include UEBA logs IdentityInfo and BehaviorAnalytics for contextual information around the results. \nPlease note, MFA Failed logons from known IP ranges can be benign depending on the conditional access policies. In case of noisy behavior, consider tuning the source IP ranges or location filter after careful consideration"
604604
}
605605
}
606606
]

0 commit comments

Comments
 (0)