Detection rules › Sigma

DoT (DNS over TLS) activation (command)

Status
stable
Severity
medium
Log source
product windows, category process_creation
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker attempts to enable DNS over TLS in order to evade detection for command and control purposes.

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1071.004 Application Layer Protocol: DNS

Event coverage

Rule body yaml

title: DoT (DNS over TLS) activation (command)
description: Detects scenarios where an attacker attempts to enable DNS over TLS in order to evade detection for command and control purposes.
references:
- https://techcommunity.microsoft.com/t5/networking-blog/dns-over-tls-available-to-windows-insiders/ba-p/3565859
- http://woshub.com/enable-dns-over-https-windows/
tags:
- attack.defense_evasion
- attack.command_and_control
- attack.t1071.004 
author: mdecrevoisier
status: stable
logsource:
  product: windows
  category: process_creation
detection:
  selection_baseline:
    EventID: 4688
    NewProcessName|endswith: '\netsh.exe' # Full path "C:\Windows\system32\netsh.exe"
    CommandLine|contains: add

  selection_enable: # full command: "netsh dns add global dot=yes"
    CommandLine|contains: 'dot=yes'

  selection_add_server: # full command: "netsh dns add encryption server=<resolver_ip> dothost=: autoupgrade=yes"
    CommandLine|contains: 'dothost='

  condition: selection_baseline and (selection_enable OR selection_add_server)
falsepositives:
- Legitimate DoT activation by administrators 
level: medium

Stages and Predicates

Stage 0: condition

selection_baseline and (selection_enable OR selection_add_server)

Stage 1: selection_baseline

selection_baseline:
  EventID: 4688
  NewProcessName|endswith: '\netsh.exe'
  CommandLine|contains: add

Stage 2: selection_enable

selection_enable:
  CommandLine|contains: 'dot=yes'

Stage 3: selection_add_server

selection_add_server:
  CommandLine|contains: 'dothost='

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.

FieldKindValues
CommandLinematch
  • add corpus 34 (sigma 26, splunk 4, chronicle 2, kusto 2)
  • dot=yes
  • dothost=
NewProcessNameends_with
  • \netsh.exe corpus 28 (sigma 28)