Detection rules › Splunk

AWS Exfiltration via Batch Service

Status
production
Severity
medium
Group by
aws::awsRegion, aws::recipientAccountId, aws::userAgent, dest, signature, src, user, vendor_product
Author
Bhavin Patel, Splunk
Source
github.com/splunk/security_content

The following analytic identifies the creation of AWS Batch jobs that could potentially abuse the AWS Bucket Replication feature on S3 buckets. It leverages AWS CloudTrail logs to detect the JobCreated event, analyzing job details and their status. This activity is significant because attackers can exploit this feature to exfiltrate data by creating malicious batch jobs. If confirmed malicious, this could lead to unauthorized data transfer between S3 buckets, resulting in data breaches and loss of sensitive information.

MITRE ATT&CK coverage

TacticTechniques
CollectionT1119 Automated Collection

Rule body splunk

name: AWS Exfiltration via Batch Service
id: 04455dd3-ced7-480f-b8e6-5469b99e98e2
version: 10
creation_date: '2023-04-24'
modification_date: '2026-05-13'
author: Bhavin Patel, Splunk
status: production
type: TTP
description: The following analytic identifies the creation of AWS Batch jobs that could potentially abuse the AWS Bucket Replication feature on S3 buckets. It leverages AWS CloudTrail logs to detect the `JobCreated` event, analyzing job details and their status. This activity is significant because attackers can exploit this feature to exfiltrate data by creating malicious batch jobs. If confirmed malicious, this could lead to unauthorized data transfer between S3 buckets, resulting in data breaches and loss of sensitive information.
data_source:
    - AWS CloudTrail JobCreated
search: |-
    `cloudtrail` eventName = JobCreated
      | fillnull
      | rename user_name as user
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY signature dest user
           user_agent src vendor_account
           vendor_region vendor_product
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `aws_exfiltration_via_batch_service_filter`
how_to_implement: You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.
known_false_positives: It is possible that an AWS Administrator or a user has legitimately created this job for some tasks.
references:
    - https://hackingthe.cloud/aws/exploitation/s3-bucket-replication-exfiltration/
    - https://bleemb.medium.com/data-exfiltration-with-native-aws-s3-features-c94ae4d13436
drilldown_searches:
    - name: View the detection results for - "$user$"
      search: '%original_detection_search% | search  user = "$user$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$user$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: 7d
      latest_offset: "0"
finding:
    title: AWS Batch Job is created on account id - $vendor_account$ from src_ip $src$
    entity:
        field: user
        type: other
        score: 50
threat_objects:
    - field: src
      type: ip_address
analytic_story:
    - Data Exfiltration
asset_type: AWS Account
mitre_attack_id:
    - T1119
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: threat
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1119/aws_exfil_datasync/cloudtrail.json
          sourcetype: aws:cloudtrail
          source: aws_cloudtrail
      test_type: unit

Stages and Predicates

Stage 1: search

`cloudtrail` eventName = JobCreated

Stage 2: fillnull

| fillnull

Stage 3: rename

| rename user_name as user

Stage 4: stats

| stats count min(_time) as firstTime max(_time) as lastTime
    BY signature dest user
       user_agent src vendor_account
       vendor_region vendor_product

Stage 5: search

| `security_content_ctime(firstTime)`

Stage 6: search

| `security_content_ctime(lastTime)`

Stage 7: search

| `aws_exfiltration_via_batch_service_filter`

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
eventNameeq
  • JobCreated
sourcetypeeq
  • aws:cloudtrail