Detection rules › Panther
AWS S3 Bucket Versioning
Checks that object versioning is enabled in the S3 bucket.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Impact | T1485 Data Destruction |
Rule body yaml
AnalysisType: policy
Filename: aws_s3_bucket_versioning.py
PolicyID: "AWS.S3.Bucket.Versioning"
DisplayName: "AWS S3 Bucket Versioning"
Enabled: true
ResourceTypes:
- AWS.S3.Bucket
Tags:
- AWS
- Security Control
- Impact:Data Destruction
Reports:
PCI:
- 10.5.3
- 10.5.5
MITRE ATT&CK:
- TA0040:T1485
Severity: Low
Description: >
Checks that object versioning is enabled in the S3 bucket.
Runbook: >
https://docs.runpanther.io/alert-runbooks/built-in-policies/aws-s3-bucket-versioning-enabled
Reference: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html
Tests:
- Name: Bucket Versioning Disabled
ExpectedResult: false
Resource:
{
"CreationDate": "2019-01-01T00:00:00Z",
"EncryptionRules":
[
{
"ApplyServerSideEncryptionByDefault":
{ "KMSMasterKeyID": null, "SSEAlgorithm": "AES256" },
},
],
"Grants":
[
{
"Grantee":
{
"DisplayName": "user.name",
"EmailAddress": null,
"ID": "11112223334445556667778899aaabbbcccdddeeee",
"Type": "CanonicalUser",
"URI": null,
},
"Permission": "FULL_CONTROL",
},
{
"Grantee":
{
"DisplayName": null,
"EmailAddress": null,
"ID": null,
"Type": "Group",
"URI": "http://acs.amazonaws.com/groups/s3/LogDelivery",
},
"Permission": "WRITE",
},
],
"LifecycleRules": null,
"Location": "us-east-2",
"LoggingPolicy": null,
"MFADelete": null,
"Name": "bucket-name",
"Owner":
{
"DisplayName": "user.name",
"ID": "11112223334445556667778899aaabbbcccdddeeee",
},
"Policy": null,
"PublicAccessBlockConfiguration":
{
"BlockPublicAcls": false,
"BlockPublicPolicy": false,
"IgnorePublicAcls": false,
"RestrictPublicBuckets": false,
},
"Versioning": null,
}
- Name: Bucket Versioning Enabled
ExpectedResult: true
Resource:
{
"CreationDate": "2019-01-01T00:00:00Z",
"EncryptionRules":
[
{
"ApplyServerSideEncryptionByDefault":
{ "KMSMasterKeyID": null, "SSEAlgorithm": "AES256" },
},
],
"Grants":
[
{
"Grantee":
{
"DisplayName": "user.name",
"EmailAddress": null,
"ID": "11112223334445556667778899aaabbbcccdddeeee",
"Type": "CanonicalUser",
"URI": null,
},
"Permission": "FULL_CONTROL",
},
{
"Grantee":
{
"DisplayName": null,
"EmailAddress": null,
"ID": null,
"Type": "Group",
"URI": "http://acs.amazonaws.com/groups/s3/LogDelivery",
},
"Permission": "WRITE",
},
],
"LifecycleRules": null,
"Location": "us-east-2",
"LoggingPolicy": null,
"MFADelete": null,
"Name": "bucket-name",
"Owner":
{
"DisplayName": "user.name",
"ID": "11112223334445556667778899aaabbbcccdddeeee",
},
"Policy": null,
"PublicAccessBlockConfiguration":
{
"BlockPublicAcls": false,
"BlockPublicPolicy": false,
"IgnorePublicAcls": false,
"RestrictPublicBuckets": false,
},
"Versioning": "Enabled",
}
Detection logic
Condition
Versioning not eq "Enabled"
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
Versioning | eq | Enabled |