Back
Id4ae9f294-410d-4c11-9072-0d8fcf5162d8
RulenameSAST Auth Finding Correlated with Brute Force
DescriptionDetects applications with open SAST authentication findings that are

simultaneously experiencing brute force login attempts in Azure AD.

Correlates StratoSecure SAST findings with SigninLogs failure spikes.
SeverityHigh
TacticsCredentialAccess
InitialAccess
TechniquesT1110
T1078
Required data connectorsStratoSecurePush
KindScheduled
Query frequency1h
Query period75m
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/StratoSecure/Analytic%20Rules/S1_SAST_Auth_BruteForce.yaml
Version1.0.0
Arm template4ae9f294-410d-4c11-9072-0d8fcf5162d8.json
Deploy To Azure
let lookback = 1h;
let bruteForceThreshold = 20;
let AuthFindings = StratoSecure_Findings_CL
    | where TimeGenerated >= ago(lookback)
    | where FixStatus =~ "open"
    | where Severity in ("Critical", "High")
    | where RuleId has_any ("auth", "jwt", "login", "session", "token", "password", "credential")
    | summarize FindingCount = count(), RuleIds = make_set(RuleId), Repos = make_set(Repository)
        by ApplicationId, StraTenantId;
let BruteForce = SigninLogs
    | where TimeGenerated >= ago(lookback)
    | where ResultType != "0"
    | summarize FailedAttempts = count(), DistinctUsers = dcount(UserPrincipalName),
        IPList = make_set(IPAddress, 20), FirstAttempt = min(TimeGenerated), LastAttempt = max(TimeGenerated)
        by AppId, AppDisplayName
    | where FailedAttempts >= bruteForceThreshold;
AuthFindings
    | join kind=inner BruteForce on $left.ApplicationId == $right.AppId
    | project TimeGenerated = LastAttempt, ApplicationId, AppDisplayName, StraTenantId,
        FindingCount, RuleIds, Repos, FailedAttempts, DistinctUsers, IPList
tactics:
- CredentialAccess
- InitialAccess
name: SAST Auth Finding Correlated with Brute Force
version: 1.0.0
queryFrequency: 1h
requiredDataConnectors:
- connectorId: StratoSecurePush
  dataTypes:
  - StratoSecure_Findings_CL
id: 4ae9f294-410d-4c11-9072-0d8fcf5162d8
triggerThreshold: 0
entityMappings:
- fieldMappings:
  - identifier: AppId
    columnName: ApplicationId
  entityType: CloudApplication
queryPeriod: 75m
severity: High
relevantTechniques:
- T1110
- T1078
description: |
  Detects applications with open SAST authentication findings that are
  simultaneously experiencing brute force login attempts in Azure AD.
  Correlates StratoSecure SAST findings with SigninLogs failure spikes.
triggerOperator: gt
status: Available
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/StratoSecure/Analytic%20Rules/S1_SAST_Auth_BruteForce.yaml
kind: Scheduled
query: |
  let lookback = 1h;
  let bruteForceThreshold = 20;
  let AuthFindings = StratoSecure_Findings_CL
      | where TimeGenerated >= ago(lookback)
      | where FixStatus =~ "open"
      | where Severity in ("Critical", "High")
      | where RuleId has_any ("auth", "jwt", "login", "session", "token", "password", "credential")
      | summarize FindingCount = count(), RuleIds = make_set(RuleId), Repos = make_set(Repository)
          by ApplicationId, StraTenantId;
  let BruteForce = SigninLogs
      | where TimeGenerated >= ago(lookback)
      | where ResultType != "0"
      | summarize FailedAttempts = count(), DistinctUsers = dcount(UserPrincipalName),
          IPList = make_set(IPAddress, 20), FirstAttempt = min(TimeGenerated), LastAttempt = max(TimeGenerated)
          by AppId, AppDisplayName
      | where FailedAttempts >= bruteForceThreshold;
  AuthFindings
      | join kind=inner BruteForce on $left.ApplicationId == $right.AppId
      | project TimeGenerated = LastAttempt, ApplicationId, AppDisplayName, StraTenantId,
          FindingCount, RuleIds, Repos, FailedAttempts, DistinctUsers, IPList
{
  "$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/4ae9f294-410d-4c11-9072-0d8fcf5162d8')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/4ae9f294-410d-4c11-9072-0d8fcf5162d8')]",
      "properties": {
        "alertRuleTemplateName": "4ae9f294-410d-4c11-9072-0d8fcf5162d8",
        "customDetails": null,
        "description": "Detects applications with open SAST authentication findings that are\nsimultaneously experiencing brute force login attempts in Azure AD.\nCorrelates StratoSecure SAST findings with SigninLogs failure spikes.\n",
        "displayName": "SAST Auth Finding Correlated with Brute Force",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "CloudApplication",
            "fieldMappings": [
              {
                "columnName": "ApplicationId",
                "identifier": "AppId"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/StratoSecure/Analytic%20Rules/S1_SAST_Auth_BruteForce.yaml",
        "query": "let lookback = 1h;\nlet bruteForceThreshold = 20;\nlet AuthFindings = StratoSecure_Findings_CL\n    | where TimeGenerated >= ago(lookback)\n    | where FixStatus =~ \"open\"\n    | where Severity in (\"Critical\", \"High\")\n    | where RuleId has_any (\"auth\", \"jwt\", \"login\", \"session\", \"token\", \"password\", \"credential\")\n    | summarize FindingCount = count(), RuleIds = make_set(RuleId), Repos = make_set(Repository)\n        by ApplicationId, StraTenantId;\nlet BruteForce = SigninLogs\n    | where TimeGenerated >= ago(lookback)\n    | where ResultType != \"0\"\n    | summarize FailedAttempts = count(), DistinctUsers = dcount(UserPrincipalName),\n        IPList = make_set(IPAddress, 20), FirstAttempt = min(TimeGenerated), LastAttempt = max(TimeGenerated)\n        by AppId, AppDisplayName\n    | where FailedAttempts >= bruteForceThreshold;\nAuthFindings\n    | join kind=inner BruteForce on $left.ApplicationId == $right.AppId\n    | project TimeGenerated = LastAttempt, ApplicationId, AppDisplayName, StraTenantId,\n        FindingCount, RuleIds, Repos, FailedAttempts, DistinctUsers, IPList\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT75M",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CredentialAccess",
          "InitialAccess"
        ],
        "techniques": [
          "T1078",
          "T1110"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}