StopInstance WITH ModifyInstanceAttributes
Description
Identifies when StopInstance and ModifyInstanceAttributes CloudTrail events occur in a short period of time. Since EC2 startup scripts cannot be modified without first stopping the instance, StopInstances should be a signal.
Query
Detection:
- Group:
- ID: StopInstance
RuleID: AWS.EC2.StopInstances
- ID: StartupScriptChange
RuleID: AWS.EC2.Startup.Script.Change
MatchCriteria:
field_name:
- GroupID: StopInstance
Match: p_alert_context.instance_ids
- GroupID: StartupScriptChange
Match: p_alert_context.instance_ids
LookbackWindowMinutes: 1800
Schedule:
RateMinutes: 1440
TimeoutMinutes: 5
Rule dependencies
⚠ Higher-order rule. It fires on other rules' alerts, not on raw events, so it cannot fire on its own. Deploy the rules it depends on too.
Depends on
-
correlates · Panther group
AWS.EC2.Startup.Script.Changewithin 1800m -
correlates · Panther group
AWS.EC2.StopInstanceswithin 1800m