ID | Technique | Tactic |
---|---|---|
T1530 | Data from Cloud Storage | Collection |
Detection: Detect S3 access from a new IP
EXPERIMENTAL DETECTION
This detection status is set to experimental. The Splunk Threat Research team has not yet fully tested, simulated, or built comprehensive datasets for this detection. As such, this analytic is not officially supported. If you have any questions or concerns, please reach out to us at research@splunk.com.
Description
The following analytic identifies access to an S3 bucket from a new or previously unseen remote IP address. It leverages S3 bucket-access logs, specifically focusing on successful access events (http_status=200). This activity is significant because access from unfamiliar IP addresses could indicate unauthorized access or potential data exfiltration attempts. If confirmed malicious, this activity could lead to unauthorized data access, data theft, or further exploitation of the compromised S3 bucket, posing a significant risk to sensitive information stored within the bucket.
Search
1`aws_s3_accesslogs` http_status=200 [search `aws_s3_accesslogs` http_status=200
2| stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip
3| inputlookup append=t previously_seen_S3_access_from_remote_ip
4| stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip
5| outputlookup previously_seen_S3_access_from_remote_ip
6| eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0)
7| where newIP=1
8| `security_content_ctime(firstTime)`
9| `security_content_ctime(lastTime)`
10| table bucket_name remote_ip]
11| iplocation remote_ip
12|rename remote_ip as src_ip
13| table _time bucket_name src_ip City Country operation request_uri
14| `detect_s3_access_from_a_new_ip_filter`
Data Source
Name | Platform | Sourcetype | Source | Supported App |
---|---|---|---|---|
N/A | N/A | N/A | N/A | N/A |
Macros Used
Name | Value |
---|---|
aws_s3_accesslogs | sourcetype=aws:s3:accesslogs |
detect_s3_access_from_a_new_ip_filter | search * |
detect_s3_access_from_a_new_ip_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
Setting | Value |
---|---|
Disabled | true |
Cron Schedule | 0 * * * * |
Earliest Time | -70m@m |
Latest Time | -10m@m |
Schedule Window | auto |
Creates Risk Event | True |
Implementation
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names.
Known False Positives
S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
New S3 access from a new IP - $src_ip$ | 25 | 50 | 50 |
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | Not Applicable | N/A | N/A | N/A |
Unit | ❌ Failing | N/A | N/A |
N/A |
Integration | ❌ Failing | N/A | N/A |
N/A |
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub | Version: 2