Join our Newsletter — 33% off our NHI Course
Home› Guides› Cloud Ransomware Guide: S3 and Azure Blob Encryption…
Guide Cloud Security

Cloud Ransomware Guide: S3 and Azure Blob Encryption Abuse, Deletion and Defences

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 14 min read
On this page

Cloud storage ransomware needs no malware: an attacker with a stolen access key or an over-privileged cloud identity can encrypt objects with a key only they hold, delete backups and versions, or simply copy the data out and destroy the original, all through the provider's own APIs. Endpoint controls such as EDR, application control and tamper protection never see these actions, because nothing runs on a host you manage. This guide explains the three cloud ransomware patterns seen in real campaigns on Amazon S3 and Azure Blob Storage, the identity weaknesses that enable them, the storage settings that make them fail, and how to detect and recover. It is for cloud security engineers, incident responders and backup owners. For host-based ransomware defences see the Ransomware Prevention Guide; this page covers what differs in object storage.

Key takeaways

  • It is an identity attack first. Every documented cloud storage ransomware case started with a valid credential: leaked long-term AWS access keys in the Codefinger campaign, a synced Global Administrator account without MFA in Storm-0501. Removing long-term keys and standing privilege removes most of the risk.
  • Customer-supplied encryption keys are the weapon. S3 SSE-C and Azure customer-provided keys let a caller encrypt data with a key the provider never stores. AWS now disables SSE-C by default on new buckets and advises keeping it disabled unless a workload needs it.
  • Versioning without a lock is not protection. An attacker who can encrypt can usually also delete old versions, set lifecycle expiry or remove an unlocked immutability policy. Only compliance-mode Object Lock or a locked Azure immutability policy stops a privileged attacker.
  • Put recovery copies out of reach. Backups in the same account, subscription or identity domain are deleted in the same session. Use a separate account or tenant with separate credentials.
  • Detect on the control plane and the data plane. Watch for SSE-C or customer-key headers, lifecycle and retention changes, key listing, lock and immutability policy deletion, and bulk copy or delete operations.

How cloud storage ransomware works

Three patterns recur, often combined in one intrusion.

PatternWhat the attacker doesPermissions neededATT&CK v20
Re-encryption with a customer-supplied keyRewrites each object (for example S3 CopyObject onto itself) with SSE-C, or writes Azure blobs with the x-ms-encryption-key header, using a key generated locally. The provider discards the key, so the data is unreadable without the attackerS3: s3:GetObject and s3:PutObject. Azure: blob read and write, or Shared KeyT1486 Data Encrypted for Impact
Encryption with a key the attacker controls, then key deletionCreates a new key vault and customer-managed key, applies it through encryption scopes, then deletes the keyKey Vault creation, storage account writeT1486
Exfiltrate and destroyCopies data to attacker storage, then deletes objects, versions, snapshots, backups, and in Azure whole storage accounts and recovery vault containersRead plus delete; often Owner-level for backupsT1530, T1537, T1485, T1490
Scheduled deletionAdds a lifecycle rule that expires objects or versions within days, creating a deadlines3:PutLifecycleConfiguration or equivalentT1485.001 Lifecycle-Triggered Deletion

None of these exploits a provider vulnerability. AWS's incident response team describes the S3 pattern as attackers using valid customer credentials with an ordinary encryption feature, and Microsoft describes Storm-0501 as cloud-native ransomware that relies on cloud functions rather than malware.

Lessons from incidents

Codefinger: SSE-C on Amazon S3 (2025)

In the Codefinger S3 ransomware campaign, reported by Halcyon in January 2025, the attacker used leaked or stolen long-term AWS access keys that had s3:GetObject and s3:PutObject, re-encrypted objects with SSE-C keys generated locally, and used the lifecycle API to schedule the encrypted objects for deletion within seven days. CloudTrail records only an HMAC of an SSE-C key, which cannot be used to rebuild it. The lessons are specific: the credential was a long-term key, the permissions were ordinary read and write, and nothing in the bucket configuration prevented SSE-C or fast lifecycle expiry.

Storm-0501: Azure storage and backups (2025)

Microsoft's August 2025 report on Storm-0501 describes the Azure version. After pivoting from on-premises Active Directory through Entra Connect Sync, the actor took over a synchronised Global Administrator account that had no MFA method registered, used elevateAccess to gain User Access Administrator over all subscriptions, and assigned itself Owner. It enabled public access on storage accounts, retrieved account keys with listKeys, exfiltrated with AzCopy, then deleted snapshots, VM restore points, storage accounts and Recovery Services protection containers. Where resource locks or immutability policies blocked deletion, it deleted the locks and the immutability policies, which shows those policies had not been locked. For data still protected, it created a key vault and customer-managed key, encrypted blobs through encryption scopes, and deleted the key; Microsoft notes Key Vault soft delete allowed recovery of that key. See the Storm-0501 hybrid cloud attacks page for the identity pivot.

Both cases are consistent with the wider pattern NHI Mgmt Group tracks: the Football Australia AWS keys exposure shows how keys left in public code can open many buckets at once.

Close the identity paths first

  • Remove long-term cloud keys: AWS recommends IAM roles, IAM Roles Anywhere and IAM Identity Center so that workloads and people use short-lived STS credentials. Inventory and retire IAM user access keys, starting with any that have S3 write. See the AWS IAM Policies and Roles Guide.
  • Disable Azure Shared Key: set AllowSharedKeyAccess to false so a role with listKeys cannot turn into unattributed full data access. See the Azure Storage Security Guide.
  • Separate write from delete and from policy: application roles should rarely need s3:DeleteObjectVersion, s3:PutLifecycleConfiguration, s3:PutEncryptionConfiguration, s3:PutBucketPolicy or s3:BypassGovernanceRetention. In Azure, storage data roles should not come with Owner or Contributor on the account.
  • Protect the top of the hierarchy: Storm-0501 went from Global Administrator to Owner on every subscription. Phishing-resistant MFA, pre-registered MFA for privileged accounts, cloud-only admin accounts and alerting on elevateAccess are storage controls in practice. See the Microsoft Entra Connect and Cloud Sync Hardening Guide.
  • Scan for leaked keys: block AWS access keys, storage connection strings and SAS signatures in code hosts, and rotate on any finding. See the Cloud Secrets Managers Guide.

Storage controls that make the attack fail

Amazon S3

  • Block SSE-C: since April 2026, S3 disables SSE-C for new writes on new general purpose buckets and on existing buckets in accounts with no SSE-C objects. Confirm and enforce it: the bucket default encryption setting BlockedEncryptionTypes with EncryptionType ["SSE-C"] rejects SSE-C writes, copies, multipart uploads and replication with HTTP 403. Changing it needs s3:PutEncryptionConfiguration, so restrict that permission. AWS also documents denying s3:PutObject requests that carry the SSE-C algorithm header through a bucket policy or an AWS Organizations resource control policy.
  • Versioning: an overwrite creates a new version and the previous one survives, unless the attacker can also delete versions.
  • Object Lock: requires versioning. In governance mode, users with s3:BypassGovernanceRetention can still delete locked versions if they send the bypass header (the console does by default). In compliance mode no user, including the root user, can delete or shorten retention; AWS says the only way to delete such an object early is to delete the account. A default retention on the bucket covers every new version. Locks do not stop new versions or delete markers, so the protected version remains recoverable.
  • Replication or backup to another account: AWS recommends replicating or backing up critical data to another bucket, account or Region with S3 replication or AWS Backup. See the AWS Backup Security Guide.
  • Lifecycle guard rails: alert on lifecycle configuration changes and keep noncurrent version expiry longer than your detection and response time.

Azure Blob Storage

  • Locked immutability: a locked time-based retention policy cannot be deleted or shortened by any user, including account administrators. An unlocked policy can be deleted, which is exactly what Storm-0501 did. Lock production policies quickly.
  • Soft delete and versioning: enable blob and container soft delete (Microsoft recommends at least seven days) and versioning so overwrites and deletions can be reversed within the window.
  • Resource locks: a CanNotDelete lock stops account deletion through the management plane but can be removed by anyone with lock delete rights, so restrict Microsoft.Authorization/locks/delete and alert on it.
  • Key Vault purge protection: with soft delete (default 90 days) and purge protection, a deleted customer-managed key can be recovered, which defeats the encrypt-then-delete-key move. Purge protection cannot be switched off once enabled. See the Azure Key Vault Security Guide.
  • Customer-provided keys on requests: Azure Blob accepts an AES-256 key in the x-ms-encryption-key headers and stores only its SHA-256 hash. Microsoft's customer-provided keys documentation does not describe an account-level block equivalent to S3's, so rely on least-privilege data roles, Shared Key disabled, monitoring of these headers in logs, and immutability for critical data.
  • Vaulted backup: Azure Backup and Azure Blob vaulted backup keep copies outside the storage account. Protect the vault itself. See the Azure Backup and Recovery Services Vault Security Guide.

Choosing the protection level

Data typeMinimumRecommendedTrade-off
Backups, logs, recordsVersioning plus soft deleteCompliance-mode Object Lock or locked Azure immutability, copy in a separate account or tenantRetention cannot be shortened; storage cost for the full period
Production application dataVersioning, SSE-C blocked, no long-term keysCross-account replication or backup with independent credentials; governance-mode lock where writes are frequentGovernance mode is bypassable by privileged identities
Temporary or derived dataSSE-C blocked, least privilegeVersioning with short noncurrent expiryRecovery window is short

Small organisations get most of the benefit from three changes: no long-term keys, SSE-C blocked, and a locked or compliance-mode copy of backups in a separate account. Large estates should add organisation-level policies (AWS resource control policies, Azure Policy at management group scope) so new buckets and accounts inherit the controls, and a dedicated recovery account or tenant. See the Backup Identity Isolation Guide.

Detection and monitoring

SignalAWS sourceAzure source
Customer-supplied key useCloudTrail S3 data events with x-amz-server-side-encryption-customer-algorithm; GuardDuty S3 ProtectionBlob resource logs for writes carrying customer-provided keys; Defender for Storage
Retention or protection removedLifecycle configuration changes, PutBucketEncryption, PutObjectLockConfiguration, PutBucketVersioning (suspend), bypass-governance deletesActivity log locks/delete, immutabilityPolicies/delete, soft delete or versioning disabled
Key access and creationNew IAM access keys, unusual key use from new IPslistKeys, new key vaults and keys, encryptionScopes/write, key deletion
Privilege escalationNew policies attached to users and roleselevateAccess, Owner and User Access Administrator assignments
Bulk read, copy, deleteCloudWatch DeleteRequests and PutRequests spikes; CloudTrail CopyObject volumeStorageBlobLogs operation counts; Defender for Storage unusual deletion and large extraction alerts
Exposure changesBucket policy and Block Public Access changesPublic network or anonymous access enabled on an account

Microsoft's Storm-0501 guidance lists relevant Defender alerts across Resource Manager (AzureHound use, elevate access, backup deletion), Storage (unusual deletion, public access change, large extraction) and Key Vault (suspicious recovery). Route these, and the AWS equivalents, to the SIEM with a high-priority playbook. See the Amazon GuardDuty Guide and the Microsoft Defender for Cloud Guide.

Metrics

  • Long-term key count: IAM user access keys and Azure accounts with Shared Key enabled, trending to zero.
  • SSE-C posture: percentage of S3 buckets with SSE-C blocked, target 100% outside documented exceptions.
  • Locked recovery copies: percentage of tier-1 data with a compliance-mode or locked immutable copy in a separate account or tenant.
  • Detection latency: time from a lifecycle, lock or retention change to alert triage.
  • Restore proof: date and duration of the last successful restore test from the isolated copy.

Implementation sequence

  1. Inventory: list buckets and storage accounts by data tier, with versioning, Object Lock or immutability state, SSE-C setting, Shared Key setting and backup location.
  2. Find current SSE-C and customer-key use: query CloudTrail data events and S3 Inventory, and Azure blob logs, before blocking, so legitimate workloads are not broken.
  3. Kill long-term credentials: rotate and remove IAM user keys with S3 write; disable Shared Key in Azure in pilot rings.
  4. Block SSE-C: apply BlockedEncryptionTypes per bucket, then a resource control policy at organisation level once exceptions are known.
  5. Create the isolated recovery copy: separate AWS account or Azure tenant or subscription with its own administrators; enable compliance-mode Object Lock or locked immutability there first, after testing retention in governance or unlocked mode.
  6. Enable detections: CloudTrail S3 data events for critical buckets, Azure storage resource logs, GuardDuty S3 Protection, Defender for Storage, Resource Manager and Key Vault.
  7. Test: run a tabletop and a technical exercise that overwrites and deletes test objects, then restore from the isolated copy and time it.
  8. Roll back safely: SSE-C blocking can be reversed per bucket by setting ["NONE"]; compliance-mode locks and locked immutability cannot be reversed, so pilot retention values on test data before applying them to production.

Responding to a cloud storage ransomware event

  • Contain the identity: deactivate the access key or disable the account, revoke sessions, remove attacker-added role assignments, federated domains, app credentials and keys. Do not change bucket contents until evidence is preserved.
  • Freeze deletion: remove attacker lifecycle rules, re-enable versioning, place legal holds on surviving versions, and check soft-deleted items and Key Vault deleted keys before their retention expires.
  • Preserve evidence: export CloudTrail, Activity log, storage and Key Vault logs to a separate account.
  • Assess exfiltration: assume data was copied before destruction, as in Storm-0501, and scope notification obligations.
  • Restore from the isolated copy: verify integrity before restoring. See the Ransomware Response and Recovery Guide and the Cloud Storage Exposure Playbook.

Framework mapping

ControlNIST SP 800-53 Rev. 5NIST CSF 2.0ATT&CK v20 addressed
Short-lived credentials, least privilegeAC-6, IA-5PR.AA-05T1078.004 Cloud Accounts
Block customer-supplied keys, protect key vaultsSC-12PR.DS-01T1486
Versioning, immutability, isolated backupsCP-9PR.DS-11T1485, T1485.001, T1490
Storage and control-plane monitoringSI-4DE.CM-09T1530, T1537, T1619
Containment and recoveryIR-4, CP-10RS.MI-01, RC.RP-01

Common failure patterns

  • Endpoint-only ransomware plans: playbooks that assume encryption happens on hosts, with no runbook for API-driven encryption or deletion.
  • Same-account backups: snapshots, versions and backup vaults reachable by the same Owner or administrator credentials as production.
  • Governance mode and unlocked policies treated as WORM: both can be bypassed or removed by a sufficiently privileged identity.
  • Long-term keys with write access: CI tokens, developer keys and partner integrations with s3:PutObject on production buckets, the precondition for Codefinger.
  • No data events: CloudTrail management events only, so SSE-C use and bulk copy operations are invisible.
  • Key vaults without purge protection: letting an attacker turn customer-managed key encryption into permanent loss.

Practitioner checklist

  • Retire IAM user access keys with S3 write and disable Azure Shared Key on production accounts.
  • Confirm SSE-C is blocked on every bucket that does not need it and enforce it with an organisation policy.
  • Enable versioning everywhere and compliance-mode Object Lock or locked immutability on backup and records data.
  • Keep a recovery copy in a separate account or tenant with separate administrators.
  • Enable purge protection on key vaults that hold storage customer-managed keys.
  • Restrict lifecycle, encryption configuration, lock and immutability policy permissions to a small admin group.
  • Turn on CloudTrail S3 data events and Azure storage resource logs for critical data.
  • Alert on SSE-C use, lifecycle and retention changes, listKeys, elevateAccess and lock deletion.
  • Add an API-driven storage ransomware scenario to the incident response plan and test a restore.

Standards and references

Related NHI Mgmt Group resources: Ransomware Prevention Guide · Cloud Native Backup and Ransomware Resilience Guide · Amazon S3 Security Guide · Backup Security and Immutable Backup Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.