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

Excessive NXDOMAIN DNS Queries

Back
Idb8266f81-2715-41a6-9062-42486cbc9c73
RulenameExcessive NXDOMAIN DNS Queries
DescriptionThis creates an incident in the event a client generates excessive amounts of DNS queries for non-existent domains.
SeverityMedium
TacticsCommandAndControl
TechniquesT1568
T1008
Required data connectorsInfobloxNIOS
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Infoblox NIOS/Analytic Rules/ExcessiveNXDOMAINDNSQueries.yaml
Version1.0.2
Arm templateb8266f81-2715-41a6-9062-42486cbc9c73.json
Deploy To Azure
let threshold = 200;
Infoblox_dnsclient
| where isnotempty(DnsResponseCode)
| where DnsResponseCode =~ "NXDOMAIN"
| summarize count() by SrcIpAddr, bin(TimeGenerated,15m)
| where count_ > threshold
| join kind=inner (Infoblox_dnsclient
    | where isnotempty(DnsResponseCode)
    | where DnsResponseCode =~ "NXDOMAIN"
    ) on SrcIpAddr
| extend timestamp = TimeGenerated, IPCustomEntity = SrcIpAddr
name: Excessive NXDOMAIN DNS Queries
status: Available
triggerThreshold: 0
severity: Medium
tactics:
- CommandAndControl
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Infoblox NIOS/Analytic Rules/ExcessiveNXDOMAINDNSQueries.yaml
entityMappings:
- entityType: IP
  fieldMappings:
  - columnName: IPCustomEntity
    identifier: Address
queryPeriod: 1h
queryFrequency: 1h
version: 1.0.2
triggerOperator: gt
description: |
    'This creates an incident in the event a client generates excessive amounts of DNS queries for non-existent domains.'
query: |
  let threshold = 200;
  Infoblox_dnsclient
  | where isnotempty(DnsResponseCode)
  | where DnsResponseCode =~ "NXDOMAIN"
  | summarize count() by SrcIpAddr, bin(TimeGenerated,15m)
  | where count_ > threshold
  | join kind=inner (Infoblox_dnsclient
      | where isnotempty(DnsResponseCode)
      | where DnsResponseCode =~ "NXDOMAIN"
      ) on SrcIpAddr
  | extend timestamp = TimeGenerated, IPCustomEntity = SrcIpAddr  
relevantTechniques:
- T1568
- T1008
id: b8266f81-2715-41a6-9062-42486cbc9c73
requiredDataConnectors:
- dataTypes:
  - Syslog
  connectorId: InfobloxNIOS
kind: Scheduled
{
  "$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/b8266f81-2715-41a6-9062-42486cbc9c73')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/b8266f81-2715-41a6-9062-42486cbc9c73')]",
      "properties": {
        "alertRuleTemplateName": "b8266f81-2715-41a6-9062-42486cbc9c73",
        "customDetails": null,
        "description": "'This creates an incident in the event a client generates excessive amounts of DNS queries for non-existent domains.'\n",
        "displayName": "Excessive NXDOMAIN DNS Queries",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Infoblox NIOS/Analytic Rules/ExcessiveNXDOMAINDNSQueries.yaml",
        "query": "let threshold = 200;\nInfoblox_dnsclient\n| where isnotempty(DnsResponseCode)\n| where DnsResponseCode =~ \"NXDOMAIN\"\n| summarize count() by SrcIpAddr, bin(TimeGenerated,15m)\n| where count_ > threshold\n| join kind=inner (Infoblox_dnsclient\n    | where isnotempty(DnsResponseCode)\n    | where DnsResponseCode =~ \"NXDOMAIN\"\n    ) on SrcIpAddr\n| extend timestamp = TimeGenerated, IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CommandAndControl"
        ],
        "techniques": [
          "T1008",
          "T1568"
        ],
        "templateVersion": "1.0.2",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}