Detection rules › Sigma
Potential Data Exfiltration Via Audio File
Detects potential exfiltration attempt via audio file using PowerShell
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Exfiltration | No specific technique |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule body
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
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |