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

Unusual Anomaly

Back
Idd0255b5f-2a3c-4112-8744-e6757af3283a
RulenameUnusual Anomaly
DescriptionAnomaly Rules generate events in the Anomalies table. This scheduled rule tries to detect Anomalies that are not usual, they could be a type of Anomaly that has recently been activated, or an infrequent type. The detected Anomaly should be reviewed, if it is relevant enough, eventually a separate scheduled Analytics Rule could be created specifically for that Anomaly Type, so an alert and/or incident is generated everytime that type of Anomaly happens.
SeverityMedium
KindScheduled
Query frequency1h
Query period4d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Detections/Anomalies/UnusualAnomaly.yaml
Version1.0.1
Arm templated0255b5f-2a3c-4112-8744-e6757af3283a.json
Deploy To Azure
// You can leave out Anomalies that are already monitored through other Analytics Rules
//let _MonitoredRules = dynamic(["TestAlertName"]);
let query_frequency = 1h;
let query_lookback = 3d;
Anomalies
| where TimeGenerated > ago(query_frequency)
//| where not(RuleName has_any (_MonitoredRules))
| join kind = leftanti (
    Anomalies
    | where TimeGenerated between (ago(query_frequency + query_lookback)..ago(query_frequency))
    | distinct RuleName
) on RuleName
triggerOperator: gt
version: 1.0.1
query: |
  // You can leave out Anomalies that are already monitored through other Analytics Rules
  //let _MonitoredRules = dynamic(["TestAlertName"]);
  let query_frequency = 1h;
  let query_lookback = 3d;
  Anomalies
  | where TimeGenerated > ago(query_frequency)
  //| where not(RuleName has_any (_MonitoredRules))
  | join kind = leftanti (
      Anomalies
      | where TimeGenerated between (ago(query_frequency + query_lookback)..ago(query_frequency))
      | distinct RuleName
  ) on RuleName  
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/Anomalies/UnusualAnomaly.yaml
queryFrequency: 1h
requiredDataConnectors: []
incidentConfiguration:
  groupingConfiguration:
    groupByCustomDetails: []
    reopenClosedIncident: false
    groupByAlertDetails:
    - DisplayName
    matchingMethod: Selected
    lookbackDuration: 1h
    enabled: true
    groupByEntities: []
  createIncident: true
sentinelEntitiesMappings:
- columnName: Entities
eventGroupingSettings:
  aggregationKind: AlertPerResult
name: Unusual Anomaly
techniques: []
severity: Medium
kind: Scheduled
tactics: []
queryPeriod: 4d
id: d0255b5f-2a3c-4112-8744-e6757af3283a
description: |
    'Anomaly Rules generate events in the Anomalies table. This scheduled rule tries to detect Anomalies that are not usual, they could be a type of Anomaly that has recently been activated, or an infrequent type. The detected Anomaly should be reviewed, if it is relevant enough, eventually a separate scheduled Analytics Rule could be created specifically for that Anomaly Type, so an alert and/or incident is generated everytime that type of Anomaly happens.'
metadata:
  source:
    kind: Community
  author:
    name: Jose Sebastian Canos
  categories:
    domains:
    - Security - Others
  support:
    tier: Community
triggerThreshold: 0
alertDetailsOverride:
  alertDisplayNameFormat: Unusual Anomaly - {{RuleName}}
  alertTacticsColumnName: Tactics
{
  "$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/d0255b5f-2a3c-4112-8744-e6757af3283a')]",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/d0255b5f-2a3c-4112-8744-e6757af3283a')]",
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
      "kind": "Scheduled",
      "apiVersion": "2022-11-01-preview",
      "properties": {
        "displayName": "Unusual Anomaly",
        "description": "'Anomaly Rules generate events in the Anomalies table. This scheduled rule tries to detect Anomalies that are not usual, they could be a type of Anomaly that has recently been activated, or an infrequent type. The detected Anomaly should be reviewed, if it is relevant enough, eventually a separate scheduled Analytics Rule could be created specifically for that Anomaly Type, so an alert and/or incident is generated everytime that type of Anomaly happens.'\n",
        "severity": "Medium",
        "enabled": true,
        "query": "// You can leave out Anomalies that are already monitored through other Analytics Rules\n//let _MonitoredRules = dynamic([\"TestAlertName\"]);\nlet query_frequency = 1h;\nlet query_lookback = 3d;\nAnomalies\n| where TimeGenerated > ago(query_frequency)\n//| where not(RuleName has_any (_MonitoredRules))\n| join kind = leftanti (\n    Anomalies\n    | where TimeGenerated between (ago(query_frequency + query_lookback)..ago(query_frequency))\n    | distinct RuleName\n) on RuleName\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "P4D",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0,
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [],
        "techniques": [],
        "alertRuleTemplateName": "d0255b5f-2a3c-4112-8744-e6757af3283a",
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "groupByCustomDetails": [],
            "reopenClosedIncident": false,
            "groupByAlertDetails": [
              "DisplayName"
            ],
            "matchingMethod": "Selected",
            "lookbackDuration": "PT1H",
            "enabled": true,
            "groupByEntities": []
          }
        },
        "eventGroupingSettings": {
          "aggregationKind": "AlertPerResult"
        },
        "alertDetailsOverride": {
          "alertDisplayNameFormat": "Unusual Anomaly - {{RuleName}}",
          "alertTacticsColumnName": "Tactics"
        },
        "customDetails": null,
        "entityMappings": null,
        "sentinelEntitiesMappings": [
          {
            "columnName": "Entities"
          }
        ],
        "templateVersion": "1.0.1",
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/Anomalies/UnusualAnomaly.yaml"
      }
    }
  ]
}