AWS Key Pair Import Activity

Original Source: [Sigma source]
Title: AWS Key Pair Import Activity
Status: experimental
Description: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.
References:
  -https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html
Author: Ivan Saakov
Date: 2024-12-19
modified:None
Tags:
  • -'attack.initial-access'
  • -'attack.t1078'
  • -'attack.persistence'
  • -'attack.privilege-escalation'
Logsource:
  • product: aws
  • service: cloudtrail
Detection:
  selection:
    eventSource: 'ec2.amazonaws.com'
    eventName: 'ImportKeyPair'
  condition:selection
Falsepositives:
  -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.
Level: medium