Detection rules › Splunk

Powershell ICMP Data Exfiltration (PowerShell)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

Adversaries may steal data by exfiltrating it over an existing command and control channel. Use case attempts to detect powershell scripts with specific ICMP calls that may be attributed to data exfil

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '5538.5778'
title: Powershell ICMP Data Exfiltration
description: 'Adversaries may steal data by exfiltrating it over an existing command
  and control channel. Use case attempts to detect powershell scripts with specific
  ICMP calls that may be attributed to data exfil. - Software Association: Alchimist
  - Atomics T1048.003 Test#2'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_powershell` TERM(EventCode=4103) TERM(System)
  TERM(Net) TERM(NetworkInformation) TERM(ping) | rex field=Message "(?i)script\s+?name\s+?\=\s+?(?<script>.{1,}?\.ps1)"
  | table _time, host, user signature_id, process, process_*, script | bin span=1s
  | stats values(*) as * by _time, host '
techniques:
- execution:command and scripting interpreter:powershell
- exfiltration:exfiltration over c2 channel
technique_id:
- T1059.001
- T1041
data_category:
- PowerShell logs
- Process command-line parameters
references:
- https://raw.githubusercontent.com/cyb3rw01f/icmpExfiltrater/master/icmpExfiltrater.ps1

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_powershell` TERM(EventCode=4103) TERM(System) TERM(Net) TERM(NetworkInformation) TERM(ping)

Stage 2: rex

| rex field=Message "(?i)script\s+?name\s+?\=\s+?(?<script>.{1,}?\.ps1)"

Stage 3: table

| table _time, host, user signature_id, process, process_*, script

Stage 4: bucket

| bin span=1s

Stage 5: stats

| stats values(*) as * by _time, host

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
EventCodeeq
  • 4103 corpus 105 (splunk 105)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1TERM
1System
1TERM
1Net
1TERM
1NetworkInformation
1TERM
1ping