:warning: THIS IS A EXPERIMENTAL DETECTION

This detection has been marked experimental by the Splunk Threat Research team. This means we have not been able to test, simulate, or build datasets for this detection. Use at your own risk. This analytic is NOT supported.

Try in Splunk Security Cloud

Description

The following analytic uses a pre trained deep learning model to detect suspicious DNS TXT records. The model is trained independently and is then made available for download. The DNS TXT records are categorized into commonly identified types like email, verification, http using regular expressions https://www.tide-project.nl/blog/wtmc2020/. The TXT records that do not match regular expressions for well known types are labeled as 1 for "unknown/suspicious" and otherwise 0 for "not suspicious". The deep learning model we have developed uses DNS TXT responses to analyze patterns of character sequences to predict if a DNS TXT is suspicious or not. The higher the pred_is_unknown_proba, the more likely the DNS TXT record is suspicious. The threshold for flagging a domain as suspicious is set at 0.5.

  • Type: Anomaly
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
  • Datamodel: Network_Resolution
  • Last Updated: 2023-01-15
  • Author: Abhinav Mishra, Kumar Sharad and Namratha Sreekanta, Splunk
  • ID: 92f65c3a-968c-11ed-a1eb-0242ac120002

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1568.002 Domain Generation Algorithms Command And Control
Kill Chain Phase
  • Command and Control
NIST
  • DE.AE
CIS20
  • CIS 13
CVE
1
2
3
4
5
6
7
8
9
10
11
12
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Resolution where DNS.message_type=response AND DNS.record_type=TXT by DNS.src DNS.dest DNS.answer DNS.record_type 
| `drop_dm_object_name("DNS")` 
| rename answer as text 
| fields firstTime, lastTime, message_type,record_type,src,dest, text 
| apply detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl 
| rename predicted_is_unknown as is_suspicious_score 
| where is_suspicious_score > 0.5 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| table src,dest,text,record_type, firstTime, lastTime,is_suspicious_score 
| `detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl_filter`

Macros

The SPL above uses the following Macros:

:information_source: detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • DNS.message_type
  • DNS.record_type
  • DNS.src
  • DNS.dest
  • DNS.answer

How To Implement

Steps to deploy detect suspicious DNS TXT records model into Splunk App DSDL. This detection depends on the Splunk app for Data Science and Deep Learning which can be found here - https://splunkbase.splunk.com/app/4607/ and the Network Resolution datamodel which can be found here - https://splunkbase.splunk.com/app/1621/. The detection uses a pre-trained deep learning model that needs to be deployed in DSDL app. Follow the steps for deployment here - https://github.com/splunk/security_content/wiki/How-to-deploy-pre-trained-Deep-Learning-models-for-ESCU.\

  • Download the artifacts .tar.gz file from the link - https://seal.splunkresearch.com/detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl.tar.gz.\
  • Download the detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl.ipynb Jupyter notebook from https://github.com/splunk/security_content/notebooks.\
  • Login to the Jupyter Lab assigned for detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl container. This container should be listed on Containers page for DSDL app.\
  • Below steps need to be followed inside Jupyter lab.\
  • Upload the detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl.tar.gz file into app/model/data path using the upload option in the jupyter notebook.\
  • Untar the artifact detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl.tar.gz using tar -xf app/model/data/detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl.tar.gz -C app/model/data.\
  • Upload detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl.ipynb` into Jupyter lab notebooks folder using the upload option in Jupyter lab.\
  • Save the notebook using the save option in Jupyter notebook.\
  • Upload detect_suspicious_dns_txt_records_using_pretrained_model_in_dsdl.json into notebooks/data folder.

    Known False Positives

    False positives may be present if DNS TXT record contents are similar to benign DNS TXT record contents.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
45.0 50 90 A suspicious DNS TXT response was detected on host $src$ , kindly review.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

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: 1