AWS EC2 CreateKeyPair by New Principal from Non-Cloud AS Organization
Identifies the first time a given IAM principal successfully creates an EC2 key pair when the request is sourced from a network whose autonomous system organization is not attributed to common cloud or hyperscaler…
Description
Identifies the first time a given IAM principal successfully creates an EC2 key pair when the request is sourced from a network whose autonomous system organization is not attributed to common cloud or hyperscaler providers in your GeoIP data. Adversaries may call CreateKeyPair to stage SSH access material before launching or accessing instances. A new terms baseline on `user_identity.arn` suppresses repeated noise from the same principal while still surfacing the initial suspicious creation from an unusual egress label.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 3 ATT&CK techniques it maps to.
- Log source category
- event_index
Known benign triggers
- Engineers creating key pairs from home ISP, corporate VPN, or colocation AS names will match until baselined. GeoIP databases vary by vendor; organization labels may differ slightly from the excluded strings (for example alternate Amazon or Google legal names). Tune exclusions on `source.as.organization.name` or principal ARN after validation.
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/APIReference/API_CreateKeyPair.html | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- c8e4f1a2-9b3d-4c5e-a6f7-8b9c0d1e2f3a
- Tagged by the source as
- Data Source: Amazon EC2Data Source: Amazon Web ServicesData Source: AWSData Source: AWS CloudTrailDomain: CloudDomain: IdentityNoise: LowPerformance: NormalPlatform: AWSResources: Investigation GuideRule Type: New TermsService: AWS EC2Tactic: Credential AccessTactic: Lateral MovementTactic: PersistenceUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3