Azure Storage Blob Upload WITH CPK Encryption Error
Description
Detects potential CPK-based ransomware attacks on Azure Storage by correlating blob uploads with subsequent Customer-Provided Key (CPK) encryption errors on the same blob path. This pattern indicates an attacker has encrypted blobs using CPK and legitimate users are now unable to access their data without the attacker's encryption key. This technique allows attackers to hold data hostage while maintaining access themselves, as only they possess the customer-provided encryption key needed to decrypt the blobs.
Query
Detection:
- Group:
- ID: Blob Upload
RuleID: Azure.MonitorActivity.Storage.Blob.Uploaded
- ID: CPK Access Denied
RuleID: Azure.MonitorActivity.Storage.Blob.CPKEncryptionDetected
MatchCriteria:
field_name:
- GroupID: Blob Upload
Match: p_alert_context.blob_path
- GroupID: CPK Access Denied
Match: p_alert_context.blob_path
Schedule:
RateMinutes: 1440
TimeoutMinutes: 5
LookbackWindowMinutes: 1800
Rule dependencies
⚠ Higher-order rule. It fires on other rules' alerts, not on raw events, so it cannot fire on its own. Deploy the rules it depends on too.
Depends on
-
correlates · Panther group
Azure.MonitorActivity.Storage.Blob.CPKEncryptionDetectedwithin 1800m -
correlates · Panther group
Azure.MonitorActivity.Storage.Blob.Uploadedwithin 1800m
Analyst notes
- Query Azure MonitorActivity logs for all PutBlob operations by the callerIpAddress in the 6 hours before the alert to identify the full scope of encrypted blobs
- Check Azure AD sign-in logs for authentication events from the same callerIpAddress in the 24 hours before the first upload to determine if credentials were compromised
- Search for LISTACCOUNTSAS or LISTKEYS operations on the affected storage_account in the 48 hours before the uploads to identify potential credential theft