How the attack works
A snapshot is a complete copy of a disk or a database, and an Amazon Machine Image (AMI) is a set of disk snapshots plus launch settings. Each has a permission list of its own, separate from IAM. ModifySnapshotAttribute adds or removes account IDs in the create-volume permission of an EBS snapshot, and the group all makes the snapshot public. ModifyImageAttribute does the same for the launch permission of an AMI, which can also name an organization or an organizational unit. For manual RDS and Aurora snapshots, ModifyDBSnapshotAttribute and ModifyDBClusterSnapshotAttribute add account IDs, or the value all, to the restore attribute. An account on the list can create volumes from the snapshot, launch the image, or copy and restore the database snapshot, all in its own account.
For an attacker this moves data out without downloading anything. The copy and everything done with it happen in the other account, where the victim's CloudTrail records nothing. The only trace in the victim's account is the permission change, and before it often the creation of the snapshot or image. AWS limits public sharing: only unencrypted EBS snapshots can be made public, an encrypted database snapshot cannot use all, and block public access for snapshots and for AMIs rejects public sharing in a Region while it is on. Sharing with one named account stays possible, and for an encrypted snapshot the other account also needs the customer managed key, so a key policy change or a grant often accompanies it.
EC2 logs all of its API actions as CloudTrail management events, and RDS actions are logged under rds.amazonaws.com. AWS publishes no example record for the four permission calls, and the EC2 calls carry their account lists as nested lists that cannot be matched the same way in every SIEM. The rules here therefore match the event names and leave the reading of the request to triage. No public incident report was used for this page.
What an attacker needs
- Credentials for a principal allowed ec2:ModifySnapshotAttribute, ec2:ModifyImageAttribute, rds:ModifyDBSnapshotAttribute or rds:ModifyDBClusterSnapshotAttribute.
- Often the right to create the snapshot or image first, such as ec2:CreateSnapshot, ec2:CreateImage or rds:CreateDBSnapshot.
- For an encrypted snapshot, a way to let the other account use the customer managed KMS key.
Impact
The other account, or with public sharing any AWS account, obtains a full copy of the disk or database: files, credentials, keys and application data. The copy is read outside the victim's account, where none of it is logged, and removing the permission later does not take back a copy that was already made.
Detection rules
AMI Attribute Modified
Detects ModifyImageAttribute calls to Amazon EC2. The call changes one attribute of an Amazon Machine Image, and the one that matters here is the launch permission: it adds or removes AWS account IDs, organizations, organizational units or a user group, and an account that holds launch permission can start instances from the image in its own account. The EC2 API reference lists two other attributes the same call can change (description and imdsSupport), and those calls match as well. AWS documents that all EC2 API actions are logged as management events and publishes no example record for this one, so the rule matches the event name only. Read the request and look for launch permission entries that are added, for account IDs that are not yours and for the group all. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: AMI Attribute Modified
id: e73fea2f-5775-4836-b050-ef63e6133d94
status: experimental
description: >-
Detects ModifyImageAttribute calls to Amazon EC2. The call changes one
attribute of an Amazon Machine Image, and the one that matters here is the
launch permission: it adds or removes AWS account IDs, organizations,
organizational units or a user group, and an account that holds launch
permission can start instances from the image in its own account. The EC2
API reference lists two other attributes the same call can change
(description and imdsSupport), and those calls match as well. AWS
documents that all EC2 API actions are logged as management events and
publishes no example record for this one, so the rule matches the event
name only. Read the request and look for launch permission entries that
are added, for account IDs that are not yours and for the group all.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyImageAttribute.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitor-with-cloudtrail.html
- https://attack.mitre.org/techniques/T1537/
author: Forestall
date: 2026-11-18
tags:
- attack.exfiltration
- attack.t1537
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: ec2.amazonaws.com
eventName: ModifyImageAttribute
condition: selection
falsepositives:
- Image pipelines that share golden images with the accounts or the organizational units of the organization after every build. This is common. Add the pipeline roles to a filter_* selection on userIdentity.arn and alert on every other caller.
- Changes to the description or the IMDS setting of an image.
level: low
False positives
- Image pipelines that share golden images with the accounts or the organizational units of the organization after every build. This is common. Add the pipeline roles to a filter_* selection on userIdentity.arn and alert on every other caller.
- Changes to the description or the IMDS setting of an image.
Block Public Access for EBS Snapshots or AMIs Disabled
Detects DisableSnapshotBlockPublicAccess and DisableImageBlockPublicAccess calls to Amazon EC2. Both settings apply to the whole account in one Region. The EC2 API reference says that after block public access for snapshots is disabled, users can publicly share snapshots in that Region, and that snapshots which were already shared publicly become publicly available again. For AMIs, disabling the setting removes the restriction on sharing images publicly. Nothing is shared by the call itself: it is the step that has to come before a public share. AWS documents that all EC2 API actions are logged as management events, and the two calls take no parameter that needs reading. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: Block Public Access for EBS Snapshots or AMIs Disabled
id: 8795166d-2b7d-4f54-a922-8f57bd69b1dd
status: experimental
description: >-
Detects DisableSnapshotBlockPublicAccess and DisableImageBlockPublicAccess
calls to Amazon EC2. Both settings apply to the whole account in one
Region. The EC2 API reference says that after block public access for
snapshots is disabled, users can publicly share snapshots in that Region,
and that snapshots which were already shared publicly become publicly
available again. For AMIs, disabling the setting removes the restriction
on sharing images publicly. Nothing is shared by the call itself: it is
the step that has to come before a public share. AWS documents that all
EC2 API actions are logged as management events, and the two calls take
no parameter that needs reading.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisableSnapshotBlockPublicAccess.html
- https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisableImageBlockPublicAccess.html
- https://docs.aws.amazon.com/ebs/latest/userguide/block-public-access-snapshots.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitor-with-cloudtrail.html
- https://attack.mitre.org/techniques/T1537/
author: Forestall
date: 2026-11-18
tags:
- attack.exfiltration
- attack.t1537
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: ec2.amazonaws.com
eventName:
- DisableSnapshotBlockPublicAccess
- DisableImageBlockPublicAccess
condition: selection
falsepositives:
- Accounts that publish public AMIs or public snapshots as part of their business, such as software vendors. That is a decision for a few known accounts, so alert everywhere else.
level: medium
False positives
- Accounts that publish public AMIs or public snapshots as part of their business, such as software vendors. That is a decision for a few known accounts, so alert everywhere else.
EBS Snapshot Permissions Modified
Detects ModifySnapshotAttribute calls to Amazon EC2. The EC2 API reference describes the call as adding or removing AWS account IDs in a snapshot's list of create-volume permissions, and the group all makes the snapshot public. An account on the list can create volumes from the snapshot in its own account, which gives it the whole disk. AWS documents that all EC2 API actions are logged as management events and publishes no example record for this one. The request carries the accounts as a nested list, which cannot be matched the same way in every SIEM, so the rule matches the event name only. Read the request: entries that are added, account IDs that are not yours and the group all are what matter. Calls that remove an account also match. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: EBS Snapshot Permissions Modified
id: 67d13520-b851-4d86-a113-0d9ed746a8d9
status: experimental
description: >-
Detects ModifySnapshotAttribute calls to Amazon EC2. The EC2 API reference
describes the call as adding or removing AWS account IDs in a snapshot's
list of create-volume permissions, and the group all makes the snapshot
public. An account on the list can create volumes from the snapshot in its
own account, which gives it the whole disk. AWS documents that all EC2 API
actions are logged as management events and publishes no example record
for this one. The request carries the accounts as a nested list, which
cannot be matched the same way in every SIEM, so the rule matches the
event name only. Read the request: entries that are added, account IDs
that are not yours and the group all are what matter. Calls that remove
an account also match.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySnapshotAttribute.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitor-with-cloudtrail.html
- https://docs.aws.amazon.com/ebs/latest/userguide/ebs-modifying-snapshot-permissions.html
- https://attack.mitre.org/techniques/T1537/
author: Forestall
date: 2026-11-18
tags:
- attack.exfiltration
- attack.t1537
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: ec2.amazonaws.com
eventName: ModifySnapshotAttribute
condition: selection
falsepositives:
- Backup and disaster recovery tools that share snapshots with a backup account of the same organization, and image pipelines that share the snapshots behind an AMI. They use the same roles every time, so add those roles to a filter_* selection on userIdentity.arn.
level: medium
False positives
- Backup and disaster recovery tools that share snapshots with a backup account of the same organization, and image pipelines that share the snapshots behind an AMI. They use the same roles every time, so add those roles to a filter_* selection on userIdentity.arn.
RDS Snapshot Attribute Modified
Detects ModifyDBSnapshotAttribute and ModifyDBClusterSnapshotAttribute calls to Amazon RDS. The RDS API reference describes them as the way to share a manual DB snapshot or DB cluster snapshot: the attribute restore takes a list of AWS account IDs that may copy or restore the snapshot, and the value all makes it public, so that any AWS account can copy or restore it. A restored snapshot is the whole database. RDS logs its API calls in CloudTrail under rds.amazonaws.com, and AWS publishes no example record for these two calls, so the rule matches the event names only. Read the attribute name and the values added in the request. Calls that remove an account also match. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.
title: RDS Snapshot Attribute Modified
id: b7a0b829-70d5-435f-acd8-11074c0cc55c
status: experimental
description: >-
Detects ModifyDBSnapshotAttribute and ModifyDBClusterSnapshotAttribute
calls to Amazon RDS. The RDS API reference describes them as the way to
share a manual DB snapshot or DB cluster snapshot: the attribute restore
takes a list of AWS account IDs that may copy or restore the snapshot, and
the value all makes it public, so that any AWS account can copy or restore
it. A restored snapshot is the whole database. RDS logs its API calls in
CloudTrail under rds.amazonaws.com, and AWS publishes no example record
for these two calls, so the rule matches the event names only. Read the
attribute name and the values added in the request. Calls that remove an
account also match.
It also matches attempts that failed (errorCode present): check errorCode,
because an unauthorized attempt is worth seeing.
references:
- https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBSnapshotAttribute.html
- https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_ModifyDBClusterSnapshotAttribute.html
- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/logging-using-cloudtrail.html
- https://attack.mitre.org/techniques/T1537/
author: Forestall
date: 2026-11-18
tags:
- attack.exfiltration
- attack.t1537
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: rds.amazonaws.com
eventName:
- ModifyDBSnapshotAttribute
- ModifyDBClusterSnapshotAttribute
condition: selection
falsepositives:
- Database teams that share a snapshot with another account of the organization, for example to refresh a test environment or for a migration. Confirm the change record, and add roles that do this routinely to a filter_* selection on userIdentity.arn.
level: medium
False positives
- Database teams that share a snapshot with another account of the organization, for example to refresh a test environment or for a migration. Confirm the change record, and add roles that do this routinely to a filter_* selection on userIdentity.arn.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Snapshot or image created and shared by the same principal
Backup jobs create snapshots and never share them, and image pipelines share images they did not just create by hand. One principal that creates a snapshot or image and changes its permissions within the hour is doing what exfiltration through sharing looks like.
- A
CreateSnapshot,CreateSnapshots,CopySnapshotorCreateImageevent fromec2.amazonaws.com, or aCreateDBSnapshotorCreateDBClusterSnapshotevent fromrds.amazonaws.com. Note the caller inuserIdentity.arnand the ID or identifier of what was created. - Within 60 minutes the same caller makes a
ModifySnapshotAttribute,ModifyImageAttribute,ModifyDBSnapshotAttributeorModifyDBClusterSnapshotAttributecall for that snapshot or image. - Read the accounts or the value all that the second call adds.
EventsCreateSnapshotCreateImageCreateDBSnapshotModifySnapshotAttributeModifyImageAttributeModifyDBSnapshotAttribute
LimitsImage pipelines and cross-account backup tools do this on purpose, from known roles. The 60 minutes are a starting point. An attacker who shares a snapshot that already existed shows only the second event.
Snapshot or image shared with an account that is not yours
Sharing with one account is an ordinary call with an account ID in it. Whether the account belongs to an attacker or to your own organization is not in the event and needs your own account list.
- Collect
ModifySnapshotAttributeandModifyImageAttributeevents fromec2.amazonaws.comandModifyDBSnapshotAttributeandModifyDBClusterSnapshotAttributeevents fromrds.amazonaws.com. - Extract the account IDs that the request adds: the user IDs of the create-volume or launch permission, or the values added to the restore attribute.
- Compare each ID with the accounts of your organization and the third parties you have approved, and alert when an ID is on neither list or when the value is all.
EventsModifySnapshotAttributeModifyImageAttributeModifyDBSnapshotAttributeModifyDBClusterSnapshotAttribute
LimitsIt needs a current list of your accounts. The account lists are request parameters of the EC2 and RDS API references, and AWS publishes no example record that shows where the events carry them, so confirm the fields in your own events first.
Triage
- Identify the caller (userIdentity.arn), the source IP address and the user agent, and the snapshot or image named in the request. Is the caller a backup or image pipeline role?
- Read the request. For an EBS snapshot look at the create-volume permission entries that were added (account IDs, or the group all), for an AMI at the launch permission entries, and for a database snapshot at the values added to the restore attribute.
- Compare every account ID with your own accounts. The value all means every AWS account.
- Check whether the snapshot or image was created shortly before by the same caller, and from which volume, instance or database.
- For an encrypted snapshot, look for a PutKeyPolicy or CreateGrant event on its KMS key that admits the same account.
Response
Once the attack is confirmed:
- Stop the sharing. Remove the account or the group all from the permissions of the snapshot or image, and turn block public access back on if it was disabled.
- Contain the identity that made the change by deactivating its access keys or revoking its role sessions.
- Assume that the snapshot was copied. Rotate the credentials, keys and tokens stored on the disk or in the database, and tell the owners of the data.
- Remove key policy statements and grants that let the outside account use the KMS key of the snapshot.
- Delete snapshots and images that the attacker created for the purpose, after keeping what the investigation needs.
Mitigation
- Turn on block public access for EBS snapshots and block public access for AMIs in every Region you use, and deny the calls that disable them with a service control policy.
- Encrypt volumes and databases with customer managed KMS keys, so that sharing a snapshot is useless without a second change on the key.
- Allow the four permission calls only to backup and image pipeline roles, not to workload roles or developers.
- Review which snapshots and images are shared, and with whom, on a schedule.
Frequently asked questions
Can I see in CloudTrail that the other account copied the snapshot?
Not in your own account. The copy, the restore and everything done with the data run in the other account and are logged there. Your trail holds the permission change and, before it, the creation of the snapshot or image. That is why the permission change is the event to alert on, and why the response assumes the copy was made.
Do these rules tell a public share from a share with one account?
No. They match the calls that change the permissions, including calls that remove an account. AWS publishes no example record for them, and the EC2 calls carry the account list as a nested list. Read the request. The group all for EBS snapshots and AMIs, and the value all for database snapshots, mean every AWS account.
Does encryption prevent a snapshot from being shared?
It prevents public sharing. AWS documents that only unencrypted EBS snapshots can be shared publicly and that an encrypted database snapshot cannot use the value all. A snapshot encrypted with a customer managed key can still be shared with a named account, and that account then also needs to use the key.
Why is there a rule for block public access when nothing was shared yet?
Block public access for snapshots and for AMIs is an account setting per Region that rejects public sharing. Disabling it shares nothing, but AWS documents that snapshots which were already public become publicly available again, and it is the step that has to come before a new public share. Few legitimate tasks need it.
References
- MITRE ATT&CK T1537: Transfer Data to Cloud Account
- Log Amazon EC2 API calls using AWS CloudTrail
- Monitoring Amazon RDS API calls in AWS CloudTrail
- Amazon EC2 API Reference: ModifySnapshotAttribute
- Amazon EC2 API Reference: ModifyImageAttribute
- Amazon RDS API Reference: ModifyDBSnapshotAttribute
- Amazon RDS API Reference: ModifyDBClusterSnapshotAttribute
- Share an Amazon EBS snapshot with other AWS accounts
- Block public access for Amazon EBS snapshots
- Amazon EC2 API Reference: DisableSnapshotBlockPublicAccess
- Amazon EC2 API Reference: DisableImageBlockPublicAccess