Detection rules › Sigma

Powershell DNSExfiltration

Status
test
Severity
high
Log source
product windows, category ps_script
Author
frack113
Source
github.com/SigmaHQ/sigma

DNSExfiltrator allows for transferring (exfiltrate) a file over a DNS request covert channel

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Powershell DNSExfiltration
id: d59d7842-9a21-4bc6-ba98-64bfe0091355
status: test
description: DNSExfiltrator allows for transferring (exfiltrate) a file over a DNS request covert channel
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1048/T1048.md#atomic-test-3---dnsexfiltration-doh
    - https://github.com/Arno0x/DNSExfiltrator
author: frack113
date: 2022-01-07
tags:
    - attack.exfiltration
    - attack.t1048
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_cmdlet:
        - ScriptBlockText|contains: 'Invoke-DNSExfiltrator'
        - ScriptBlockText|contains|all:
              - ' -i '
              - ' -d '
              - ' -p '
              - ' -doh '
              - ' -t '
    condition: selection_cmdlet
falsepositives:
    - Legitimate script
level: high

Stages and Predicates

Stage 0: condition

selection_cmdlet

Stage 1: selection_cmdlet

selection_cmdlet:
    - ScriptBlockText|contains: 'Invoke-DNSExfiltrator'
    - ScriptBlockText|contains|all:
          - ' -i '
          - ' -d '
          - ' -p '
          - ' -doh '
          - ' -t '

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
ScriptBlockTextmatch
  • -d
  • -doh
  • -i
  • -p
  • -t
  • Invoke-DNSExfiltrator corpus 2 (sigma 2)