Detect AWS Console Login by New User
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 detects AWS console login events by new users. It leverages AWS CloudTrail events and compares them against a lookup file of previously seen users based on ARN values. This detection is significant because a new user logging into the AWS console could indicate the creation of new accounts or potential unauthorized access. If confirmed malicious, this activity could lead to unauthorized access to AWS resources, data exfiltration, or further exploitation within the cloud environment.
- Type: Hunting
- Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Datamodel: Authentication
- Last Updated: 2024-05-28
- Author: Rico Valdez, Splunk
- ID: bc91a8cd-35e7-4bb2-6140-e756cc46fd71
Annotations
ATT&CK
Kill Chain Phase
- Weaponization
- Exploitation
NIST
- DE.AE
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
7
8
9
10
11
| tstats earliest(_time) as firstTime latest(_time) as lastTime from datamodel=Authentication where Authentication.signature=ConsoleLogin by Authentication.user
| `drop_dm_object_name(Authentication)`
| join user type=outer [
| inputlookup previously_seen_users_console_logins
| stats min(firstTime) as earliestseen by user]
| eval userStatus=if(earliestseen >= relative_time(now(), "-24h@h") OR isnull(earliestseen), "First Time Logging into AWS Console", "Previously Seen User")
| where userStatus="First Time Logging into AWS Console"
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_aws_console_login_by_new_user_filter`
Macros
The SPL above uses the following Macros:
detect_aws_console_login_by_new_user_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
- Authentication.signature
- Authentication.user
How To Implement
You must install and configure the Splunk Add-on for AWS (version 5.1.0 or later) and Enterprise Security 6.2, which contains the required updates to the Authentication data model for cloud use cases. Run the Previously Seen Users in CloudTrail - Initial
support search only once to create a baseline of previously seen IAM users within the last 30 days. Run Previously Seen Users in CloudTrail - Update
hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines.
Known False Positives
When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
30.0 | 50 | 60 | User $user$ is logging into the AWS console for the first time |
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: 4