Detection rules › Panther
S3 MFA Delete Disabled
Detects when MFA Delete is disabled on an S3 bucket, removing an important security control that prevents accidental or malicious deletion of versioned objects and could indicate ransomware preparation activity.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1562 Impair Defenses |
| Impact | T1485 Data Destruction |
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- AWS S3 Bucket Versioning Disable (Sigma)
- AWS S3 Object Versioning Suspended (Elastic)
- AWS S3 Security Control Disabling (Panther)
- S3 Bucket Versioning Suspended (Panther)
Rule body yaml
AnalysisType: rule
Filename: aws_s3_disable_mfa_delete.py
RuleID: "AWS.S3.DisableMfaDelete"
DisplayName: "S3 MFA Delete Disabled"
Enabled: true
LogTypes:
- AWS.CloudTrail
Tags:
- AWS
- Defense Evasion
- Impact:Data Destruction
Reports:
MITRE ATT&CK:
- TA0005:T1562
- TA0040:T1485
Severity: Low
Description: Detects when MFA Delete is disabled on an S3 bucket, removing an important security control that prevents accidental or malicious deletion of versioned objects and could indicate ransomware preparation activity.
Runbook: |
1. Query CloudTrail for all S3 API calls by the userIdentity:arn on the requestParameters:bucketName in the 24 hours before and after MFA Delete was disabled
2. Find any DeleteObject or DeleteObjects events on this bucket in the 6 hours after MFA Delete was disabled to check if bulk deletion occurred
3. Search for other security control changes (DisableBucketLogging, SuspendVersioning, DeleteBucketEncryption) on the same bucket in the past 7 days to identify ransomware preparation patterns
Reference: https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiFactorAuthenticationDelete.html
SummaryAttributes:
- sourceIpAddress
- userAgent
- recipientAccountId
- p_any_aws_arns
Tests:
- Name: MFA Delete Disabled Successfully
ExpectedResult: true
Log:
{
"eventVersion": "1.08",
"userIdentity":
{
"type": "AssumedRole",
"principalId": "AAAAAAAAAAAAAAAAAAAAA:user_name",
"arn": "arn:aws:sts::111111111111:assumed-role/sample-role-dreamy-yonath/sample-role-brave-yalow-role-intelligent-brahmagupta-role-beautiful-keldysh-role-happy-easley-role-bold-buck",
"accountId": "111111111111",
"accessKeyId": "ASIA-MOCKACCESSKEYID-1",
"sessionContext":
{
"attributes":
{
"mfaAuthenticated": "true",
"creationDate": "2024-01-15T10:30:00Z",
},
"sessionIssuer":
{
"type": "Role",
"principalId": "AAAAAAAAAAAAAAAAAAAAA",
"arn": "arn:aws:iam::111111111111:role/sample-role-dreamy-yonath",
"accountId": "111111111111",
"userName": "AdminRole",
},
},
},
"eventTime": "2024-01-15T10:45:23Z",
"eventSource": "s3.amazonaws.com",
"eventName": "PutBucketVersioning",
"awsRegion": "us-east-1",
"sourceIPAddress": "1.2.3.4",
"userAgent": "aws-cli/2.13.0 Python/3.11.4 Linux/5.10.0-1234-aws exe/x86_64.ubuntu.22",
"requestParameters":
{
"bucketName": "critical-data-bucket",
"host": "sample-bucket-lucid-kowalevski.s3.amazonaws.com",
"VersioningConfiguration":
{
"Status": "Enabled",
"MfaDelete": "Disabled",
},
},
"responseElements": null,
"requestID": "ABC123DEF456",
"eventID": "12345678-1234-1234-1234-111111111111",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111111111111",
"vpcEndpointId": "vpce-1a2b3c4d",
}
- Name: MFA Delete Disabled - Failed
ExpectedResult: false
Log:
{
"eventVersion": "1.08",
"userIdentity":
{
"type": "IAMUser",
"principalId": "AIDAI23HXS4EXAMPLE",
"arn": "arn:aws:iam::111111111111:user/testuser",
"accountId": "111111111111",
"accessKeyId": "AKIA-MOCKACCESSKEYID-1",
},
"eventTime": "2024-01-15T10:45:23Z",
"eventSource": "s3.amazonaws.com",
"eventName": "PutBucketVersioning",
"awsRegion": "us-east-1",
"sourceIPAddress": "1.2.3.4",
"userAgent": "aws-cli/2.13.0 Python/3.11.4 Linux/5.10.0-1234-aws exe/x86_64.ubuntu.22",
"errorCode": "AccessDenied",
"errorMessage": "Access Denied",
"requestParameters":
{
"bucketName": "critical-data-bucket",
"host": "sample-bucket-lucid-kowalevski.s3.amazonaws.com",
"VersioningConfiguration":
{
"Status": "Enabled",
"MfaDelete": "Disabled",
},
},
"responseElements": null,
"requestID": "ABC123DEF456",
"eventID": "12345678-1234-1234-1234-111111111111",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111111111111",
}
- Name: MFA Delete Enabled
ExpectedResult: false
Log:
{
"eventVersion": "1.08",
"userIdentity":
{
"type": "AssumedRole",
"principalId": "AAAAAAAAAAAAAAAAAAAAA:user_name",
"arn": "arn:aws:sts::111111111111:assumed-role/sample-role-dreamy-yonath/sample-role-brave-yalow-role-intelligent-brahmagupta-role-beautiful-keldysh-role-happy-easley-role-bold-buck",
"accountId": "111111111111",
"accessKeyId": "ASIA-MOCKACCESSKEYID-1",
},
"eventTime": "2024-01-15T10:45:23Z",
"eventSource": "s3.amazonaws.com",
"eventName": "PutBucketVersioning",
"awsRegion": "us-east-1",
"sourceIPAddress": "1.2.3.4",
"userAgent": "aws-cli/2.13.0 Python/3.11.4 Linux/5.10.0-1234-aws exe/x86_64.ubuntu.22",
"requestParameters":
{
"bucketName": "critical-data-bucket",
"host": "sample-bucket-lucid-kowalevski.s3.amazonaws.com",
"VersioningConfiguration":
{
"Status": "Enabled",
"MfaDelete": "Enabled",
},
},
"responseElements": null,
"requestID": "ABC123DEF456",
"eventID": "12345678-1234-1234-1234-111111111111",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111111111111",
}
- Name: Different S3 Event
ExpectedResult: false
Log:
{
"eventVersion": "1.08",
"userIdentity":
{
"type": "AssumedRole",
"principalId": "AAAAAAAAAAAAAAAAAAAAA:user_name",
"arn": "arn:aws:sts::111111111111:assumed-role/sample-role-dreamy-yonath/sample-role-brave-yalow-role-intelligent-brahmagupta-role-beautiful-keldysh-role-happy-easley-role-bold-buck",
"accountId": "111111111111",
"accessKeyId": "ASIA-MOCKACCESSKEYID-1",
},
"eventTime": "2024-01-15T10:45:23Z",
"eventSource": "s3.amazonaws.com",
"eventName": "DeleteBucketEncryption",
"awsRegion": "us-east-1",
"sourceIPAddress": "1.2.3.4",
"userAgent": "aws-cli/2.13.0 Python/3.11.4 Linux/5.10.0-1234-aws exe/x86_64.ubuntu.22",
"requestParameters":
{
"bucketName": "critical-data-bucket",
"host": "sample-bucket-lucid-kowalevski.s3.amazonaws.com",
},
"responseElements": null,
"requestID": "ABC123DEF456",
"eventID": "12345678-1234-1234-1234-111111111111",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111111111111",
}
- Name: Non-S3 Event
ExpectedResult: false
Log:
{
"eventVersion": "1.08",
"userIdentity":
{
"type": "AssumedRole",
"principalId": "AAAAAAAAAAAAAAAAAAAAA:user_name",
"arn": "arn:aws:sts::111111111111:assumed-role/sample-role-dreamy-yonath/sample-role-brave-yalow-role-intelligent-brahmagupta-role-beautiful-keldysh-role-happy-easley-role-bold-buck",
"accountId": "111111111111",
"accessKeyId": "ASIA-MOCKACCESSKEYID-1",
},
"eventTime": "2024-01-15T10:45:23Z",
"eventSource": "ec2.amazonaws.com",
"eventName": "PutBucketVersioning",
"awsRegion": "us-east-1",
"sourceIPAddress": "1.2.3.4",
"userAgent": "aws-cli/2.13.0 Python/3.11.4 Linux/5.10.0-1234-aws exe/x86_64.ubuntu.22",
"requestParameters": {},
"responseElements": null,
"requestID": "ABC123DEF456",
"eventID": "12345678-1234-1234-1234-111111111111",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111111111111",
}
- Name: MFA Delete Field Missing
ExpectedResult: false
Log:
{
"eventVersion": "1.08",
"userIdentity":
{
"type": "AssumedRole",
"principalId": "AAAAAAAAAAAAAAAAAAAAA:user_name",
"arn": "arn:aws:sts::123456789012:assumed-role/AdminRole/user_name",
"accountId": "123456789012",
"accessKeyId": "ASIAIOSFODNN7EXAMPLE",
},
"eventTime": "2024-01-15T10:45:23Z",
"eventSource": "s3.amazonaws.com",
"eventName": "PutBucketVersioning",
"awsRegion": "us-east-1",
"sourceIPAddress": "203.0.113.42",
"userAgent": "aws-cli/2.13.0 Python/3.11.4 Linux/5.10.0-1234-aws exe/x86_64.ubuntu.22",
"requestParameters":
{
"bucketName": "critical-data-bucket",
"host": "critical-data-bucket.s3.amazonaws.com",
"VersioningConfiguration":
{
"Status": "Enabled",
},
},
"responseElements": null,
"requestID": "ABC123DEF456",
"eventID": "12345678-1234-1234-1234-123456789012",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "123456789012",
}
Detection logic
Condition
not (errorCode is_not_null or errorMessage is_not_null)
eventSource eq "s3.amazonaws.com"
eventName eq "PutBucketVersioning"
requestParameters.VersioningConfiguration.MfaDelete eq "Disabled"
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
errorCode | is_not_null | |
errorMessage | is_not_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.
| Field | Kind | Values |
|---|---|---|
eventName | eq |
|
eventSource | eq |
|
requestParameters.VersioningConfiguration.MfaDelete | eq |
|
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.
| Field | Source |
|---|---|
eventName | |
eventSource | |
awsRegion | |
recipientAccountId | |
sourceIPAddress | |
userAgent | |
userIdentity | |
actor_user | |
bucketName | requestParameters.bucketName |