Try in Splunk Security Cloud

Description

This search allows you to identify DNS requests and compute the standard deviation on the length of the names being resolved, then filter on two times the standard deviation to show you those queries that are unusually large for your environment.

  • Type: Anomaly
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
  • Datamodel: Network_Resolution
  • Last Updated: 2021-10-06
  • Author: Bhavin Patel, Splunk
  • ID: 1a67f15a-f4ff-4170-84e9-08cf6f75d6f5

ATT&CK

ID Technique Tactic
T1048.003 Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol Exfiltration

| tstats `security_content_summariesonly` count from datamodel=Network_Resolution where NOT DNS.message_type IN("Pointer","PTR") by DNS.query 
| `drop_dm_object_name("DNS")` 
| eval tlds=split(query,".") 
| eval tld=mvindex(tlds,-1) 
| eval tld_len=len(tld) 
| search tld_len<=24 
| eval query_length = len(query) 
| table query query_length record_type count 
| eventstats stdev(query_length) AS stdev avg(query_length) AS avg p50(query_length) AS p50
| where query_length>(avg+stdev*2) 
| eval z_score=(query_length-avg)/stdev 
| `dns_query_length_with_high_standard_deviation_filter`

Associated Analytic Story

How To Implement

To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model.

Required field

  • _time
  • DNS.query

Kill Chain Phase

  • Command and Control

Known False Positives

It's possible there can be long domain names that are legitimate.

RBA

Risk Score Impact Confidence Message
56.0 70 80 A dns query $query$ with 2 time standard deviation of name len of the dns query 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: 4