Detect S3 access from a new IP
THIS IS A EXPERIMENTAL DETECTION
This detection has been marked experimental by the Splunk Threat Research team. This means we have not been able to test, simulate, or build datasets for this detection. Use at your own risk. This analytic is NOT supported.
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.
- Type: Anomaly
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2024-05-19
- Author: Bhavin Patel, Splunk
- ID: e6f1bb1b-f441-492b-9126-902acda217da
Annotations
Kill Chain Phase
- Exploitation
NIST
- DE.AE
CIS20
- CIS 13
CVE
Search
1
2
3
4
5
6
7
8
9
10
11
12
13
14
`aws_s3_accesslogs` http_status=200 [search `aws_s3_accesslogs` http_status=200
| stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip
| inputlookup append=t previously_seen_S3_access_from_remote_ip
| stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip
| outputlookup previously_seen_S3_access_from_remote_ip
| eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0)
| where newIP=1
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| table bucket_name remote_ip]
| iplocation remote_ip
|rename remote_ip as src_ip
| table _time bucket_name src_ip City Country operation request_uri
| `detect_s3_access_from_a_new_ip_filter`
Macros
The SPL above uses the following Macros:
detect_s3_access_from_a_new_ip_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Lookups
The SPL above uses the following Lookups:
Required fields
List of fields required to use this analytic.
- _time
- http_status
- bucket_name
- remote_ip
How To Implement
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
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
25.0 | 50 | 50 | New S3 access from a new IP - $src_ip$ |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
Test Dataset
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 | version: 2