Detection rules › Splunk

Data Exfiltration via AWS CLI - Windows (Windows Event Log)

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

Threat actors may abuse the AWS CLI s3 cp command with recursive and custom endpoint flags to exfiltrate large volumes of data to an S3-compatible storage service outside of the target environment. The use of --recursive, --region, and --endpoint-url flags together is indicative of bulk data transfers, potentially to unauthorized or attacker-controlled storage. This use case detects such activity on Windows systems, helping identify suspicious data movement or staging for exfiltration.

MITRE ATT&CK coverage

TacticTechniques
ExfiltrationT1567 Exfiltration Over Web Service

References

Event coverage

Rule body yaml

id: '45491.91373'
title: Data Exfiltration via AWS CLI - Windows
description: Threat actors may abuse the AWS CLI s3 cp command with recursive and
  custom endpoint flags to exfiltrate large volumes of data to an S3-compatible storage
  service outside of the target environment. The use of --recursive, --region, and
  --endpoint-url flags together is indicative of bulk data transfers, potentially
  to unauthorized or attacker-controlled storage. This use case detects such activity
  on Windows systems, helping identify suspicious data movement or staging for exfiltration.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) "s3 " " cp " " --recursive" " --region" " --endpoint-url"
  | table _time, host, user, process, parent_process_name, process_name | bin span=1s
  | stats values(*) as * by _time, host '
techniques:
- exfiltration:exfiltration over web service
technique_id: 
- T1567
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://thedfirreport.com/2024/04/29/from-icedid-to-dagon-locker-ransomware-in-29-days/
- https://x.com/Kostastsale/status/1714343784799223877

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "s3 " " cp " " --recursive" " --region" " --endpoint-url"

Stage 2: table

| table _time, host, user, process, parent_process_name, process_name

Stage 3: bucket

| bin span=1s

Stage 4: 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
  • 4688 corpus 313 (splunk 283, kusto 30)

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>4688<"
1"s3 "
1" cp "
1" --recursive"
1" --region"
1" --endpoint-url"