Credential Exfiltration
AWS Secrets Manager Credential Exfiltration
If the user has access to Secret Manager, it can decrypt the secrets using the web, cli or API
aws iam list-attached-user-policies --user-name NAME Here we can see the permissions:
aws iam get-policy-version --policy-arn ARN --version-id ID aws secretsmanager list-secrets Here we get the secret key ID to describe the secret
aws secretsmanager describe-secret --secret-id NAME aws secretsmanager get-resource-policy --secret-id ID Retrieves the actual value:
Key Management Service (KMS)
If we compromised as an example an S3 with an encrypted file, we can decrypt it using the keys stored in KMS.
Here we can see who can access the key, the description of it and so on:
TIP: Run the previous command in all keys to see who can access it
There is no need to specify the key information because this information is embedded in the encrypted file
Last updated