RAWS playbook · Data and storage
Secrets Manager and Parameter Store secrets stolen
The attacker uses an identity that can read secrets and pulls the values in bulk. A typical run lists secrets with ListSecrets or DescribeParameters, reads them with BatchGetSecretValue or a recursive GetParametersByPath, and uses the values outside AWS, where your logs do not reach. Stop the identity first, then change every secret it read at the source system.
Look here
| Log | Search for |
|---|---|
| CloudTrail event history, Secrets Manager | Secret reads and listings, kept 90 days per Region with no setup: GetSecretValue, BatchGetSecretValue, ListSecrets. A batch call also writes one GetSecretValue entry per secret: aws cloudtrail lookup-events --region <region> --lookup-attributes AttributeKey=EventSource,AttributeValue=secretsmanager.amazonaws.com |
| CloudTrail event history, Parameter Store | Parameter reads. Read withDecryption in the request: GetParameter, GetParameters, GetParametersByPath, DescribeParameters |
| CloudTrail Lake | Every secret and parameter read, in time order: SELECT eventTime, eventName, userIdentity.arn, sourceIPAddress, userAgent, errorCode FROM <event-data-store-id> WHERE eventName IN ('GetSecretValue','BatchGetSecretValue','GetParameter','GetParameters','GetParametersByPath') ORDER BY eventTime |
| CloudTrail, KMS | The decryption that follows each read: Decrypt, with an encryption context that names the secret (SecretARN) or the parameter (PARAMETER_ARN) |
| CloudTrail, changes to secrets | Changes to secrets, parameters, policies and replicas: PutResourcePolicy, DeleteResourcePolicy, ReplicateSecretToRegions, UpdateSecret, PutSecretValue, DeleteSecret, RestoreSecret, and for parameters PutParameter, DeleteParameter, PutResourcePolicy |
| Secret resource policy | Other principals that can read a secret: aws secretsmanager get-resource-policy --secret-id <secret> |
| Shared parameters | Parameters shared with other accounts: aws ssm describe-parameters --shared |
| GuardDuty | Unusual secret reads. The first finding below covers GetSecretValue and BatchGetSecretValue and flags anomalies only. No finding names a Parameter Store API: CredentialAccess:IAMUser/AnomalousBehavior, AttackSequence:IAM/CompromisedCredentials |
| IAM | What the identity could read: aws iam simulate-principal-policy --policy-source-arn <arn> --action-names secretsmanager:GetSecretValue ssm:GetParameter kms:Decrypt |
Contain
| # | Item |
|---|---|
| 1 | Export the events above for every Region and list the secrets and parameters read. See Evidence |
| 2 | Stop the identity. Open Leaked IAM user access keys, Stolen EC2 instance role credentials or Console or Identity Center account takeover |
| 3 | Deny secret reads to the identity. The inline policy denies secretsmanager:GetSecretValue, secretsmanager:BatchGetSecretValue, ssm:GetParameter, ssm:GetParameters, ssm:GetParametersByPath and kms:Decrypt: aws iam put-role-policy --role-name <role> --policy-name ir-deny-secrets --policy-document file://deny-secrets.json |
| 4 | Replace a secret resource policy the attacker changed with the known-good one: aws secretsmanager put-resource-policy --secret-id <secret> --resource-policy file://known-good.json --block-public-policy |
| 5 | Remove a parameter share the attacker added: aws ram disassociate-resource-share --resource-share-arn <arn> --principals <account> |
| 6 | Restore secrets the attacker scheduled for deletion. A force delete cannot be restored: aws secretsmanager restore-secret --secret-id <secret> |
| 7 | Rotate the highest-impact secrets now, such as database admin users and cloud provider keys. See Eradicate |
| 8 | Delete secrets the attacker created after the evidence is saved destructive: aws secretsmanager delete-secret --secret-id <secret> --recovery-window-in-days 7 |
| 9 | Delete parameters the attacker created destructive: aws ssm delete-parameter --name <name> |
Eradicate and recover
| # | Item |
|---|---|
| 1 | Change every credential on the read list at its source, in order of blast radius |
| 2 | For a secret with rotation set up, start a rotation, which runs at once by default. Under alternating users rotation both users stay valid after one rotation, so rotate twice: aws secretsmanager rotate-secret --secret-id <secret> |
| 3 | For a secret without rotation, change the credential at its source and store the new value: aws secretsmanager put-secret-value --secret-id <secret> --secret-string file://new.json |
| 4 | For a parameter, write a new value. Old values stay readable through GetParameterHistory: aws ssm put-parameter --name <name> --type SecureString --key-id <key> --value <new> --overwrite |
| 5 | Move sensitive secrets to a customer managed key, then write a new version: aws secretsmanager update-secret --secret-id <secret> --kms-key-id <key-arn> |
| 6 | Grant reads on single secret ARNs and single parameters. Remove ssm:GetParametersByPath from broad path grants |
Watch out
- Rotation moves the stolen value to
AWSPREVIOUS, and Secrets Manager keeps unlabeled versions until more than 100 exist and for at least 24 hours. The old value is harmless only after the source credential changes. - A user with access to a path can read every level below it, and an IAM deny on a child parameter does not stop a recursive
GetParametersByPathon the parent. - The
aws/secretsmanagerkey policy lets every principal authorized for Secrets Manager use the key, sokms:Decryptis no second check until you use a customer managed key. - A secret scheduled for deletion is unreadable at once, and that includes your applications. The recovery window runs from 7 to 30 days, and the default is 30.
AWS documentation: Secrets Manager CloudTrail logging, log entries, KMS encryption, versions, rotation strategies, resource policies and deletion; CLI secretsmanager and ssm commands; Parameter Store KMS encryption, shared parameters and API operations; CloudTrail lookup-events; GuardDuty IAM and attack sequence findings. Checked September 2026.