AWS Credential Access GetPasswordData
Description
The following analytic identifies more than 10 GetPasswordData API calls within a 5-minute window in your AWS account. It leverages AWS CloudTrail logs to detect this activity by counting the distinct instance IDs accessed. This behavior is significant as it may indicate an attempt to retrieve encrypted administrator passwords for running Windows instances, which is a critical security concern. If confirmed malicious, attackers could gain unauthorized access to administrative credentials, potentially leading to full control over the affected instances and further compromise of the AWS environment.
Query · spl
`cloudtrail` eventName=GetPasswordData eventSource = ec2.amazonaws.com
| bin _time span=5m
| rename user_name as user
| stats count min(_time) as firstTime max(_time) as lastTime dc(requestParameters.instanceId) as distinct_instance_ids
BY signature dest user
user_agent src vendor_account
vendor_region vendor_product
| where distinct_instance_ids > 10
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `aws_credential_access_getpassworddata_filter`
Implementation guide
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs. We encourage the users to adjust the values of distinct_instance_ids and tweak the span value according to their environment.
Known false positives
- Administrator tooling or automated scripts may make these calls but it is highly unlikely to make several calls in a short period of time.
Analyst notes
Known false positives: Administrator tooling or automated scripts may make these calls but it is highly unlikely to make several calls in a short period of time.