Back
Ide6d743f2-a538-455f-899c-251926b9071e
RulenameDelinea - Failed authentication spike (single account)
DescriptionDetects when a single account accumulates an unusually high number of failed authentication

events within a short window. Only authentication events - MFA, login and sign-in - are

considered; the service-wide view of every failure lives in the ‘Delinea - Failed operations’

hunting query. A failure is a failed MFA result, a failed password factor, or any login fail

reason. A burst of failures for one account can indicate brute-force or credential-stuffing

activity. Tune ’threshold’ to your environment.
SeverityMedium
TacticsCredentialAccess
TechniquesT1110
Required data connectorsDelineaPlatformConnector
KindScheduled
Query frequency15m
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Delinea%20Platform/Analytic%20Rules/DelineaFailedAuthSpike.yaml
Version1.2.0
Arm templatee6d743f2-a538-455f-899c-251926b9071e.json
Deploy To Azure
let threshold = 10;
// The data collection rule sets TimeGenerated from the Delinea eventDateTime and the
// connector polls in 5 minute windows, so events routinely land several minutes after
// the time they carry. 'lookback' must stay <= queryPeriod and must be wide enough to
// absorb that lag, otherwise late arriving events are never evaluated by any run.
let lookback = 1h;
// Must equal queryFrequency so every event is counted by exactly one run.
let newSince = 15m;
// Authentication events only. Matched against eventType.name, falling back to
// internalName, the same way ASimAuditEventDelineaPlatform resolves the event name.
let authEventPattern = @"(?i)mfa|multifactor|\blogin\b|\blogon\b|signin|authentication";
let failures =
    DelineaAuditEvents_CL
    | where TimeGenerated > ago(lookback)
    | extend IngestedAt = ingestion_time()
    | extend d = parse_json(RawData)
    | extend Attr = d.additionalAttributes
    | extend EventName = tostring(coalesce(d.eventType.name, d.eventType.internalName))
    | where EventName matches regex authEventPattern
    // The attributes bag carries either scalars or single element arrays depending on
    // the reporting service, so both shapes are read - see ASimAuditEventDelineaPlatform.
    | extend Actor = tostring(coalesce(d.actor.email, d.actor.name, d.actor.displayName)),
             RawSrcIP = tostring(d.source.host.network.ipAddress),
             MfaResult = tostring(coalesce(Attr.MfaResult[0], Attr.MfaResult)),
             FactorPassword = tostring(coalesce(Attr.FactorPassword[0], Attr.FactorPassword)),
             FailReason = tostring(coalesce(Attr.FailReason[0], Attr.FailReason))
    | where MfaResult =~ "Failed" or FactorPassword =~ "Failed" or isnotempty(FailReason)
    | where isnotempty(Actor)
    // '0.0.0.0' is the placeholder reported for events that have no network origin.
    | extend SrcIP = iff(RawSrcIP in ("", "0.0.0.0"), "", RawSrcIP);
let recentActors = failures | where IngestedAt > ago(newSince) | distinct Actor;
failures
| where Actor in (recentActors)
| summarize Failures = count(), DistinctSourceIPs = dcountif(SrcIP, isnotempty(SrcIP)),
            SourceIPs = make_set_if(SrcIP, isnotempty(SrcIP), 20),
            FailReasons = make_set_if(FailReason, isnotempty(FailReason), 10),
            SrcIP = take_anyif(SrcIP, isnotempty(SrcIP)),
            StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by Actor
| where Failures >= threshold
| project Actor, Failures, DistinctSourceIPs, SourceIPs, FailReasons, SrcIP, StartTime, EndTime
| sort by Failures desc
incidentConfiguration:
  groupingConfiguration:
    lookbackDuration: P1D
    reopenClosedIncident: false
    groupByEntities:
    - Account
    matchingMethod: Selected
    enabled: true
  createIncident: true
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Delinea%20Platform/Analytic%20Rules/DelineaFailedAuthSpike.yaml
triggerThreshold: 0
id: e6d743f2-a538-455f-899c-251926b9071e
kind: Scheduled
relevantTechniques:
- T1110
version: 1.2.0
tactics:
- CredentialAccess
queryPeriod: 1h
queryFrequency: 15m
severity: Medium
name: Delinea - Failed authentication spike (single account)
customDetails:
  DistinctSourceIPs: DistinctSourceIPs
  Failures: Failures
  FailReasons: FailReasons
requiredDataConnectors:
- connectorId: DelineaPlatformConnector
  dataTypes:
  - DelineaAuditEvents_CL
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: Name
    columnName: Actor
- entityType: IP
  fieldMappings:
  - identifier: Address
    columnName: SrcIP
description: |
  Detects when a single account accumulates an unusually high number of failed authentication
  events within a short window. Only authentication events - MFA, login and sign-in - are
  considered; the service-wide view of every failure lives in the 'Delinea - Failed operations'
  hunting query. A failure is a failed MFA result, a failed password factor, or any login fail
  reason. A burst of failures for one account can indicate brute-force or credential-stuffing
  activity. Tune 'threshold' to your environment.
eventGroupingSettings:
  aggregationKind: AlertPerResult
status: Available
query: |
  let threshold = 10;
  // The data collection rule sets TimeGenerated from the Delinea eventDateTime and the
  // connector polls in 5 minute windows, so events routinely land several minutes after
  // the time they carry. 'lookback' must stay <= queryPeriod and must be wide enough to
  // absorb that lag, otherwise late arriving events are never evaluated by any run.
  let lookback = 1h;
  // Must equal queryFrequency so every event is counted by exactly one run.
  let newSince = 15m;
  // Authentication events only. Matched against eventType.name, falling back to
  // internalName, the same way ASimAuditEventDelineaPlatform resolves the event name.
  let authEventPattern = @"(?i)mfa|multifactor|\blogin\b|\blogon\b|signin|authentication";
  let failures =
      DelineaAuditEvents_CL
      | where TimeGenerated > ago(lookback)
      | extend IngestedAt = ingestion_time()
      | extend d = parse_json(RawData)
      | extend Attr = d.additionalAttributes
      | extend EventName = tostring(coalesce(d.eventType.name, d.eventType.internalName))
      | where EventName matches regex authEventPattern
      // The attributes bag carries either scalars or single element arrays depending on
      // the reporting service, so both shapes are read - see ASimAuditEventDelineaPlatform.
      | extend Actor = tostring(coalesce(d.actor.email, d.actor.name, d.actor.displayName)),
               RawSrcIP = tostring(d.source.host.network.ipAddress),
               MfaResult = tostring(coalesce(Attr.MfaResult[0], Attr.MfaResult)),
               FactorPassword = tostring(coalesce(Attr.FactorPassword[0], Attr.FactorPassword)),
               FailReason = tostring(coalesce(Attr.FailReason[0], Attr.FailReason))
      | where MfaResult =~ "Failed" or FactorPassword =~ "Failed" or isnotempty(FailReason)
      | where isnotempty(Actor)
      // '0.0.0.0' is the placeholder reported for events that have no network origin.
      | extend SrcIP = iff(RawSrcIP in ("", "0.0.0.0"), "", RawSrcIP);
  let recentActors = failures | where IngestedAt > ago(newSince) | distinct Actor;
  failures
  | where Actor in (recentActors)
  | summarize Failures = count(), DistinctSourceIPs = dcountif(SrcIP, isnotempty(SrcIP)),
              SourceIPs = make_set_if(SrcIP, isnotempty(SrcIP), 20),
              FailReasons = make_set_if(FailReason, isnotempty(FailReason), 10),
              SrcIP = take_anyif(SrcIP, isnotempty(SrcIP)),
              StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by Actor
  | where Failures >= threshold
  | project Actor, Failures, DistinctSourceIPs, SourceIPs, FailReasons, SrcIP, StartTime, EndTime
  | sort by Failures desc
{
  "$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/e6d743f2-a538-455f-899c-251926b9071e')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/e6d743f2-a538-455f-899c-251926b9071e')]",
      "properties": {
        "alertRuleTemplateName": "e6d743f2-a538-455f-899c-251926b9071e",
        "customDetails": {
          "DistinctSourceIPs": "DistinctSourceIPs",
          "FailReasons": "FailReasons",
          "Failures": "Failures"
        },
        "description": "Detects when a single account accumulates an unusually high number of failed authentication\nevents within a short window. Only authentication events - MFA, login and sign-in - are\nconsidered; the service-wide view of every failure lives in the 'Delinea - Failed operations'\nhunting query. A failure is a failed MFA result, a failed password factor, or any login fail\nreason. A burst of failures for one account can indicate brute-force or credential-stuffing\nactivity. Tune 'threshold' to your environment.\n",
        "displayName": "Delinea - Failed authentication spike (single account)",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "Actor",
                "identifier": "Name"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "SrcIP",
                "identifier": "Address"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "AlertPerResult"
        },
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": true,
            "groupByEntities": [
              "Account"
            ],
            "lookbackDuration": "P1D",
            "matchingMethod": "Selected",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Delinea%20Platform/Analytic%20Rules/DelineaFailedAuthSpike.yaml",
        "query": "let threshold = 10;\n// The data collection rule sets TimeGenerated from the Delinea eventDateTime and the\n// connector polls in 5 minute windows, so events routinely land several minutes after\n// the time they carry. 'lookback' must stay <= queryPeriod and must be wide enough to\n// absorb that lag, otherwise late arriving events are never evaluated by any run.\nlet lookback = 1h;\n// Must equal queryFrequency so every event is counted by exactly one run.\nlet newSince = 15m;\n// Authentication events only. Matched against eventType.name, falling back to\n// internalName, the same way ASimAuditEventDelineaPlatform resolves the event name.\nlet authEventPattern = @\"(?i)mfa|multifactor|\\blogin\\b|\\blogon\\b|signin|authentication\";\nlet failures =\n    DelineaAuditEvents_CL\n    | where TimeGenerated > ago(lookback)\n    | extend IngestedAt = ingestion_time()\n    | extend d = parse_json(RawData)\n    | extend Attr = d.additionalAttributes\n    | extend EventName = tostring(coalesce(d.eventType.name, d.eventType.internalName))\n    | where EventName matches regex authEventPattern\n    // The attributes bag carries either scalars or single element arrays depending on\n    // the reporting service, so both shapes are read - see ASimAuditEventDelineaPlatform.\n    | extend Actor = tostring(coalesce(d.actor.email, d.actor.name, d.actor.displayName)),\n             RawSrcIP = tostring(d.source.host.network.ipAddress),\n             MfaResult = tostring(coalesce(Attr.MfaResult[0], Attr.MfaResult)),\n             FactorPassword = tostring(coalesce(Attr.FactorPassword[0], Attr.FactorPassword)),\n             FailReason = tostring(coalesce(Attr.FailReason[0], Attr.FailReason))\n    | where MfaResult =~ \"Failed\" or FactorPassword =~ \"Failed\" or isnotempty(FailReason)\n    | where isnotempty(Actor)\n    // '0.0.0.0' is the placeholder reported for events that have no network origin.\n    | extend SrcIP = iff(RawSrcIP in (\"\", \"0.0.0.0\"), \"\", RawSrcIP);\nlet recentActors = failures | where IngestedAt > ago(newSince) | distinct Actor;\nfailures\n| where Actor in (recentActors)\n| summarize Failures = count(), DistinctSourceIPs = dcountif(SrcIP, isnotempty(SrcIP)),\n            SourceIPs = make_set_if(SrcIP, isnotempty(SrcIP), 20),\n            FailReasons = make_set_if(FailReason, isnotempty(FailReason), 10),\n            SrcIP = take_anyif(SrcIP, isnotempty(SrcIP)),\n            StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by Actor\n| where Failures >= threshold\n| project Actor, Failures, DistinctSourceIPs, SourceIPs, FailReasons, SrcIP, StartTime, EndTime\n| sort by Failures desc\n",
        "queryFrequency": "PT15M",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CredentialAccess"
        ],
        "techniques": [
          "T1110"
        ],
        "templateVersion": "1.2.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}