Detection rules › Kusto

Excessive NXDOMAIN DNS Queries

Status
available
Severity
medium
Time window
15m
Group by
SrcIpAddr
Source
github.com/Azure/Azure-Sentinel

'This creates an incident in the event a client generates excessive amounts of DNS queries for non-existent domains.'

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1008 Fallback Channels, T1568 Dynamic Resolution

Rule body kusto

id: b8266f81-2715-41a6-9062-42486cbc9c73
name: Excessive NXDOMAIN DNS Queries
description: |
  'This creates an incident in the event a client generates excessive amounts of DNS queries for non-existent domains.'
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: SyslogAma
    datatypes:
      - Syslog
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - CommandAndControl
relevantTechniques:
  - T1568
  - T1008
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
entityMappings:
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: SrcIpAddr
version: 1.0.5
kind: Scheduled

Stages and Predicates

Parameters

let threshold = 200;

Stage 1: source

Infoblox_dnsclient

Stage 2: where

| where isnotempty(DnsResponseCode)

Stage 3: where

| where DnsResponseCode =~ "NXDOMAIN"

Stage 4: summarize

| summarize count() by SrcIpAddr, bin(TimeGenerated,15m)

Stage 5: where

| where count_ > threshold

Stage 6: join

| join kind=inner (Infoblox_dnsclient
    | where isnotempty(DnsResponseCode)
    | where DnsResponseCode =~ "NXDOMAIN"
    ) on SrcIpAddr

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
DnsResponseCodeeq
  • NXDOMAIN
DnsResponseCodeis_not_null
  • (no value, null check)
count_gt
  • 200 transforms: cased

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
SrcIpAddrsummarize