let FailureThreshold = 15;
SalesforceServiceCloud
| where EventType =~ 'Login' and LoginStatus != 'LOGIN_NO_ERROR'
| where LoginStatus in~ ('LOGIN_ERROR_INVALID_PASSWORD', 'LOGIN_ERROR_SSO_PWD_INVALID')
| summarize UserCount=dcount(UserId), Users = make_set(UserId,100) by ClientIp, bin(TimeGenerated, 5m)
| where UserCount > FailureThreshold
relevantTechniques:
- T1110
name: Potential Password Spray Attack
requiredDataConnectors:
- dataTypes:
- SalesforceServiceCloud
connectorId: SalesforceServiceCloud
entityMappings:
- fieldMappings:
- identifier: Address
columnName: ClientIp
entityType: IP
triggerThreshold: 0
id: 64d16e62-1a17-4a35-9ea7-2b9fe6f07118
tactics:
- CredentialAccess
version: 1.0.1
customDetails:
Users: Users
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Salesforce Service Cloud/Analytic Rules/Salesforce-PasswordSpray.yaml
queryPeriod: 5m
kind: Scheduled
queryFrequency: 5m
severity: Medium
status: Available
description: |
'This query searches for failed attempts to log in from more than 15 various users within a 5 minute timeframe from the same source. This is a potential indication of a password spray attack.'
query: |
let FailureThreshold = 15;
SalesforceServiceCloud
| where EventType =~ 'Login' and LoginStatus != 'LOGIN_NO_ERROR'
| where LoginStatus in~ ('LOGIN_ERROR_INVALID_PASSWORD', 'LOGIN_ERROR_SSO_PWD_INVALID')
| summarize UserCount=dcount(UserId), Users = make_set(UserId,100) by ClientIp, bin(TimeGenerated, 5m)
| where UserCount > FailureThreshold
triggerOperator: gt
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"apiVersion": "2024-01-01-preview",
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/64d16e62-1a17-4a35-9ea7-2b9fe6f07118')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/64d16e62-1a17-4a35-9ea7-2b9fe6f07118')]",
"properties": {
"alertRuleTemplateName": "64d16e62-1a17-4a35-9ea7-2b9fe6f07118",
"customDetails": {
"Users": "Users"
},
"description": "'This query searches for failed attempts to log in from more than 15 various users within a 5 minute timeframe from the same source. This is a potential indication of a password spray attack.'\n",
"displayName": "Potential Password Spray Attack",
"enabled": true,
"entityMappings": [
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "ClientIp",
"identifier": "Address"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Salesforce Service Cloud/Analytic Rules/Salesforce-PasswordSpray.yaml",
"query": "let FailureThreshold = 15; \nSalesforceServiceCloud\n| where EventType =~ 'Login' and LoginStatus != 'LOGIN_NO_ERROR'\n| where LoginStatus in~ ('LOGIN_ERROR_INVALID_PASSWORD', 'LOGIN_ERROR_SSO_PWD_INVALID')\n| summarize UserCount=dcount(UserId), Users = make_set(UserId,100) by ClientIp, bin(TimeGenerated, 5m)\n| where UserCount > FailureThreshold\n",
"queryFrequency": "PT5M",
"queryPeriod": "PT5M",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CredentialAccess"
],
"techniques": [
"T1110"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}