Try in Splunk Security Cloud

Description

Malicious actors often abuse legitimate Dynamic DNS services to host malicious payloads or interactive command and control nodes. Attackers will automate domain resolution changes by routing dynamic domains to countless IP addresses to circumvent firewall blocks, block lists as well as frustrate a network defenders analytic and investigative processes. This search will look for DNS queries made from within your infrastructure to suspicious dynamic domains.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
  • Datamodel: Network_Resolution
  • Last Updated: 2021-01-14
  • Author: Bhavin Patel, Splunk
  • ID: a1e761ac-1344-4dbd-88b2-3f34c912d359

Annotations

ATT&CK
ID Technique Tactic
T1189 Drive-by Compromise Initial Access
Kill Chain Phase
  • Command & Control
  • Actions on Objectives
NIST
  • PR.DS
  • PR.PT
  • DE.AE
  • DE.CM
CIS20
  • CIS 8
  • CIS 12
  • CIS 13
CVE
1
2
3
4
5
6
| tstats `security_content_summariesonly` count values(DNS.answer) as answer min(_time) as firstTime from datamodel=Network_Resolution by DNS.query host 
| `drop_dm_object_name("DNS")` 
| `security_content_ctime(firstTime)` 
| `dynamic_dns_providers` 
| `detect_hosts_connecting_to_dynamic_domain_providers_filter`

Macros

The SPL above uses the following Macros:

Note that detect_hosts_connecting_to_dynamic_domain_providers_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required field

  • _time
  • DNS.answer
  • DNS.query
  • host

How To Implement

First, you’ll need to ingest data from your DNS operations. This can be done by ingesting logs from your server or data, collected passively by Splunk Stream or a similar solution. Specifically, data that contains the domain that is being queried and the IP of the host originating the request must be populating the Network_Resolution data model. This search also leverages a lookup file, dynamic_dns_providers_default.csv, which contains a non-exhaustive list of Dynamic DNS providers. Please consider updating the local lookup periodically by adding new domains to the list of dynamic_dns_providers_local.csv.
This search produces fields (query, answer, isDynDNS) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable event. To see the additional metadata, add the following fields, if not already present, to Incident Review. Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):\n1. Label: DNS Query, Field: query\

  1. \
  2. Label: DNS Answer, Field: answer\
  3. \
  4. Label: IsDynamicDNS, Field: isDynDNS
    Detailed documentation on how to create a new field within Incident Review may be found here: https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details

Known False Positives

Some users and applications may leverage Dynamic DNS to reach out to some domains on the Internet since dynamic DNS by itself is not malicious, however this activity must be verified.

Associated Analytic story

RBA

Risk Score Impact Confidence Message
56.0 70 80 A dns query $query$ from your infra connecting to suspicious domain in host $host$

Reference

Test Dataset

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 | version: 3