PIVTR-D
RAWS playbook · Data and storage

S3 bucket exposed or data exfiltrated

The attacker opens a bucket to the internet, grants another account access, or reads objects in bulk. Some share data through presigned URLs, which work without further AWS sign-in until they expire. Block public access first and save the bucket policy as evidence.

Look here

LogSearch for
CloudTrail management eventsChanges to policies, access control lists (ACLs), Block Public Access and replication: PutBucketPolicy, DeleteBucketPolicy, PutBucketAcl, DeleteBucketPublicAccessBlock, PutBucketPublicAccessBlock, DeleteAccountPublicAccessBlock, PutAccountPublicAccessBlock, PutBucketReplication. The API calls PutPublicAccessBlock and DeletePublicAccessBlock appear under these names
CloudTrail data eventsBulk reads, counted per principal and source IP: GetObject, CopyObject, ListObjects. Anonymous reads, with Athena over the trail logs: WHERE eventsource = 's3.amazonaws.com' AND eventname = 'GetObject' AND useridentity.accountid = 'anonymous'
CloudTrail Lake, presigned URLsRequests made with presigned URLs. The userIdentity shows whose credentials signed the URL: WHERE eventSource = 's3.amazonaws.com' AND element_at(additionalEventData, 'AuthenticationMethod') = 'QueryString' AND element_at(requestParameters, 'X-Amz-Expires') IS NOT NULL
S3 server access logsPresigned requests: authtype = 'QueryString' and X-Amz-Expires= in the request URI
GuardDutyFindings for public access changes and unusual reads: Policy:S3/BucketPublicAccessGranted, Policy:S3/BucketAnonymousAccessGranted, Policy:S3/BucketBlockPublicAccessDisabled, Policy:S3/AccountBlockPublicAccessDisabled, Exfiltration:S3/AnomalousBehavior, AttackSequence:S3/CompromisedData
IAM Access AnalyzerBuckets shared with public or unknown principals, shown as active external access findings

Contain

#Item
1Save the current bucket policy as evidence: aws s3api get-bucket-policy --bucket <bucket> > <case>-<bucket>-policy.json
2Block public access on the bucket: aws s3api put-public-access-block --bucket <bucket> --public-access-block-configuration "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true"
3Block public access for the whole account: aws s3control put-public-access-block --account-id <account> --public-access-block-configuration '{"BlockPublicAcls":true,"IgnorePublicAcls":true,"BlockPublicPolicy":true,"RestrictPublicBuckets":true}'
4End live presigned URLs by deactivating the signing access key or revoking the signing role's sessions
5Remove principals from other accounts in the bucket policy, then test access from an unauthenticated client

Eradicate and recover

#Item
1Restore the known-good bucket policy and ACLs, and remove replication rules to unknown destinations
2Resolve each Access Analyzer finding as intended or remove the access behind it
3List the objects read and by whom from data events. Give the list to the Legal advisor for notification deadlines
4Where data events were off, record that object access cannot be ruled out
5Turn on data events for the bucket before return to service
Watch out
  • A presigned URL made with IAM user keys stays valid up to 7 days. Revoking, deleting or deactivating the signing credential ends it.
  • Without data events or server access logs, CloudTrail shows the policy change and no reads.
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.