| ID | Technique | Tactic |
|---|---|---|
| T1071.004 | DNS | Command and Control |
Detection: DNS record changed
REMOVED DETECTION
This detection has been removed from the Splunk Threat Research content library and is no longer maintained or supported.
Reason: Detection deprecated as it no longer effectively identifies the intended malicious activity
Removed in version: 5.2.0
If you have any questions or concerns, please reach out to us at research@splunk.com.
Description
The search takes the DNS records and their answers results of the discovered_dns_records lookup and finds if any records have changed by searching DNS response from the Network_Resolution datamodel across the last day.
Search
1
2| inputlookup discovered_dns_records
3| rename answer as discovered_answer
4| join domain[
5|tstats `security_content_summariesonly` count values(DNS.record_type) as type, values(DNS.answer) as current_answer values(DNS.src) as src from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query
6| rename DNS.query as query
7| where query!="unknown"
8| rex field=query "(?<domain>\w+\.\w+?)(?:$
9|/)"]
10| makemv delim=" " answer
11| makemv delim=" " type
12| sort -count
13| table count,src,domain,type,query,current_answer,discovered_answer
14| makemv current_answer
15| mvexpand current_answer
16| makemv discovered_answer
17| eval n=mvfind(discovered_answer, current_answer)
18| where isnull(n)
19| `dns_record_changed_filter`
Data Source
No data sources specified for this detection.
Macros Used
| Name | Value |
|---|---|
| security_content_summariesonly | summariesonly=summariesonly_config allow_old_summaries=oldsummaries_config fillnull_value=fillnull_config`` |
| dns_record_changed_filter | `` |
dns_record_changed_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | N/A |
| Earliest Time | N/A |
| Latest Time | N/A |
| Schedule Window | N/A |
| Creates Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search "Discover DNS record".
Splunk>Phantom Playbook Integration
If Splunk>Phantom is also configured in your environment, a Playbook called "DNS Hijack Enrichment" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk https://splunkbase.splunk.com/app/3411/, add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active.
(Playbook Link:https://my.phantom.us/4.2/playbook/dns-hijack-enrichment/)
Known False Positives
Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate.
Associated Analytic Story
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | Not Applicable | N/A | N/A | N/A |
| Unit | Not Applicable | N/A | N/A |
N/A |
| Integration | Not Applicable | N/A | N/A |
N/A |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 6