AWS EC2 ImportKeyPair Activity Monitoring (CloudTrail)

Flags CloudTrail EC2 ImportKeyPair events that may indicate newly imported SSH key access setup.

FreeReviewedSigma · Medium · v5
Product
aws
Service
cloudtrail
Author
Ivan Saakov (SigmaHQ), DRL 1.1
Published
2024-12-19
Updated
2026-07-31

ATT&CK techniques

Initial Access → Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Defense Evasion

  6. Cred Access

  7. Discovery

  8. Lateral Movement

  9. Collection

  10. C2

  11. Exfiltration

  12. Impact

What it detects

This rule flags CloudTrail events where AWS EC2 ImportKeyPair is called to import an SSH key pair. Importing keys can enable attackers to establish or expand access to EC2 instances, potentially supporting initial access, persistence, or privilege escalation. The detection relies on CloudTrail telemetry fields matching eventSource ec2.amazonaws.com and eventName ImportKeyPair.

Related detections9 linkedT1078 — drag to rearrange
Possible Next.js Middleware Auth Bypass via X-Middleware-Subrequest Header (CVE-2025-29927)
Suspicious Brutforce with Denied Access Due to Account Restrictions Policies (via security)
Suspicious Success Login Attempt on a Windows OpenSSH Server (via security)
Suspicious SQL Server - Connection Attempt Using a Disabled Account (via application)
Suspicious Lateral Movement Detection - Based on "special Groups" Feature (via security)
Suspicious Snowflake Anomalous Client Application Associated With UNC5537 (via cloud)
Malicious Network Login Performed to Multiple Targets (via security)
Malicious RDP Reconnaissance with Valid Credentials Performed on Multiple Hosts (via security)
Malicious Local Administrator Added by Atera RMM Agent
AWS EC2 ImportKeyPair Activity Monitoring (CloudTrail)
Pivot detection · T1078 · 9 related

Changelog

v5
  1. v5
    Candidate ingested via manual entry.2026-07-31
  2. v4
    Candidate ingested via manual entry.2026-07-31
  3. v3
    Candidate ingested via manual entry.2026-07-31
  4. v2
    Candidate ingested via manual entry.2026-07-31
  5. v1
    No changelog recorded for this version.2026-07-30

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