[New Rule] AWS S3 Bucket MFA Delete Disabled - #6653
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new AWS CloudTrail detection rule to alert when an S3 bucket’s MFA Delete protection is disabled via PutBucketVersioning, and updates the non-ECS schema so the rule’s flattened request-parameter field is recognized by repo validation.
Changes:
- Added a new KQL (Kuery) rule: AWS S3 Bucket MFA Delete Disabled with investigation guidance and ATT&CK Impact mapping.
- Extended
non-ecs-schema.jsonto includeaws.cloudtrail.flattened.request_parameters.mfaDeleteEnabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rules/integrations/aws/defense_evasion_s3_mfa_delete_disabled.toml | New CloudTrail-based rule for detecting MFA Delete being disabled on S3 buckets. |
| detection_rules/etc/non-ecs-schema.json | Adds the flattened CloudTrail request parameter field used by the new rule to the non-ECS schema. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| query = ''' | ||
| data_stream.dataset: "aws.cloudtrail" | ||
| and event.provider: "s3.amazonaws.com" | ||
| and event.action: "PutBucketVersioning" | ||
| and event.outcome: "success" | ||
| and aws.cloudtrail.flattened.request_parameters.mfaDeleteEnabled: (false or "false") | ||
| ''' |
| tags = [ | ||
| "Domain: Cloud", | ||
| "Platform: AWS", | ||
| "Data Source: AWS CloudTrail", | ||
| "Service: AWS S3", | ||
| "Rule Type: Custom Query (KQL)", | ||
| "Tactic: Impact", | ||
| "Resources: Investigation Guide", | ||
| ] |
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
…elete_disabled.toml
|
Any test data for this one? |
terrancedejesus
left a comment
There was a problem hiding this comment.
LGTM. Nits on the default interval and swapping the emdash in the description for a comma.
| ] | ||
| from = "now-6m" | ||
| index = ["logs-aws.cloudtrail-*"] | ||
| interval = "5m" |
There was a problem hiding this comment.
| interval = "5m" |
default is 5m
| Detects when MFA Delete is disabled on an Amazon S3 bucket. MFA Delete is an additional layer of | ||
| security for versioned S3 buckets that requires multi-factor authentication to permanently delete | ||
| object versions or disable versioning. When MFA Delete is disabled, an adversary with S3 write | ||
| access and a compromised long-term access key can permanently delete object versions — a critical |
There was a problem hiding this comment.
| access and a compromised long-term access key can permanently delete object versions — a critical | |
| access and a compromised long-term access key can permanently delete object versions, a critical |
Pull Request
Issue link(s):
Summary - What I changed
Added a rule that fires when MFA Delete is disabled on an S3 bucket via
PutBucketVersioningwithMfaDelete=Disabled. Also addsaws.cloudtrail.flattened.request_parameters.mfaDeleteEnabledto the non-ECS schema to enable the flattened field query.Why it matters
MFA Delete protects versioned S3 buckets by requiring MFA authentication to permanently delete object versions — the primary defense against ransomware destroying version history after encrypting current object copies. Disabling MFA Delete removes this safeguard and is a recognized ransomware preparation step documented in S3 ransomware research. Critically, only the AWS root account can enable or disable MFA Delete; a
PutBucketVersioningcall disabling it from a non-root identity is itself a strong indicator of root credential compromise or unauthorized use.How To Test
Query to verify in our TRaDE stack:
Checklist
Rule: NewContributor checklist