↳ GitHub sourceAnalytics ruleMedium
AWSCloudTrail - EC2 Startup Shell Script Changed
Description
Identifies changes to the EC2 startup script. The shell script will be executed as root/SYSTEM every time the specific instances are booted up. ref : https://github.com/RhinoSecurityLabs/pacu/blob/master/pacu/modules/ec2__startup_shell_script/main.py
- Rule type
- Scheduled
- Version
- 1.0.1
- Declared status
- Available
- Query frequency
- 15m
- Query period
- 15m
- Trigger
- gt 0
Declared MITRE coverage
Declared sources
Metadata from the source file. No dependencies inferred from KQL.
Connectors
Data types
KQL query
Original query, unchanged.
AWSCloudTrail
| where EventName in~ ("ModifyInstanceAttribute", "CreateLaunchTemplate")
| extend RequestParametersJson = parse_json(RequestParameters)
| where tostring(RequestParametersJson.userData) != ""
| extend userData_ = tostring(RequestParametersJson.userData)
| extend instanceId_ = tostring(RequestParametersJson.instanceId)
| project-away SourceSystem, Category, Type, TenantId, EventVersion, SessionIssuerAccountId
| extend UserName = substring(UserIdentityPrincipalid, indexof_regex(UserIdentityPrincipalid, ":") + 1)
| extend Name = split(UserName,'@')[0],UpnSuffix = split(UserName,'@')[1]
| project TimeGenerated, EventName, UserName, Name, UpnSuffix, instanceId_, AWSRegion, SourceIpAddress, EventSource, UserIdentityArn, EventTypeName
Declared entities
Related content
Links established from declared identifiers and solution manifests.
Source provenance
GitHubDisplayed values come from files in Azure/Azure-Sentinel. They describe the published template, not your workspace configuration.
- Commit
9800e51↗- Source identifier
f8577e4d-8481-437b-a94e-06f615985668
GSTEP / CATALOG TRACKING
Added to catalog : 16 Sept 2026 · 05:49 UTC
Last change observed : 16 Sept 2026 · 05:49 UTC