Back
Id44ec1fa4-a502-41ae-879a-3aad3557edce
RulenameValimail Enforce - DMARC Policy Weakened to None
DescriptionThis query searches for DMARC policies changed to ’none’, which disables enforcement

and leaves the domain vulnerable to spoofing and phishing attacks.
SeverityHigh
TacticsDefenseEvasion
InitialAccess
TechniquesT1566
T1562
Required data connectorsValimailEnforce
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ValimailEnforce/Analytic%20Rules/ValimailEnforce_DMARCPolicyWeakened.yaml
Version1.0.0
Arm template44ec1fa4-a502-41ae-879a-3aad3557edce.json
Deploy To Azure
ValimailEnforceEvents_CL
| where EventSeverity == "High"
| where EventType == "dmarc_policy_set_to_none"
| summarize
    EventCount = count(),
    FirstSeen = min(PerformedAt),
    LastSeen = max(PerformedAt),
    Changes = make_set(EventChange)
  by Subject, User, EventCategory
| extend
    AccountName = tostring(split(User, "@")[0]),
    AccountDomain = tostring(split(User, "@")[1]),
    DomainName = Subject
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: Name
    columnName: AccountName
  - identifier: UPNSuffix
    columnName: AccountDomain
- entityType: DNS
  fieldMappings:
  - identifier: DomainName
    columnName: DomainName
name: Valimail Enforce - DMARC Policy Weakened to None
kind: Scheduled
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ValimailEnforce/Analytic%20Rules/ValimailEnforce_DMARCPolicyWeakened.yaml
triggerOperator: gt
status: Available
queryPeriod: 1h
requiredDataConnectors:
- connectorId: ValimailEnforce
  dataTypes:
  - ValimailEnforceEvents_CL
tactics:
- DefenseEvasion
- InitialAccess
query: |
  ValimailEnforceEvents_CL
  | where EventSeverity == "High"
  | where EventType == "dmarc_policy_set_to_none"
  | summarize
      EventCount = count(),
      FirstSeen = min(PerformedAt),
      LastSeen = max(PerformedAt),
      Changes = make_set(EventChange)
    by Subject, User, EventCategory
  | extend
      AccountName = tostring(split(User, "@")[0]),
      AccountDomain = tostring(split(User, "@")[1]),
      DomainName = Subject
description: |
  This query searches for DMARC policies changed to 'none', which disables enforcement
  and leaves the domain vulnerable to spoofing and phishing attacks.
severity: High
incidentConfiguration:
  groupingConfiguration:
    lookbackDuration: 1d
    groupByEntities:
    - DNS
    enabled: true
    matchingMethod: Selected
    reopenClosedIncident: false
  createIncident: true
id: 44ec1fa4-a502-41ae-879a-3aad3557edce
triggerThreshold: 0
queryFrequency: 1h
alertDetailsOverride:
  alertDescriptionFormat: |
    The DMARC policy for domain '{{Subject}}' was set to 'none' by '{{User}}',
    disabling email authentication enforcement. This may expose the domain to spoofing.
  alertDisplayNameFormat: DMARC policy set to NONE on domain {{Subject}} by {{User}}
version: 1.0.0
relevantTechniques:
- T1566
- T1562
{
  "$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/44ec1fa4-a502-41ae-879a-3aad3557edce')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/44ec1fa4-a502-41ae-879a-3aad3557edce')]",
      "properties": {
        "alertDetailsOverride": {
          "alertDescriptionFormat": "The DMARC policy for domain '{{Subject}}' was set to 'none' by '{{User}}',\ndisabling email authentication enforcement. This may expose the domain to spoofing.\n",
          "alertDisplayNameFormat": "DMARC policy set to NONE on domain {{Subject}} by {{User}}"
        },
        "alertRuleTemplateName": "44ec1fa4-a502-41ae-879a-3aad3557edce",
        "customDetails": null,
        "description": "This query searches for DMARC policies changed to 'none', which disables enforcement\nand leaves the domain vulnerable to spoofing and phishing attacks.\n",
        "displayName": "Valimail Enforce - DMARC Policy Weakened to None",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountName",
                "identifier": "Name"
              },
              {
                "columnName": "AccountDomain",
                "identifier": "UPNSuffix"
              }
            ]
          },
          {
            "entityType": "DNS",
            "fieldMappings": [
              {
                "columnName": "DomainName",
                "identifier": "DomainName"
              }
            ]
          }
        ],
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": true,
            "groupByEntities": [
              "DNS"
            ],
            "lookbackDuration": "P1D",
            "matchingMethod": "Selected",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ValimailEnforce/Analytic%20Rules/ValimailEnforce_DMARCPolicyWeakened.yaml",
        "query": "ValimailEnforceEvents_CL\n| where EventSeverity == \"High\"\n| where EventType == \"dmarc_policy_set_to_none\"\n| summarize\n    EventCount = count(),\n    FirstSeen = min(PerformedAt),\n    LastSeen = max(PerformedAt),\n    Changes = make_set(EventChange)\n  by Subject, User, EventCategory\n| extend\n    AccountName = tostring(split(User, \"@\")[0]),\n    AccountDomain = tostring(split(User, \"@\")[1]),\n    DomainName = Subject\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "DefenseEvasion",
          "InitialAccess"
        ],
        "techniques": [
          "T1562",
          "T1566"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}