AWS Exfiltration via Batch Service

Original Source: [splunk source]
Name:AWS Exfiltration via Batch Service
id:04455dd3-ced7-480f-b8e6-5469b99e98e2
version:3
date:2024-09-30
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
| stats count min(_time) as firstTime max(_time) as lastTime values(serviceEventDetails.jobArn) as job_arn values(serviceEventDetails.status) as status by src_ip aws_account_id eventName errorCode userAgent
| `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 - "$aws_account_id$"'
search:'%original_detection_search% | search aws_account_id = "$aws_account_id$"'
earliest_offset:'$info_min_time$'
latest_offset:'$info_max_time$'
name:'View risk events for the last 7 days for - "$aws_account_id$"'
search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$aws_account_id$") starthoursago=168 | 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:'$info_min_time$'
latest_offset:'$info_max_time$'
tags:
  analytic_story:
    - 'Data Exfiltration'
  asset_type:AWS Account
  confidence:80
  impact:80
  message:AWS Batch Job is created on account id - $aws_account_id$ from src_ip $src_ip$
  mitre_attack_id:
    - 'T1119'
  observable:
    name:'src_ip'
    type:'IP Address'
    - role:
      - 'Attacker'
    name:'aws_account_id'
    type:'Other'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'eventName'
    - 'user_arn'
    - 'src_ip'
    - 'aws_account_id'
    - 'userAgent'
  risk_score:64
  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
  update_timestamp: True
manual_test:None

Related Analytic Stories


Data Exfiltration