Detection rules › Sigma

Potential Data Exfiltration Via Audio File

Status
test
Severity
medium
Log source
product windows, category ps_script
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects potential exfiltration attempt via audio file using PowerShell

MITRE ATT&CK coverage

TacticTechniques
ExfiltrationNo specific technique

Event coverage

Rule body yaml

title: Potential Data Exfiltration Via Audio File
id: e4f93c99-396f-47c8-bb0f-201b1fa69034
status: test
description: Detects potential exfiltration attempt via audio file using PowerShell
references:
    - https://github.com/gtworek/PSBits/blob/e97cbbb173b31cbc4d37244d3412de0a114dacfb/NoDLP/bin2wav.ps1
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-16
tags:
    - attack.exfiltration
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_main:
        ScriptBlockText|contains|all:
            - '[System.Math]::'
            - '[IO.FileMode]::'
            - 'BinaryWriter'
    selection_header_wav:
        ScriptBlockText|contains|all:
            # Byte chunks from the WAV header used in the example POC
            # You can extend this for different audio formats by adding different selections
            - '0x52'
            - '0x49'
            - '0x46'
            - '0x57'
            - '0x41'
            - '0x56'
            - '0x45'
            - '0xAC'
    condition: selection_main and 1 of selection_header_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection_main and 1 of selection_header_*

Stage 1: selection_main

selection_main:
    ScriptBlockText|contains|all:
        - '[System.Math]::'
        - '[IO.FileMode]::'
        - 'BinaryWriter'

Stage 2: selection_header_wav

selection_header_wav:
    ScriptBlockText|contains|all:
        - '0x52'
        - '0x49'
        - '0x46'
        - '0x57'
        - '0x41'
        - '0x56'
        - '0x45'
        - '0xAC'

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
  • 0x41
  • 0x45
  • 0x46
  • 0x49
  • 0x52
  • 0x56
  • 0x57
  • 0xAC
  • BinaryWriter
  • [IO.FileMode]::
  • [System.Math]::