
Summary
Detects the first-time occurrence within a specified lookback window where an identity launches an EC2 instance with user data supplied in the RunInstances API (cloud-init). User data can execute code at boot, enable persistence, or exfiltrate credentials from a freshly created instance controlled by an attacker. This rule uses New Terms to flag a rare combination of cloud.account.id, user.name, and source.as.organization.name for an account/principal/network origin that has not appeared in history. The query targets AWS CloudTrail RunInstances events with userData, and excludes Terraform-driven, Auto Scaling, and CloudFormation launches to reduce false positives. Includes triage guidance, investigation steps, and remediation recommendations.
Categories
- Cloud
- AWS
Data Sources
- Cloud Service
- Instance
ATT&CK Techniques
- T1578.002
- T1578
Created: 2026-11-11