Detectionhightest
AWS EC2 Startup Shell Script Change
Detects changes to the EC2 instance startup script. The shell script will be executed as root/SYSTEM every time the specific instances are booted up.
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Launch
Log Source
AWScloudtrail
ProductAWS← raw: aws
Servicecloudtrail← raw: cloudtrail
Detection Logic
Detection Logic1 selector
detection:
selection_source:
eventSource: ec2.amazonaws.com
requestParameters.attribute: 'userData'
eventName: ModifyInstanceAttribute
condition: selection_sourceFalse Positives
Valid changes to the startup script
References
MITRE ATT&CK
Rule Metadata
Rule ID
1ab3c5ed-5baf-417b-bb6b-78ca33f6c3df
Status
test
Level
high
Type
Detection
Created
Wed Feb 12
Modified
Tue Jun 07
Author
Path
rules/cloud/aws/cloudtrail/aws_ec2_startup_script_change.yml
Raw Tags
attack.executionattack.t1059.001attack.t1059.003attack.t1059.004