Skip to main content

More Info:

Your EC2 instance snapshots should not be publicly accessible. This is to avoid exposing your private data.

Risk Level

Critical

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • FedRAMP
  • GDPR
  • HIPAA
  • HITRUST CSF
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST
  • NIST CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • Reserve Bank of India (RBI) Cyber Security Framework
  • Reserve Bank of India (RBI) Master Direction – Information Technology Framework
  • SOC2
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

  1. Sign in to the AWS Management Console.
  2. Navigate to the EC2 service.
  3. Select Snapshots from the navigation pane.
  4. Identify public snapshots:
    • Look for snapshots listed in the console that have permissions set to “all”.
  5. Select the public snapshot.
  6. Modify Snapshot Permissions:
    • Click on Actions > Modify Snapshot Permissions.
    • Remove the “all” group permission if it exists.
    • Add or modify permissions as necessary.
  7. Repeat for other public snapshots:
    • Repeat the above steps for all public snapshots identified.

  1. List EBS Snapshots:
  1. Identify public snapshots:
    • Look for snapshots where the volume permissions include the “all” group.
  2. Modify Snapshot Permissions:
Replace SNAPSHOT_ID with the identifier of the public snapshot. 4. Repeat for other public snapshots:
  • Repeat the modification command for all public snapshots identified.
Here’s a Python script to identify and remediate public EBS snapshots:
This Python script identifies public EBS snapshots by checking if the permissions include the “all” group and then remediates them by removing the permission.Ensure to have appropriate IAM permissions for modifying EBS snapshots if you’re using AWS CLI or Python script.
This change mirrors --operation-type remove --group-names all by ensuring no aws_ebs_snapshot_create_volume_permission exists with group_names = ["all"]; it only alters permissions and does not replace the snapshot itself.To verify, terraform plan should show the aws_ebs_snapshot_create_volume_permission resource that had group_names = ["all"] being destroyed (or updated to remove group_names = ["all"]) with no replacement of the aws_ebs_snapshot resource.

Additional Reading: