Check for Amazon IAM users with the "AWSCompromisedKeyQuarantine", "AWSCompromisedKeyQuarantineV2", and/or "AWSCompromisedKeyQuarantineV3" managed policies in order to identify IAM users with compromised or exposed credentials within your AWS cloud account. These AWS-managed policies are used by the AWS security team to restrict access to IAM user access keys that are suspected of being compromised.
Compromised IAM user access keys can provide unauthorized access to your AWS cloud account, which may result in data breaches, data loss, and other serious security issues. When AWS identifies a potentially exposed IAM user access key (e.g., through scans of public repositories like GitHub) it flags the key as compromised and applies the "AWSCompromisedKeyQuarantine" policy to the impacted IAM user. This quarantine process is designed to prevent unauthorized access and reduce the risk of potential harm.
Audit
To identify Amazon IAM users with compromised credentials by checking for the presence of "AWSCompromisedKeyQuarantine" managed policies, perform the following operations:
Remediation / Resolution
To disable the compromised credentials and update the IAM user permissions in order to remove the quarantine policy, perform the following operations:
References
- AWS Documentation
- AWS Identity and Access Management (IAM) FAQs
- Manage access keys for IAM users
- Secure access keys
- Update access keys
- AWSCompromisedKeyQuarantine
- AWSCompromisedKeyQuarantineV2
- AWSCompromisedKeyQuarantineV3
- AWS Command Line Interface (CLI) Documentation
- list-entities-for-policy
- list-access-keys
- update-access-key
- delete-access-key
- detach-user-policy