Suspicious EC2 Key Pair Import via aws (via cloudtrail)

PremiumReviewedSigma · Medium · v1
Product
aws
Service
cloudtrail
Author
HuntRule
Published
2026-10-17
Updated
2026-10-17

ATT&CK techniques

Initial Access → Defense Evasion
  1. Recon

  2. Resource Dev

  3. Execution

  4. Cred Access

  5. Discovery

  6. Lateral Movement

  7. Collection

  8. C2

  9. Exfiltration

  10. Impact

What it detects

This rule detects the AWS ImportKeyPair API call used to upload an attacker-controlled public key so newly launched instances can be accessed. During the SugarCRM cloud intrusion the actor combined ImportKeyPair with RunInstances to establish attacker-usable compute, making an unexpected key import an early sign of cloud resource abuse and persistence.

Related detections9 linkedT1078.004 — drag to rearrange
Suspicious M365 Sign-In With axios Automation User-Agent (via azure)
Suspicious Legacy Authentication via BAV2ROPC User Agent (via m365)
Suspicious Salesforce Data Access via Spoofed Automation User-Agents
Suspicious Okta Application Self-Assignment to All Applications by UNC3944 (via cloud)
Suspicious Help Desk Impersonation via External Microsoft Teams Chat
Suspicious Salesforce Connected App OAuth Authorization from VPN Egress
Suspicious Entra ID Password Spraying via ROPC Grant to Azure CLI App
Suspicious Entra ROPC Password Spray Against Azure CLI Client
Malicious Consent to Known Traitorware Mail Clients via Azure AD
Suspicious EC2 Key Pair Import via aws (via cloudtrail)
Pivot detection · T1078.004 · 9 related

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.