Files
splunk-security_content/detections/cloud/cloud_security_groups_modifications_by_user.yml
Nasreddine Bencherchali 11c909f725 Add YAML Formatting Job (#3889)
* Add YAML formatting and validation infrastructure

- Add yamlfmt configuration (.yamlfmt) with 4-space indent, LF line endings
- Add yamllint configuration (.yamllint) for syntax validation (detections/ only)
- Add pre-commit hook for automatic YAML formatting
- Add CI validation script with unified error output
- Add GitHub Actions workflow for PR validation
- Add documentation for setup and usage
- Support custom yamlfmt binary path via --yamlfmt-path flag

* comment yaml check from pre-commit

* apply yamlfmt

* Update yaml-validation.yml

* Update yaml-validation.yml

* application folder search formatting

* cloud folder search formatting

* web folder search formatting

* network folder search formatting

* endpoint folder search formatting

* resolve first conflict

* apply formatting

* remove additional pipe

* Update README.md

* update versions

* restore and update formatting (#3920)

---------

Co-authored-by: Bhavin Patel <bhavin.j.patel91@gmail.com>
2026-02-26 00:00:35 +05:30

63 lines
3.9 KiB
YAML

name: Cloud Security Groups Modifications by User
id: cfe7cca7-2746-4bdf-b712-b01ed819b9de
version: 6
date: '2026-02-25'
author: Bhavin Patel, Splunk
data_source:
- AWS CloudTrail
type: Anomaly
status: production
description: The following analytic identifies unusual modifications to security groups in your cloud environment by users, focusing on actions such as modifications, deletions, or creations over 30-minute intervals. It leverages cloud infrastructure logs and calculates the standard deviation for each user, using the 3-sigma rule to detect anomalies. This activity is significant as it may indicate a compromised account or insider threat. If confirmed malicious, attackers could alter security group configurations, potentially exposing sensitive resources or disrupting services.
search: |-
| tstats dc(All_Changes.object) as unique_security_groups values(All_Changes.src) as src values(All_Changes.user_type) as user_type values(All_Changes.object_category) as object_category values(All_Changes.object) as objects values(All_Changes.action) as action values(All_Changes.user_agent) as user_agent values(All_Changes.command) as command FROM datamodel=Change
WHERE All_Changes.object_category = "security_group" (All_Changes.action = modified
OR
All_Changes.action = deleted
OR
All_Changes.action = created)
BY All_Changes.user _time span=30m
| `drop_dm_object_name("All_Changes")`
| eventstats avg(unique_security_groups) as avg_changes , stdev(unique_security_groups) as std_changes
BY user
| eval upperBound=(avg_changes+std_changes*3)
| eval isOutlier=if(unique_security_groups > 2 and unique_security_groups >= upperBound, 1, 0)
| where isOutlier=1
| `cloud_security_groups_modifications_by_user_filter`
how_to_implement: This search requries the Cloud infrastructure logs such as AWS Cloudtrail, GCP Pubsub Message logs, Azure Audit logs to be ingested into an accelerated Change datamodel. It is also recommended that users can try different combinations of the `bucket` span time and outlier conditions to better suit with their environment.
known_false_positives: It is possible that legitimate user/admin may modify a number of security groups
references:
- https://attack.mitre.org/techniques/T1578/005/
drilldown_searches:
- name: View the detection results for - "$user$"
search: '%original_detection_search% | search user = "$user$"'
earliest_offset: $info_min_time$
latest_offset: $info_max_time$
- name: View risk events for the last 7 days for - "$user$"
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
earliest_offset: $info_min_time$
latest_offset: $info_max_time$
rba:
message: Unsual number cloud security group modifications detected by user - $user$
risk_objects:
- field: user
type: user
score: 35
threat_objects: []
tags:
analytic_story:
- Suspicious Cloud User Activities
asset_type: Cloud Instance
mitre_attack_id:
- T1578.005
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
security_domain: threat
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1578.005/aws_authorize_security_group/aws_authorize_security_group.json
sourcetype: aws:cloudtrail
source: aws_cloudtrail