Detection: Abnormally High Number Of Cloud Security Group API Calls

EXPERIMENTAL DETECTION

This detection status is set to experimental. The Splunk Threat Research team has not yet fully tested, simulated, or built comprehensive datasets for this detection. As such, this analytic is not officially supported. If you have any questions or concerns, please reach out to us at research@splunk.com.

Description

The following analytic detects a spike in the number of API calls made to cloud security groups by a user. It leverages data from the Change data model, focusing on successful firewall-related changes. This activity is significant because an abnormal increase in security group API calls can indicate potential malicious activity, such as unauthorized access or configuration changes. If confirmed malicious, this could allow an attacker to manipulate security group settings, potentially exposing sensitive resources or disrupting network security controls.

 1
 2| tstats count as security_group_api_calls values(All_Changes.command) as command from datamodel=Change where All_Changes.object_category=firewall AND All_Changes.status=success by All_Changes.user _time span=1h 
 3| `drop_dm_object_name("All_Changes")` 
 4| eval HourOfDay=strftime(_time, "%H") 
 5| eval HourOfDay=floor(HourOfDay/4)*4 
 6| eval DayOfWeek=strftime(_time, "%w") 
 7| eval isWeekend=if(DayOfWeek >= 1 AND DayOfWeek <= 5, 0, 1) 
 8| join user HourOfDay isWeekend [ summary cloud_excessive_security_group_api_calls_v1] 
 9| where cardinality >=16 
10| apply cloud_excessive_security_group_api_calls_v1 threshold=0.005 
11| rename "IsOutlier(security_group_api_calls)" as isOutlier 
12| where isOutlier=1 
13| eval expected_upper_threshold = mvindex(split(mvindex(BoundaryRanges, -1), ":"), 0) 
14| where security_group_api_calls > expected_upper_threshold 
15| eval distance_from_threshold = security_group_api_calls - expected_upper_threshold 
16| table _time, user, command, security_group_api_calls, expected_upper_threshold, distance_from_threshold 
17| `abnormally_high_number_of_cloud_security_group_api_calls_filter`

Data Source

Name Platform Sourcetype Source Supported App
AWS CloudTrail AWS icon AWS 'aws:cloudtrail' 'aws_cloudtrail' N/A

Macros Used

Name Value

| abnormally_high_number_of_cloud_security_group_api_calls_filter | search * |

abnormally_high_number_of_cloud_security_group_api_calls_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 Defense Evasion
T1078 Valid Accounts Initial Access
KillChainPhase.DELIVERY
KillChainPhase.EXPLOITAITON
KillChainPhase.INSTALLATION
NistCategory.DE_AE
Cis18Value.CIS_13
APT28
APT29
APT33
APT5
Ke3chang
LAPSUS$
APT18
APT28
APT29
APT33
APT39
APT41
Akira
Axiom
Carbanak
Chimera
Cinnamon Tempest
Dragonfly
FIN10
FIN4
FIN5
FIN6
FIN7
FIN8
Fox Kitten
GALLIUM
Ke3chang
LAPSUS$
Lazarus Group
Leviathan
OilRig
POLONIUM
PittyTiger
Sandworm Team
Silence
Silent Librarian
Suckfly
Threat Group-3390
Wizard Spider
menuPass

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
This configuration file applies to all detections of type anomaly. These detections will use Risk Based Alerting.

Implementation

You must be ingesting your cloud infrastructure logs. You also must run the baseline search Baseline Of Cloud Security Group API Calls Per User to create the probability density function model.

Known False Positives

None.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
user $user$ has made $api_calls$ api calls related to security groups, violating the dynamic threshold of $expected_upper_threshold$ with the following command $command$. 15 30 50
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Not Applicable N/A N/A N/A
Unit Passing Dataset aws_cloudtrail aws:cloudtrail
Integration ✅ Passing Dataset aws_cloudtrail aws:cloudtrail

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: 3