Detection rules › Panther

AWS RDS Snapshot Deleted

Status
Experimental
Severity
high
Group by
awsRegion, recipientAccountId, requestParameters.dBSnapshotIdentifier
Log types
AWS.CloudTrail
Tags
AWS, Defense Evasion, Impact, Data Destruction, Indicator Removal, RDS
Reference
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html
Source
github.com/panther-labs/panther-analysis

Detects deletion of RDS snapshots. Attackers delete backups to prevent recovery or hide evidence of data exfiltration. Multiple snapshot deletions may indicate ransomware preparing to encrypt databases without recovery options.

MITRE ATT&CK coverage

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body yaml

AnalysisType: rule
Filename: aws_rds_snapshot_deleted.py
RuleID: "AWS.RDS.SnapshotDeleted"
DisplayName: "AWS RDS Snapshot Deleted"
Enabled: true
Status: Experimental
LogTypes:
  - AWS.CloudTrail
Tags:
  - AWS
  - Defense Evasion
  - Impact
  - Data Destruction
  - Indicator Removal
  - RDS
Severity: High
Description: >
  Detects deletion of RDS snapshots. Attackers delete backups to prevent recovery or hide
  evidence of data exfiltration. Multiple snapshot deletions may indicate ransomware preparing
  to encrypt databases without recovery options.
Runbook: |
  1. Find all snapshot deletion events by the user ARN in the past 24 hours to identify bulk deletion patterns
  2. Check if the deleted snapshot was shared with external accounts in the 7 days before deletion
  3. Look for database deletion or modification events from this user in the 2 hours after this snapshot deletion
Reference: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html
Reports:
  MITRE ATT&CK:
    - TA0040:T1485  # Data Destruction
    - TA0005:T1070  # Indicator Removal
DedupPeriodMinutes: 60
SummaryAttributes:
  - eventName
  - userIdentity:principalId
  - requestParameters:dBSnapshotIdentifier
  - requestParameters:dBClusterSnapshotIdentifier
  - p_any_aws_account_ids
Threshold: 1
Tests:
  - Name: DB Snapshot Deleted
    ExpectedResult: true
    Log:
      eventVersion: "1.08"
      userIdentity:
        type: AssumedRole
        principalId: "AIDAI23HXS3EXAMPLE:user"
        arn: "arn:aws:sts::123456789012:assumed-role/PowerUserRole/user"
        accountId: "123456789012"
        accessKeyId: "ASIAIOSFODNN7EXAMPLE"
      eventTime: "2024-01-16T08:15:00Z"
      eventSource: rds.amazonaws.com
      eventName: DeleteDBSnapshot
      awsRegion: us-west-2
      sourceIPAddress: "198.51.100.25"
      userAgent: "aws-cli/2.13.0"
      requestParameters:
        dBSnapshotIdentifier: "backup-2024-01-15"
      responseElements:
        dBSnapshotIdentifier: "backup-2024-01-15"
        dBSnapshotArn: "arn:aws:rds:us-west-2:123456789012:snapshot:backup-2024-01-15"
        status: "deleted"
        snapshotType: "manual"
      requestID: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      eventID: "f1e2d3c4-b5a6-7890-1234-567890abcdef"
      readOnly: false
      eventType: AwsApiCall
      managementEvent: true
      recipientAccountId: "123456789012"
      eventCategory: Management

  - Name: DB Cluster Snapshot Deleted
    ExpectedResult: true
    Log:
      eventVersion: "1.08"
      userIdentity:
        type: IAMUser
        principalId: "AIDAI23HXS3EXAMPLE"
        arn: "arn:aws:iam::123456789012:user/contractor"
        accountId: "123456789012"
        accessKeyId: "AKIAIOSFODNN7EXAMPLE"
        userName: contractor
      eventTime: "2024-01-16T08:15:00Z"
      eventSource: rds.amazonaws.com
      eventName: DeleteDBClusterSnapshot
      awsRegion: us-east-1
      sourceIPAddress: "203.0.113.100"
      userAgent: "Boto3/1.26.0"
      requestParameters:
        dBClusterSnapshotIdentifier: "aurora-cluster-backup-2024"
      responseElements:
        dBClusterSnapshotIdentifier: "aurora-cluster-backup-2024"
        dBClusterSnapshotArn: "arn:aws:rds:us-east-1:123456789012:cluster-snapshot:aurora-cluster-backup-2024"
        status: "deleted"
        snapshotType: "manual"
      requestID: "b2c3d4e5-f6a7-8901-bcde-f1234567890a"
      eventID: "g2f3e4d5-c6b7-8901-2345-678901bcdefg"
      readOnly: false
      eventType: AwsApiCall
      managementEvent: true
      recipientAccountId: "123456789012"
      eventCategory: Management

  - Name: Snapshot Deletion Failed
    ExpectedResult: false
    Log:
      eventVersion: "1.08"
      userIdentity:
        type: IAMUser
        principalId: "AIDAI23HXS3EXAMPLE"
        arn: "arn:aws:iam::123456789012:user/developer"
        accountId: "123456789012"
        accessKeyId: "AKIAIOSFODNN7EXAMPLE"
        userName: developer
      eventTime: "2024-01-16T08:15:00Z"
      eventSource: rds.amazonaws.com
      eventName: DeleteDBSnapshot
      awsRegion: us-west-2
      sourceIPAddress: "10.0.1.50"
      userAgent: "aws-cli/2.13.0"
      requestParameters:
        dBSnapshotIdentifier: "backup-2024-01-15"
      errorCode: InvalidDBSnapshotState
      errorMessage: "Cannot delete snapshot in current state"
      requestID: "c3d4e5f6-a7b8-9012-cdef-1234567890ab"
      eventID: "h3g4f5e6-d7c8-9012-3456-789012cdefgh"
      readOnly: false
      eventType: AwsApiCall
      managementEvent: true
      recipientAccountId: "123456789012"
      eventCategory: Management

  - Name: Different RDS Event
    ExpectedResult: false
    Log:
      eventVersion: "1.08"
      userIdentity:
        type: AssumedRole
        principalId: "AIDAI23HXS3EXAMPLE:user"
        arn: "arn:aws:sts::123456789012:assumed-role/Admin/user"
        accountId: "123456789012"
      eventTime: "2024-01-16T08:15:00Z"
      eventSource: rds.amazonaws.com
      eventName: CreateDBSnapshot
      awsRegion: us-west-2
      sourceIPAddress: "10.0.1.100"
      requestParameters:
        dBSnapshotIdentifier: "new-backup"
        dBInstanceIdentifier: "my-database"
      requestID: "d4e5f6a7-b8c9-0123-def0-1234567890bc"
      eventID: "i4h5g6f7-e8d9-0123-4567-890123defghi"
      readOnly: false
      eventType: AwsApiCall
      managementEvent: true
      recipientAccountId: "123456789012"
      eventCategory: Management

Detection logic

Condition

eventSource eq "rds.amazonaws.com"
eventName in ["DeleteDBSnapshot", "DeleteDBClusterSnapshot"]
errorCode is_null

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
errorCodeis_null
  • (no value, null check)
eventNamein
  • DeleteDBClusterSnapshot
  • DeleteDBSnapshot
eventSourceeq
  • rds.amazonaws.com

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
eventName
eventSource
awsRegion
recipientAccountId
sourceIPAddress
userAgent
userIdentity
dBSnapshotIdentifierrequestParameters.dBSnapshotIdentifier
userNameuserIdentity.userName