AWS EC2 Startup Script Modified on Stopped Instance
A successful EC2 StopInstances request was followed within one hour by a successful ModifyInstanceAttribute request targeting userData on the same instance, by the same IAM principal. This may indicate an attempt to…
Description
A successful EC2 StopInstances request was followed within one hour by a successful ModifyInstanceAttribute request targeting userData on the same instance, by the same IAM principal. This may indicate an attempt to change instance startup behavior or establish persistence. These CloudTrail events do not confirm that the modified user-data script executed.
Detection logic
Detection requirements
- Platform
- IaaS
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- aws_cloudtrail
Known benign triggers
- Authorized administrators and infrastructure automation may stop instances and update their user data. Review the IAM principal, instance, change window, and approved automation before escalating.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html | Only this detection cites it |
| stratus-red-team.cloud/attack-techniques/AWS/aws.execution.ec2-user-data/ | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 84578867-02bf-475e-9815-6e8e0d798253
- Tagged by the source as
- Suspicious Cloud User ActivitiesAWS AccountcloudSplunk CloudSplunk EnterpriseSplunk Enterprise Securitythreat
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Oct 19, 2026
- Version
- 1