| ID | Technique | Tactic |
|---|---|---|
| T1078.004 | Cloud Accounts | Initial Access |
Detection: Detect Spike in AWS API Activity
REMOVED DETECTION
This detection has been removed from the Splunk Threat Research content library and is no longer maintained or supported.
Reason: Detection deprecated as it no longer effectively identifies the intended malicious activity
Removed in version: 5.2.0
If you have any questions or concerns, please reach out to us at research@splunk.com.
Description
This search will detect users creating spikes of API activity in your AWS environment. It will also update the cache file that factors in the latest data. This search is deprecated and have been translated to use the latest Change Datamodel.
Search
1`cloudtrail` eventType=AwsApiCall [search `cloudtrail` eventType=AwsApiCall
2| spath output=arn path=userIdentity.arn
3| stats count as apiCalls by arn
4| inputlookup api_call_by_user_baseline append=t
5| fields - latestCount
6| stats values(*) as * by arn
7| rename apiCalls as latestCount
8| eval newAvgApiCalls=avgApiCalls + (latestCount-avgApiCalls)/720
9| eval newStdevApiCalls=sqrt(((pow(stdevApiCalls, 2)*719 + (latestCount-newAvgApiCalls)*(latestCount-avgApiCalls))/720))
10| eval avgApiCalls=coalesce(newAvgApiCalls, avgApiCalls), stdevApiCalls=coalesce(newStdevApiCalls, stdevApiCalls), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1)
11| table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls
12| outputlookup api_call_by_user_baseline
13| eval dataPointThreshold = 15, deviationThreshold = 3
14| eval isSpike=if((latestCount > avgApiCalls+deviationThreshold*stdevApiCalls) AND numDataPoints > dataPointThreshold, 1, 0)
15| where isSpike=1
16| rename arn as userIdentity.arn
17| table userIdentity.arn]
18| spath output=user userIdentity.arn
19| stats values(eventName) as eventName, count as numberOfApiCalls, dc(eventName) as uniqueApisCalled by user
20| `detect_spike_in_aws_api_activity_filter`
Data Source
No data sources specified for this detection.
Macros Used
| Name | Value |
|---|---|
| cloudtrail | sourcetype=aws:cloudtrail |
| detect_spike_in_aws_api_activity_filter | `` |
detect_spike_in_aws_api_activity_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 | N/A |
| Earliest Time | N/A |
| Latest Time | N/A |
| Schedule Window | N/A |
| Creates Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | No |
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. You can modify dataPointThreshold and deviationThreshold to better fit your environment. The dataPointThreshold variable is the minimum number of data points required to have a statistically significant amount of data to determine. The deviationThreshold variable is the number of standard deviations away from the mean that the value must be to be considered a spike.
This search produces fields (eventName,numberOfApiCalls,uniqueApisCalled) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure > Incident Management > Incident Review Settings > Add New Entry):
- Label: AWS Event Name, Field: eventName
- Label: Number of API Calls, Field: numberOfApiCalls
- Label: Unique API Calls, Field: uniqueApisCalled
Detailed documentation on how to create a new field within Incident Review may be found here:
https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details
Known False Positives
None.
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: 5