AWS S3 Security Controls Disabled


Description

Detects the disabling of multiple S3 security controls (logging, versioning and MFA delete protection) on the same bucket within a short timeframe. This pattern is a strong indicator of preparation for ransomware or data destruction attacks, as attackers typically disable recovery mechanisms before encrypting or deleting data. Alerting on this activity enables early intervention before actual data loss occurs.

Query

Detection:
  - Group:
      - ID: Disable S3 Logging
        RuleID: AWS.S3.DisableBucketLogging
      - ID: Versioning Suspended
        RuleID: AWS.S3.SuspendVersioning
      - ID: MFA Delete Disabled
        RuleID: AWS.S3.DisableMfaDelete
    MatchCriteria:
      field_name:
        - GroupID: Disable S3 Logging
          Match: p_alert_context.bucketName
        - GroupID: Versioning Suspended
          Match: p_alert_context.bucketName
        - GroupID: MFA Delete Disabled
          Match: p_alert_context.bucketName
    LookbackWindowMinutes: 1800
    Schedule:
      RateMinutes: 1440
      TimeoutMinutes: 10

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

Analyst notes

  1. Query CloudTrail for all S3 API calls by the actor ARN on the affected bucket in the 24 hours before and after the bucket logging was disabled to identify if this is part of a larger attack pattern
  2. Check for subsequent suspicious activities on the same bucket including DeleteObject, DeleteObjects, PutBucketEncryption, or GetObject events in the 6 hours after all three security controls were disabled
  3. Find all other S3 buckets where this actor ARN has disabled logging, versioning, or MFA delete in the past 7 days to determine if this is a widespread attack
Raw source AWS S3 Security Controls Disabled · Panther Python
Esc
Published by panther-labs/panther-analysis ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
AnalysisType: correlation_rule
RuleID: "AWS.S3.Disable.Security.Controls"
DisplayName: "AWS S3 Security Controls Disabled"
Enabled: false
Status: Deprecated
Severity: High
Description: >
  Detects the disabling of multiple S3 security controls (logging, versioning and MFA delete protection)
  on the same bucket within a short timeframe. This pattern is a strong indicator of preparation
  for ransomware or data destruction attacks, as attackers typically disable recovery mechanisms
  before encrypting or deleting data. Alerting on this activity enables early intervention before
  actual data loss occurs.
Runbook: |
  1. Query CloudTrail for all S3 API calls by the actor ARN on the affected bucket in the 24 hours before and after the bucket logging was disabled to identify if this is part of a larger attack pattern
  2. Check for subsequent suspicious activities on the same bucket including DeleteObject, DeleteObjects, PutBucketEncryption, or GetObject events in the 6 hours after all three security controls were disabled
  3. Find all other S3 buckets where this actor ARN has disabled logging, versioning, or MFA delete in the past 7 days to determine if this is a widespread attack
Reference: https://rhinosecuritylabs.com/aws/s3-ransomware-part-1-attack-vector/
Tags:
  - AWS
  - S3
  - Ransomware
Reports:
  MITRE ATT&CK:
    - TA0005:T1562 # Defense Evasion: Impair Defenses
Detection:
  - Group:
      - ID: Disable S3 Logging
        RuleID: AWS.S3.DisableBucketLogging
      - ID: Versioning Suspended
        RuleID: AWS.S3.SuspendVersioning
      - ID: MFA Delete Disabled
        RuleID: AWS.S3.DisableMfaDelete
    MatchCriteria:
      field_name:
        - GroupID: Disable S3 Logging
          Match: p_alert_context.bucketName
        - GroupID: Versioning Suspended
          Match: p_alert_context.bucketName
        - GroupID: MFA Delete Disabled
          Match: p_alert_context.bucketName
    LookbackWindowMinutes: 1800
    Schedule:
      RateMinutes: 1440
      TimeoutMinutes: 10
Tests:
  - Name: Suspicious Security Control Disabling
    ExpectedResult: true
    RuleOutputs:
      - ID: Disable S3 Logging
        Matches:
          p_alert_context.bucketName:
            'target-bucket':
              - "2024-01-15T09:00:00Z"
      - ID: Versioning Suspended
        Matches:
          p_alert_context.bucketName:
            'target-bucket':
              - "2024-01-15T09:30:00Z"
      - ID: MFA Delete Disabled
        Matches:
          p_alert_context.bucketName:
            'target-bucket':
              - "2024-01-15T09:45:00Z"
  - Name: Only Versioning Suspended - No Follow-up Actions
    ExpectedResult: false
    RuleOutputs:
      - ID: Versioning Suspended
        Matches:
          p_alert_context.bucketName:
            'target-bucket':
              - "2024-01-15T10:00:00Z"

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.