Detection rules › Splunk
Excessive DNS Failures
The following analytic identifies excessive DNS query failures by counting DNS responses that do not indicate success, triggering when there are more than 50 occurrences. It leverages the Network_Resolution data model, focusing on DNS reply codes that signify errors. This activity is significant because a high number of DNS failures can indicate potential network misconfigurations, DNS poisoning attempts, or malware communication issues. If confirmed malicious, this activity could lead to disrupted network services, hindered communication, or data exfiltration attempts by attackers.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control | T1071.004 Application Layer Protocol: DNS |
Rule body splunk
name: Excessive DNS Failures
id: 104658f4-afdc-499e-9719-17243f9826f1
version: 11
creation_date: '2019-10-16'
modification_date: '2026-05-13'
author: bowesmana, Bhavin Patel, Splunk
status: experimental
type: Anomaly
description: The following analytic identifies excessive DNS query failures by counting DNS responses that do not indicate success, triggering when there are more than 50 occurrences. It leverages the Network_Resolution data model, focusing on DNS reply codes that signify errors. This activity is significant because a high number of DNS failures can indicate potential network misconfigurations, DNS poisoning attempts, or malware communication issues. If confirmed malicious, this activity could lead to disrupted network services, hindered communication, or data exfiltration attempts by attackers.
data_source: []
search: |-
| tstats `security_content_summariesonly` count FROM datamodel=Network_Resolution
WHERE nodename=DNS "DNS.reply_code"!="No Error" "DNS.reply_code"!="NoError" DNS.reply_code!="unknown" NOT "DNS.query"="*.arpa" "DNS.query"="*.*"
BY "DNS.src" "DNS.query" "DNS.reply_code"
| `drop_dm_object_name("DNS")`
| lookup cim_corporate_web_domain_lookup domain as query OUTPUT domain
| where isnull(domain)
| lookup update=true alexa_lookup_by_str domain as query OUTPUT rank
| where isnull(rank)
| eventstats max(count) as mc
BY src reply_code
| eval mode_query=if(count=mc, query, null())
| stats sum(count) as count values(mode_query) as query values(mc) as max_query_count
BY src reply_code
| where count>50
| `get_asset(src)`
| `excessive_dns_failures_filter`
how_to_implement: To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model.
known_false_positives: It is possible legitimate traffic can trigger this rule. Please investigate as appropriate. The threshold for generating an event can also be customized to better suit your environment.
references: []
intermediate_findings:
entities:
- field: src
type: system
score: 20
message: Excessive DNS failures detected on $src$
analytic_story:
- Suspicious DNS Traffic
- Command And Control
asset_type: Endpoint
mitre_attack_id:
- T1071.004
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: network
security_domain: network
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly` count FROM datamodel=Network_Resolution
WHERE nodename=DNS "DNS.reply_code"!="No Error" "DNS.reply_code"!="NoError" DNS.reply_code!="unknown" NOT "DNS.query"="*.arpa" "DNS.query"="*.*"
BY "DNS.src" "DNS.query" "DNS.reply_code"
Stage 2: search
| `drop_dm_object_name("DNS")`
Stage 3: lookup
| lookup cim_corporate_web_domain_lookup domain as query OUTPUT domain
Stage 4: where
| where isnull(domain)
Stage 5: lookup
| lookup update=true alexa_lookup_by_str domain as query OUTPUT rank
Stage 6: where
| where isnull(rank)
Stage 7: eventstats
| eventstats max(count) as mc
BY src reply_code
Stage 8: eval
| eval mode_query=if(count=mc, query, null())
Stage 9: stats
| stats sum(count) as count values(mode_query) as query values(mc) as max_query_count
BY src reply_code
Stage 10: where
| where count>50
Stage 11: search
| `get_asset(src)`
Stage 12: search
| `excessive_dns_failures_filter`
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
"DNS.query" | eq | "*.arpa" |
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.
| Field | Kind | Values |
|---|---|---|
"DNS.query" | eq |
|
"DNS.reply_code" | ne |
|
DNS.reply_code | ne |
|
count | gt |
|
domain | is_null | |
nodename | eq |
|
rank | is_null |