AWS Exfiltration via Anomalous GetObject API Activity

Original Source: [splunk source]
Name:AWS Exfiltration via Anomalous GetObject API Activity
id:e4384bbf-5835-4831-8d85-694de6ad2cc6
version:3
date:2024-09-30
author:Bhavin Patel, Splunk
status:production
type:Anomaly
Description:The following analytic identifies anomalous GetObject API activity in AWS, indicating potential data exfiltration attempts. It leverages AWS CloudTrail logs and uses the `anomalydetection` command to detect unusual patterns in the frequency of GetObject API calls by analyzing fields such as "count," "user_type," and "user_arn" within a 10-minute window. This activity is significant as it may indicate unauthorized data access or exfiltration from S3 buckets. If confirmed malicious, attackers could exfiltrate sensitive data, leading to data breaches and compliance violations.
Data_source:
  • -AWS CloudTrail GetObject
search:`cloudtrail` eventName=GetObject
| bin _time span=10m
| stats count values(requestParameters.bucketName) as bucketName by _time src_ip aws_account_id user_type user_arn userIdentity.principalId
| anomalydetection "count" "user_type" "user_arn" action=annotate
| search probable_cause=* |`aws_exfiltration_via_anomalous_getobject_api_activity_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 a user downloaded these files to use them locally and there are AWS services in configured that perform these activities for a legitimate reason. Filter is needed.
References:
  -https://labs.nettitude.com/blog/how-to-exfiltrate-aws-ec2-data/
  -https://docs.splunk.com/Documentation/Splunk/9.0.4/SearchReference/Anomalydetection
  -https://www.vectra.ai/blogpost/abusing-the-replicator-silently-exfiltrating-data-with-the-aws-s3-replication-service
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:Anomalous S3 activities detected by user $user_arn$ from $src_ip$
  mitre_attack_id:
    - 'T1119'
  observable:
    name:'user_arn'
    type:'User'
    - role:
      - 'Attacker'
    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'
    - 'userIdentity.principalId'
  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/T1530/aws_exfil_high_no_getobject/cloudtrail.json
  sourcetype: aws:cloudtrail
  source: aws_cloudtrail
  update_timestamp: True
manual_test:None

Related Analytic Stories


Data Exfiltration