Sigma rule: AWS Key Pair Import Activity
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-2e65d6ab966d, updated 2024-12-19T00:00:00.000Z.
Rule
- Title
- AWS Key Pair Import Activity
- Status
- experimental
- Level
- medium
- Author
- Ivan Saakov
- Date
- 2024-12-19
- File
- rules/cloud/aws/cloudtrail/aws_ec2_import_key_pair_activity.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the import of SSH key pairs into AWS EC2, which may indicate an attacker attempting to gain unauthorized access to instances. This activity could lead to initial access, persistence, or privilege escalation, potentially compromising sensitive data and operations.
Log source
- product
- aws
- service
- cloudtrail
Detection
selection:
eventSource: 'ec2.amazonaws.com'
eventName: 'ImportKeyPair'
condition: selectionFalse positives (as the rule lists them)
- Legitimate administrative actions by authorized users importing keys for valid purposes.
- Automated processes for infrastructure setup may trigger this alert.
- Verify the user identity, user agent, and source IP address to ensure they are expected.
Tags
- attack.initial-access
- attack.stealth
- attack.t1078
- attack.persistence
- attack.privilege-escalation
MITRE ATT&CK ids this rule names
References
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/cloud/aws/cloudtrail/aws_ec2_import_key_pair_activity.yml
Sources and licences
SigmaHQ
"AWS Key Pair Import Activity" by Ivan Saakov (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/cloud/aws/cloudtrail/aws_ec2_import_key_pair_activity.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: AWS Key Pair Import Activity",
entity page, dataset version ref-2e65d6ab966d, updated 2024-12-19T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/92f84194-8d9a-4ee0-8699-c30bfac59780 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 92f84194-8d9a-4ee0-8699-c30bfac59780, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.