Detection rules › Splunk

Removable Media Detected (Windows Event Log)

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

Adversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system and executes. In the case of Lateral Movement, this may occur through modification of executable files stored on removable media or by copying malware and renaming it to look like a legitimate file to trick users into executing it on a separate system. In the case of Initial Access, this may occur through manual manipulation of the media, modification of systems used to initially format the media, or modification to the media's firmware itself

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '15702.23323'
title: Removable Media Detected
description: 'Adversaries may move onto systems, possibly those on disconnected or
  air-gapped networks, by copying malware to removable media and taking advantage
  of Autorun features when the media is inserted into a system and executes. In the
  case of Lateral Movement, this may occur through modification of executable files
  stored on removable media or by copying malware and renaming it to look like a legitimate
  file to trick users into executing it on a separate system. In the case of Initial
  Access, this may occur through manual manipulation of the media, modification of
  systems used to initially format the media, or modification to the media''s firmware
  itself. - Threat Actor Association: APT28, APT29, Camaro Dragon, FIN7, Gamaredon
  Group/Shuckworm, UNC4990 - Software Association: Raspberry Robin'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` TERM(EventCode=6416) OR "<EventID>6416<"
  | rex field=_raw "''DeviceDescription''?>(?<device_description>[^<]+)"| table _time,
  host, user, signature_id, process, process_*, parent_process_*, device_description
  | bin span=1s | stats values(*) as * by _time, host '
techniques:
- collection:data from removable media
- lateral-movement:replication through removable media
technique_id: 
- T1025
- T1091
data_category:
- Windows event logs
references:
- https://threatpost.com/fin7-mailing-malicious-usb-sticks-ransomware/177541/

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` TERM(EventCode=6416) OR "<EventID>6416<"

Stage 2: rex

| rex field=_raw "'DeviceDescription'?>(?<device_description>[^<]+)"

Stage 3: table

| table _time, host, user, signature_id, process, process_*, parent_process_*, device_description

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
  • 6416

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
1"<EventID>6416<"