name: Previously seen S3 bucket access by remote IP
id: fc0edc15-fq2c-48b0-9f6f-63qa1281fd03
version: 1
date: '2018-06-28'
author: Bhavin Patel, Splunk
type: batch
datamodel: []
description: This search looks for successful access to S3 buckets from remote IP
  addresses, then creates a baseline of the earliest and latest times we have encountered
  this remote IP within the last 30 days. In this support search, we are only looking
  for S3 access events where the HTTP response code from AWS is "200"
search: '`aws_s3_accesslogs` http_status=200  | stats  earliest(_time) as earliest
  latest(_time) as latest by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip
  | stats count'
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. You must validate the remote IP and bucket name entries in `previously_seen_S3_access_from_remote_ip.csv`,
  which is a lookup file created as a result of running this support search.
references: []
tags:
  analytic_story:
  - Suspicious AWS S3 Activities
  detections:
  - Detect S3 access from a new IP
  product:
  - Splunk Enterprise
  - Splunk Enterprise Security
  - Splunk Cloud
