Detection: EC2 Instance Started With Previously Unseen User

REMOVED DETECTION

This detection has been removed from the Splunk Threat Research content library and is no longer maintained or supported.

Reason: Detections updated to use the new search logic and field names due to the TA update

Removed in version: 5.2.0

Replacement: Cloud Compute Instance Created By Previously Unseen User

If you have any questions or concerns, please reach out to us at research@splunk.com.

Description

This search looks for EC2 instances being created by users who have not created them before. This search is deprecated and have been translated to use the latest Change Datamodel.

 1`cloudtrail` eventName=RunInstances [search `cloudtrail` eventName=RunInstances errorCode=success 
 2| stats earliest(_time) as firstTime latest(_time) as lastTime by userIdentity.arn 
 3| rename userIdentity.arn as arn 
 4| inputlookup append=t previously_seen_ec2_launches_by_user_lookup 
 5| stats min(firstTime) as firstTime, max(lastTime) as lastTime by arn 
 6| outputlookup previously_seen_ec2_launches_by_user_lookup 
 7| eval newUser=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
 8| where newUser=1 
 9| `security_content_ctime(firstTime)` 
10| `security_content_ctime(lastTime)` 
11| rename arn as userIdentity.arn 
12| table userIdentity.arn] 
13| rename requestParameters.instanceType as instanceType, responseElements.instancesSet.items{}.instanceId as dest, userIdentity.arn as user 
14| table _time, user, dest, instanceType 
15| `ec2_instance_started_with_previously_unseen_user_filter`

Data Source

No data sources specified for this detection.

Macros Used

Name Value
cloudtrail sourcetype=aws:cloudtrail
ec2_instance_started_with_previously_unseen_user_filter ``
ec2_instance_started_with_previously_unseen_user_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1078.004 Cloud Accounts Initial Access

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule N/A
Earliest Time N/A
Latest Time N/A
Schedule Window N/A
Creates Finding (Notable) No
Creates Intermediate Finding (Risk Event) No
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.

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 AWS CloudTrail inputs. This search works best when you run the "Previously Seen EC2 Launches By User" support search once to create a history of previously seen ARNs.

Known False Positives

It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior.

Associated Analytic Story

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Not Applicable N/A N/A N/A
Unit Not Applicable N/A N/A N/A
Integration Not Applicable 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: 6