Sigma rule: AWS EC2 Startup Shell Script Change

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-4786a41c8c04, updated 2022-06-07T00:00:00.000Z.

Rule

Title
AWS EC2 Startup Shell Script Change
Status
test
Level
high
Author
faloker
Date
2020-02-12
Modified
2022-06-07
File
rules/cloud/aws/cloudtrail/aws_ec2_startup_script_change.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

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.

Log source

product
aws
service
cloudtrail

Detection

selection_source:
    eventSource: ec2.amazonaws.com
    requestParameters.attribute: 'userData'
    eventName: ModifyInstanceAttribute
condition: selection_source

False positives (as the rule lists them)

  • Valid changes to the startup script

Tags

  • attack.execution
  • attack.t1059.001
  • attack.t1059.003
  • attack.t1059.004

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/cloud/aws/cloudtrail/aws_ec2_startup_script_change.yml

Sources and licences

  • SigmaHQ

    "AWS EC2 Startup Shell Script Change" by faloker (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/cloud/aws/cloudtrail/aws_ec2_startup_script_change.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: AWS EC2 Startup Shell Script Change",
entity page, dataset version ref-4786a41c8c04, updated 2022-06-07T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/1ab3c5ed-5baf-417b-bb6b-78ca33f6c3df (accessed 2026-11-03).
Underlying source: SigmaHQ rule 1ab3c5ed-5baf-417b-bb6b-78ca33f6c3df, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.