Public EBS Snapshot Remediation
A snapshot tagged as sensitive was unencrypted and shared with every AWS account. I removed the public permission and created an encrypted copy with a customer-managed KMS key.
Status: REMEDIATED · VERIFIED
TOOLS
Objective
I set out to find publicly shared EBS snapshots, judge whether sensitive data was exposed, remove the public sharing, and replace the snapshot with an encrypted copy.
Scenario
A security review, prompted by known snapshot-sharing risks, pointed to an EBS snapshot linked to sensitive data that had been made public. I needed to confirm the sharing and encryption state, remove public access and create an encrypted replacement.
What I found
{
"SnapshotId": "snap-xxxxxxxx",
"CreateVolumePermissions": [{ "Group": "all" }]
}Shared with every AWS account
The snapshot's volume permissions included the all group, which means any AWS account could create a volume from it.
Encrypted: False
State: completed
DataClassification: SensitiveUnencrypted, and tagged sensitive
The same snapshot was not encrypted.
Public and unencrypted together meant a direct path to the data on the volume. Because it had already been exposed for some time, the response also has to include reviewing the snapshot's contents and rotating any credentials or keys stored on that volume.
What I did
- Found the snapshot
I identified the account, region and the lab snapshot.
- Read its metadata
It was unencrypted and classified as sensitive.
- Checked who it was shared with
createVolumePermissionshowedGroup: all. - Removed public sharing
I removed the
allgroup permission. - Made an encrypted copy
I located the customer-managed key
alias/lab-ebs-keyand copied the snapshot with encryption on.
EVIDENCE
aws ec2 modify-snapshot-attribute --snapshot-id "$SNAPSHOT_ID" \
--attribute createVolumePermission --operation-type remove --group-names all
ENCRYPTED_SNAP=$(aws ec2 copy-snapshot --source-region "$AWS_REGION" \
--source-snapshot-id "$SNAPSHOT_ID" --region "$AWS_REGION" \
--encrypted --kms-key-id alias/lab-ebs-key \
--query SnapshotId --output text)Validation
The original snapshot is no longer shared, and the replacement is encrypted and complete:
Original CreateVolumePermissions: []
Encrypted copy: Encrypted true, State completedBefore and after
| CONTROL | BEFORE | AFTER |
|---|---|---|
| Public sharing | Group: all | Removed |
| Encryption | False | Encrypted copy |
| KMS protection | Not used | Customer-managed alias/lab-ebs-key |
| Snapshot state | Completed | Completed |
What I recommend
- 01Audit EBS snapshots regularly for public sharing.
- 02Do not share snapshots with
Group: allunless it is explicitly required and approved. - 03Encrypt sensitive snapshots with customer-managed KMS keys.
- 04After a confirmed exposure, review what the snapshot held and rotate any credentials or keys on it.
- 05Add detection for newly public snapshots.
“Securing EBS snapshots means checking both who they are shared with and whether they are encrypted. An unencrypted public snapshot hands the volume's data to anyone.”
SKILLS IT PROVES
- Cloud Security
- EBS Snapshot Security
- AWS KMS
- Encryption at Rest
- Access Control
- Least Privilege
- Data Protection
- AWS CLI