ID | Technique | Tactic |
---|---|---|
T1078.004 | Cloud Accounts | Defense Evasion |
Detection: Detect new API calls from user roles
DEPRECATED DETECTION
This detection has been marked as deprecated by the Splunk Threat Research team. This means that it will no longer be maintained or supported. If you have any questions or concerns, please reach out to us at research@splunk.com.
Description
This search detects new API calls that have either never been seen before or that have not been seen in the previous hour, where the identity type is AssumedRole
.
Search
1`cloudtrail` eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole [search `cloudtrail` eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole
2| stats earliest(_time) as earliest latest(_time) as latest by userName eventName
3| inputlookup append=t previously_seen_api_calls_from_user_roles
4| stats min(earliest) as earliest, max(latest) as latest by userName eventName
5| outputlookup previously_seen_api_calls_from_user_roles
6| eval newApiCallfromUserRole=if(earliest>=relative_time(now(), "-70m@m"), 1, 0)
7| where newApiCallfromUserRole=1
8| `security_content_ctime(earliest)`
9| `security_content_ctime(latest)`
10| table eventName userName]
11|rename userName as user
12| stats values(eventName) earliest(_time) as earliest latest(_time) as latest by user
13| `security_content_ctime(earliest)`
14| `security_content_ctime(latest)`
15| `detect_new_api_calls_from_user_roles_filter`
Data Source
Name | Platform | Sourcetype | Source | Supported App |
---|---|---|---|---|
N/A | N/A | N/A | N/A | N/A |
Macros Used
Name | Value |
---|---|
cloudtrail | sourcetype=aws:cloudtrail |
detect_new_api_calls_from_user_roles_filter | search * |
detect_new_api_calls_from_user_roles_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 AWS CloudTrail inputs. This search works best when you run the "Previously seen API call per user roles in AWS CloudTrail" support search once to create a history of previously seen user roles.
Known False Positives
It is possible that there are legitimate user roles making new or infrequently used API calls in your infrastructure, causing the search to trigger.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
tbd | 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