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

M2131_EventLogManagementPostureChanged_EL3

Back
Id672bfd77-4542-4ef1-acf9-e006dcd70c51
RulenameM2131_EventLogManagementPostureChanged_EL3
DescriptionThis alert is desinged to monitor Azure policies aligned with the Maturity Model for Event Log Management (M-21-31) standard. The alert triggers when EL3 policy compliance falls below 70% within a 1 week timeframe.
SeverityMedium
TacticsDiscovery
TechniquesT1082
KindScheduled
Query frequency7d
Query period7d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/MaturityModelForEventLogManagementM2131/Analytic Rules/M2131EventLogManagementPostureChangedEL3.yaml
Version1.0.0
Arm template672bfd77-4542-4ef1-acf9-e006dcd70c51.json
Deploy To Azure
SecurityRecommendation
| where RecommendationDisplayName <> ""
| extend MaturityLevel=iff(RecommendationDisplayName has_any("agent","extension","retention","logs encryption","collect","retained","log profile","CloudTrail","metric","AWS","GCP","DNS","Auditing","Flow","logging","usage"), "Event Logging (EL0)",
iff(RecommendationDisplayName has_any("container registries","logic apps","Enhanced monitoring","IoT Hub","Event Hub","App Service", "Kubernetes","updates","email", "automation", "adaptive"), "Advanced Event Logging (EL3)",
iff(RecommendationDisplayName has_any("signatures","CMK","CMEK","double encryption","managed key","KMS","container","Watcher"), "Intermediate Event Logging (EL2)",
iff(RecommendationDisplayName has_any("Exploit Guard","endpoint protection","Antimalware","health","VPC","Defender","Vulnerabilities","vulnerability","diagnostic","Key","activity log alert",""), "Basic Event Logging (EL1)","Other"))))
| summarize arg_max(TimeGenerated, *) by RecommendationDisplayName, AssessedResourceId, MaturityLevel
| summarize Failed = countif(RecommendationState == "Unhealthy"), Passed = countif(RecommendationState == "Healthy"), Total = countif(RecommendationState == "Healthy" or RecommendationState == "Unhealthy") by MaturityLevel
| extend PassedControls = (Passed/todouble(Total))*100
| extend RemediationLink = strcat('https://portal.azure.com/#blade/Microsoft_Azure_Security/SecurityMenuBlade/22')
| project MaturityLevel, Total, PassedControls, Passed, Failed, RemediationLink, LastObserved=now()
| where MaturityLevel <> ''
| where MaturityLevel == "Advanced Event Logging (EL3)"
| where PassedControls < 70 
//Adjust Either FailedRatePercentage or PasedRatePercentage Thresholds within   Organizational Needs
| sort by PassedControls desc
| extend URLCustomEntity = RemediationLink
queryFrequency: 7d
tactics:
- Discovery
queryPeriod: 7d
kind: Scheduled
relevantTechniques:
- T1082
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/MaturityModelForEventLogManagementM2131/Analytic Rules/M2131EventLogManagementPostureChangedEL3.yaml
description: |
    'This alert is desinged to monitor Azure policies aligned with the Maturity Model for Event Log Management (M-21-31) standard. The alert triggers when EL3 policy compliance falls below 70% within a 1 week timeframe.'
requiredDataConnectors: []
version: 1.0.0
triggerThreshold: 0
severity: Medium
triggerOperator: gt
id: 672bfd77-4542-4ef1-acf9-e006dcd70c51
entityMappings:
- entityType: URL
  fieldMappings:
  - columnName: URLCustomEntity
    identifier: Url
status: Available
name: M2131_EventLogManagementPostureChanged_EL3
query: |
  SecurityRecommendation
  | where RecommendationDisplayName <> ""
  | extend MaturityLevel=iff(RecommendationDisplayName has_any("agent","extension","retention","logs encryption","collect","retained","log profile","CloudTrail","metric","AWS","GCP","DNS","Auditing","Flow","logging","usage"), "Event Logging (EL0)",
  iff(RecommendationDisplayName has_any("container registries","logic apps","Enhanced monitoring","IoT Hub","Event Hub","App Service", "Kubernetes","updates","email", "automation", "adaptive"), "Advanced Event Logging (EL3)",
  iff(RecommendationDisplayName has_any("signatures","CMK","CMEK","double encryption","managed key","KMS","container","Watcher"), "Intermediate Event Logging (EL2)",
  iff(RecommendationDisplayName has_any("Exploit Guard","endpoint protection","Antimalware","health","VPC","Defender","Vulnerabilities","vulnerability","diagnostic","Key","activity log alert",""), "Basic Event Logging (EL1)","Other"))))
  | summarize arg_max(TimeGenerated, *) by RecommendationDisplayName, AssessedResourceId, MaturityLevel
  | summarize Failed = countif(RecommendationState == "Unhealthy"), Passed = countif(RecommendationState == "Healthy"), Total = countif(RecommendationState == "Healthy" or RecommendationState == "Unhealthy") by MaturityLevel
  | extend PassedControls = (Passed/todouble(Total))*100
  | extend RemediationLink = strcat('https://portal.azure.com/#blade/Microsoft_Azure_Security/SecurityMenuBlade/22')
  | project MaturityLevel, Total, PassedControls, Passed, Failed, RemediationLink, LastObserved=now()
  | where MaturityLevel <> ''
  | where MaturityLevel == "Advanced Event Logging (EL3)"
  | where PassedControls < 70 
  //Adjust Either FailedRatePercentage or PasedRatePercentage Thresholds within   Organizational Needs
  | sort by PassedControls desc
  | extend URLCustomEntity = RemediationLink  
{
  "$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/672bfd77-4542-4ef1-acf9-e006dcd70c51')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/672bfd77-4542-4ef1-acf9-e006dcd70c51')]",
      "properties": {
        "alertRuleTemplateName": "672bfd77-4542-4ef1-acf9-e006dcd70c51",
        "customDetails": null,
        "description": "'This alert is desinged to monitor Azure policies aligned with the Maturity Model for Event Log Management (M-21-31) standard. The alert triggers when EL3 policy compliance falls below 70% within a 1 week timeframe.'\n",
        "displayName": "M2131_EventLogManagementPostureChanged_EL3",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "URL",
            "fieldMappings": [
              {
                "columnName": "URLCustomEntity",
                "identifier": "Url"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/MaturityModelForEventLogManagementM2131/Analytic Rules/M2131EventLogManagementPostureChangedEL3.yaml",
        "query": "SecurityRecommendation\n| where RecommendationDisplayName <> \"\"\n| extend MaturityLevel=iff(RecommendationDisplayName has_any(\"agent\",\"extension\",\"retention\",\"logs encryption\",\"collect\",\"retained\",\"log profile\",\"CloudTrail\",\"metric\",\"AWS\",\"GCP\",\"DNS\",\"Auditing\",\"Flow\",\"logging\",\"usage\"), \"Event Logging (EL0)\",\niff(RecommendationDisplayName has_any(\"container registries\",\"logic apps\",\"Enhanced monitoring\",\"IoT Hub\",\"Event Hub\",\"App Service\", \"Kubernetes\",\"updates\",\"email\", \"automation\", \"adaptive\"), \"Advanced Event Logging (EL3)\",\niff(RecommendationDisplayName has_any(\"signatures\",\"CMK\",\"CMEK\",\"double encryption\",\"managed key\",\"KMS\",\"container\",\"Watcher\"), \"Intermediate Event Logging (EL2)\",\niff(RecommendationDisplayName has_any(\"Exploit Guard\",\"endpoint protection\",\"Antimalware\",\"health\",\"VPC\",\"Defender\",\"Vulnerabilities\",\"vulnerability\",\"diagnostic\",\"Key\",\"activity log alert\",\"\"), \"Basic Event Logging (EL1)\",\"Other\"))))\n| summarize arg_max(TimeGenerated, *) by RecommendationDisplayName, AssessedResourceId, MaturityLevel\n| summarize Failed = countif(RecommendationState == \"Unhealthy\"), Passed = countif(RecommendationState == \"Healthy\"), Total = countif(RecommendationState == \"Healthy\" or RecommendationState == \"Unhealthy\") by MaturityLevel\n| extend PassedControls = (Passed/todouble(Total))*100\n| extend RemediationLink = strcat('https://portal.azure.com/#blade/Microsoft_Azure_Security/SecurityMenuBlade/22')\n| project MaturityLevel, Total, PassedControls, Passed, Failed, RemediationLink, LastObserved=now()\n| where MaturityLevel <> ''\n| where MaturityLevel == \"Advanced Event Logging (EL3)\"\n| where PassedControls < 70 \n//Adjust Either FailedRatePercentage or PasedRatePercentage Thresholds within   Organizational Needs\n| sort by PassedControls desc\n| extend URLCustomEntity = RemediationLink\n",
        "queryFrequency": "P7D",
        "queryPeriod": "P7D",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Discovery"
        ],
        "techniques": [
          "T1082"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}