PIVTR-D
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

LogSearch for
CloudTrail event history, Secrets ManagerSecret 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 StoreParameter reads. Read withDecryption in the request: GetParameter, GetParameters, GetParametersByPath, DescribeParameters
CloudTrail LakeEvery 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, KMSThe decryption that follows each read: Decrypt, with an encryption context that names the secret (SecretARN) or the parameter (PARAMETER_ARN)
CloudTrail, changes to secretsChanges to secrets, parameters, policies and replicas: PutResourcePolicy, DeleteResourcePolicy, ReplicateSecretToRegions, UpdateSecret, PutSecretValue, DeleteSecret, RestoreSecret, and for parameters PutParameter, DeleteParameter, PutResourcePolicy
Secret resource policyOther principals that can read a secret: aws secretsmanager get-resource-policy --secret-id <secret>
Shared parametersParameters shared with other accounts: aws ssm describe-parameters --shared
GuardDutyUnusual 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
IAMWhat the identity could read: aws iam simulate-principal-policy --policy-source-arn <arn> --action-names secretsmanager:GetSecretValue ssm:GetParameter kms:Decrypt

Contain

#Item
1Export the events above for every Region and list the secrets and parameters read. See Evidence
2Stop the identity. Open Leaked IAM user access keys, Stolen EC2 instance role credentials or Console or Identity Center account takeover
3Deny 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
4Replace 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
5Remove a parameter share the attacker added: aws ram disassociate-resource-share --resource-share-arn <arn> --principals <account>
6Restore secrets the attacker scheduled for deletion. A force delete cannot be restored: aws secretsmanager restore-secret --secret-id <secret>
7Rotate the highest-impact secrets now, such as database admin users and cloud provider keys. See Eradicate
8Delete secrets the attacker created after the evidence is saved destructive: aws secretsmanager delete-secret --secret-id <secret> --recovery-window-in-days 7
9Delete parameters the attacker created destructive: aws ssm delete-parameter --name <name>

Eradicate and recover

#Item
1Change every credential on the read list at its source, in order of blast radius
2For 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>
3For 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
4For 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
5Move sensitive secrets to a customer managed key, then write a new version: aws secretsmanager update-secret --secret-id <secret> --kms-key-id <key-arn>
6Grant 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 GetParametersByPath on the parent.
  • The aws/secretsmanager key policy lets every principal authorized for Secrets Manager use the key, so kms:Decrypt is 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.

Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.