Password spray attack against ADFSSignInLogs
Id | 5533fe80-905e-49d5-889a-df27d2c3976d |
Rulename | Password spray attack against ADFSSignInLogs |
Description | Identifies evidence of password spray activity against Connect Health for AD FS sign-in events by looking for failures from multiple accounts from the same IP address within a time window. Reference: https://adfshelp.microsoft.com/References/ConnectHealthErrorCodeReference |
Severity | Medium |
Tactics | CredentialAccess |
Techniques | T1110 |
Required data connectors | AzureActiveDirectory |
Kind | Scheduled |
Query frequency | 30m |
Query period | 1h |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Active Directory/Analytic Rules/ADFSSignInLogsPasswordSpray.yaml |
Version | 1.0.1 |
Arm template | 5533fe80-905e-49d5-889a-df27d2c3976d.json |
let queryfrequency = 30m;
let accountthreshold = 10;
let successCodes = dynamic([0, 50144]);
ADFSSignInLogs
| extend IngestionTime = ingestion_time()
| where IngestionTime > ago(queryfrequency)
| where not(todynamic(AuthenticationDetails)[0].authenticationMethod == "Integrated Windows Authentication")
| summarize
DistinctFailureCount = dcountif(UserPrincipalName, ResultType !in (successCodes)),
DistinctSuccessCount = dcountif(UserPrincipalName, ResultType in (successCodes)),
SuccessAccounts = make_set_if(UserPrincipalName, ResultType in (successCodes), 250),
arg_min(TimeGenerated, *)
by IPAddress
| where DistinctFailureCount > DistinctSuccessCount and DistinctFailureCount >= accountthreshold
//| extend SuccessAccounts = iff(array_length(SuccessAccounts) != 0, SuccessAccounts, dynamic(["null"]))
//| mv-expand SuccessAccounts
| project TimeGenerated, Category, OperationName, IPAddress, DistinctFailureCount, DistinctSuccessCount, SuccessAccounts, AuthenticationRequirement, ConditionalAccessStatus, IsInteractive, UserAgent, NetworkLocationDetails, DeviceDetail, TokenIssuerType, TokenIssuerName, ResourceIdentity
severity: Medium
name: Password spray attack against ADFSSignInLogs
requiredDataConnectors:
- dataTypes:
- ADFSSignInLogs
connectorId: AzureActiveDirectory
id: 5533fe80-905e-49d5-889a-df27d2c3976d
tactics:
- CredentialAccess
queryFrequency: 30m
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Active Directory/Analytic Rules/ADFSSignInLogsPasswordSpray.yaml
description: |
'Identifies evidence of password spray activity against Connect Health for AD FS sign-in events by looking for failures from multiple accounts from the same IP address within a time window.
Reference: https://adfshelp.microsoft.com/References/ConnectHealthErrorCodeReference'
triggerThreshold: 0
kind: Scheduled
relevantTechniques:
- T1110
query: |
let queryfrequency = 30m;
let accountthreshold = 10;
let successCodes = dynamic([0, 50144]);
ADFSSignInLogs
| extend IngestionTime = ingestion_time()
| where IngestionTime > ago(queryfrequency)
| where not(todynamic(AuthenticationDetails)[0].authenticationMethod == "Integrated Windows Authentication")
| summarize
DistinctFailureCount = dcountif(UserPrincipalName, ResultType !in (successCodes)),
DistinctSuccessCount = dcountif(UserPrincipalName, ResultType in (successCodes)),
SuccessAccounts = make_set_if(UserPrincipalName, ResultType in (successCodes), 250),
arg_min(TimeGenerated, *)
by IPAddress
| where DistinctFailureCount > DistinctSuccessCount and DistinctFailureCount >= accountthreshold
//| extend SuccessAccounts = iff(array_length(SuccessAccounts) != 0, SuccessAccounts, dynamic(["null"]))
//| mv-expand SuccessAccounts
| project TimeGenerated, Category, OperationName, IPAddress, DistinctFailureCount, DistinctSuccessCount, SuccessAccounts, AuthenticationRequirement, ConditionalAccessStatus, IsInteractive, UserAgent, NetworkLocationDetails, DeviceDetail, TokenIssuerType, TokenIssuerName, ResourceIdentity
entityMappings:
- entityType: IP
fieldMappings:
- columnName: IPAddress
identifier: Address
status: Available
version: 1.0.1
queryPeriod: 1h
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/5533fe80-905e-49d5-889a-df27d2c3976d')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/5533fe80-905e-49d5-889a-df27d2c3976d')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01-preview",
"properties": {
"displayName": "Password spray attack against ADFSSignInLogs",
"description": "'Identifies evidence of password spray activity against Connect Health for AD FS sign-in events by looking for failures from multiple accounts from the same IP address within a time window.\nReference: https://adfshelp.microsoft.com/References/ConnectHealthErrorCodeReference'\n",
"severity": "Medium",
"enabled": true,
"query": "let queryfrequency = 30m;\nlet accountthreshold = 10;\nlet successCodes = dynamic([0, 50144]);\nADFSSignInLogs\n| extend IngestionTime = ingestion_time()\n| where IngestionTime > ago(queryfrequency)\n| where not(todynamic(AuthenticationDetails)[0].authenticationMethod == \"Integrated Windows Authentication\")\n| summarize\n DistinctFailureCount = dcountif(UserPrincipalName, ResultType !in (successCodes)),\n DistinctSuccessCount = dcountif(UserPrincipalName, ResultType in (successCodes)),\n SuccessAccounts = make_set_if(UserPrincipalName, ResultType in (successCodes), 250),\n arg_min(TimeGenerated, *)\n by IPAddress\n| where DistinctFailureCount > DistinctSuccessCount and DistinctFailureCount >= accountthreshold\n//| extend SuccessAccounts = iff(array_length(SuccessAccounts) != 0, SuccessAccounts, dynamic([\"null\"]))\n//| mv-expand SuccessAccounts\n| project TimeGenerated, Category, OperationName, IPAddress, DistinctFailureCount, DistinctSuccessCount, SuccessAccounts, AuthenticationRequirement, ConditionalAccessStatus, IsInteractive, UserAgent, NetworkLocationDetails, DeviceDetail, TokenIssuerType, TokenIssuerName, ResourceIdentity\n",
"queryFrequency": "PT30M",
"queryPeriod": "PT1H",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CredentialAccess"
],
"techniques": [
"T1110"
],
"alertRuleTemplateName": "5533fe80-905e-49d5-889a-df27d2c3976d",
"customDetails": null,
"entityMappings": [
{
"fieldMappings": [
{
"identifier": "Address",
"columnName": "IPAddress"
}
],
"entityType": "IP"
}
],
"status": "Available",
"templateVersion": "1.0.1",
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Azure Active Directory/Analytic Rules/ADFSSignInLogsPasswordSpray.yaml"
}
}
]
}