Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Potential Password Spray Attack

Back
Id64d16e62-1a17-4a35-9ea7-2b9fe6f07118
RulenamePotential Password Spray Attack
DescriptionThis 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.
SeverityMedium
TacticsCredentialAccess
TechniquesT1110
Required data connectorsSalesforceServiceCloud
KindScheduled
Query frequency5m
Query period5m
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Salesforce Service Cloud/Analytic Rules/Salesforce-PasswordSpray.yaml
Version1.0.1
Arm template64d16e62-1a17-4a35-9ea7-2b9fe6f07118.json
Deploy To Azure
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
requiredDataConnectors:
- dataTypes:
  - SalesforceServiceCloud
  connectorId: SalesforceServiceCloud
queryPeriod: 5m
status: Available
kind: Scheduled
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.'
customDetails:
  Users: Users
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  
relevantTechniques:
- T1110
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Salesforce Service Cloud/Analytic Rules/Salesforce-PasswordSpray.yaml
severity: Medium
triggerThreshold: 0
name: Potential Password Spray Attack
tactics:
- CredentialAccess
version: 1.0.1
entityMappings:
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: ClientIp
id: 64d16e62-1a17-4a35-9ea7-2b9fe6f07118
queryFrequency: 5m
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-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",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CredentialAccess"
        ],
        "techniques": [
          "T1110"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}