AWS S3 Object Versioning Suspended

Identifies when object versioning is suspended for an Amazon S3 bucket. Object versioning allows for multiple versions of an object to exist in the same bucket. This allows for easy recovery of deleted or overwritten objects. When object versioning is suspended for a bucket, it could indicate an adversary's attempt to inhibit system recovery following malicious activity. Additionally, when versioning is suspended, buckets can then be deleted.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2024/07/12"
  3integration = ["aws"]
  4maturity = "production"
  5updated_date = "2025/10/28"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies when object versioning is suspended for an Amazon S3 bucket. Object versioning allows for multiple versions of an object to exist in the same bucket. This allows for easy recovery of deleted or overwritten objects. When object versioning is suspended for a bucket, it could indicate an adversary's attempt to inhibit system recovery following malicious activity. Additionally, when versioning is suspended, buckets can then be deleted.
 11"""
 12event_category_override = "event.type"
 13false_positives = [
 14    """
 15    Administrators within an AWS Organization structure may legitimately suspend object versioning. Ensure that this behavior is not part of a legitimate operation before taking action.
 16    """,
 17]
 18from = "now-6m"
 19index = ["filebeat-*", "logs-aws.cloudtrail-*"]
 20language = "eql"
 21license = "Elastic License v2"
 22name = "AWS S3 Object Versioning Suspended"
 23note = """## Triage and analysis
 24
 25> **Disclaimer**:
 26> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
 27
 28### Investigating AWS S3 Object Versioning Suspended
 29
 30This rule detects when object versioning for an S3 bucket is suspended. S3 object versioning protects against data loss by maintaining prior versions of objects, allowing recovery if they are deleted or overwritten.  
 31Adversaries with access to a misconfigured or compromised S3 bucket may disable versioning to inhibit recovery efforts, conceal data destruction, or prepare for ransomware-like activity.  
 32This rule uses [EQL](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-eql-rule) to detect use of the `PutBucketVersioning` API operation where the request parameters include `Status=Suspended`.
 33
 34#### Possible investigation steps
 35
 36- **Identify the Actor**  
 37  - Review `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id` to determine who performed the action.  
 38  - Verify whether this user or role has a legitimate operational reason to modify bucket versioning and whether such actions are common for this identity.
 39
 40- **Analyze the Source and Context**  
 41  - Review `source.ip` and `user_agent.original` to assess the origin of the request.  
 42  - Check for unusual geographic locations, IP ranges, or clients that do not typically manage storage configurations.  
 43
 44- **Evaluate the Affected Resource**  
 45  - Review `aws.cloudtrail.resources.arn` or `aws.cloudtrail.request_parameters` to identify which bucket’s versioning was modified.  
 46  - Determine whether this bucket contains critical or regulated data (logs, backups, audit evidence, etc.) that would be impacted by versioning suspension.
 47
 48- **Correlate with Related Activity**  
 49  - Search for additional CloudTrail events performed by the same actor or IP address within the same timeframe, such as:  
 50    - `DeleteObject`, `DeleteObjects`, or `PutBucketLifecycle` events (potential data destruction).  
 51    - `PutBucketPolicy` or `PutBucketAcl` changes (permission manipulation).  
 52  - Review other detections related to S3 buckets or IAM changes to determine if this event is part of a larger sequence of destructive or unauthorized actions.
 53
 54- **Validate Intent**  
 55  - Confirm whether this configuration change aligns with approved maintenance or automation activity (e.g., cost optimization, test environment reset).  
 56  - If no corresponding change request or justification exists, treat this as a potential defense evasion or impact event.
 57
 58### False positive analysis
 59
 60- **Legitimate Administrative Actions**  
 61  - Administrators or infrastructure automation tools may suspend versioning during migrations or lifecycle testing. Confirm through change management documentation.  
 62- **Automation and Pipelines**  
 63  - Verify whether Infrastructure-as-Code tools (e.g., Terraform, CloudFormation) or backup lifecycle scripts routinely modify versioning states.  
 64  - Exclude predictable automation identities where justified, while ensuring strong audit controls remain in place.
 65
 66### Response and remediation
 67
 68**Containment and Validation**  
 69- Re-enable versioning immediately for the affected bucket using the AWS Console or CLI (`aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=Enabled`).  
 70- Verify the change with `get-bucket-versioning` to confirm the bucket is restored to “Enabled.”  
 71- Identify IAM users or roles with `s3:PutBucketVersioning` permissions and restrict access to trusted administrators only.  
 72- Preserve relevant CloudTrail, Config, and CloudWatch logs for the timeframe of the change to ensure integrity of investigation evidence.
 73
 74**Investigation and Scoping**  
 75- Search CloudTrail for related actions by the same user or IP, including `DeleteObject`, `PutBucketLifecycle`, or `PutBucketPolicy`, to determine whether versioning suspension preceded object deletion or policy manipulation.  
 76- Review S3 access logs or Data Events for deleted, overwritten, or newly uploaded files after versioning suspension.  
 77- Validate if the change corresponds to an authorized change request or approved pipeline deployment.
 78
 79**Recovery and Hardening**  
 80- If object loss or overwrites occurred, attempt recovery using cross-region replication, AWS Backup, or previous snapshot copies.  
 81- Enable S3 Object Lock and MFA Delete on critical buckets to prevent future tampering.  
 82- Configure the AWS Config rule `s3-bucket-versioning-enabled` to continuously monitor for versioning suspension and trigger automated alerts.  
 83- Review IAM and service control policies to ensure the principle of least privilege is enforced for all S3 management actions.  
 84- Document findings and update incident response procedures to include versioning protection as part of ransomware and data destruction prevention strategies.
 85
 86
 87### Additional information
 88- AWS Documentation: [Using Versioning in S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html)  
 89- API Reference: [PutBucketVersioning](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html)  
 90- [AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)
 91- [AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)
 92"""
 93references = [
 94    "https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html/",
 95    "https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html/",
 96    "https://cloud.hacktricks.xyz/pentesting-cloud/aws-security/aws-post-exploitation/aws-s3-post-exploitation/",
 97    "https://www.invictus-ir.com/news/ransomware-in-the-cloud/",
 98    "https://rhinosecuritylabs.com/aws/s3-ransomware-part-2-prevention-and-defense/",
 99]
100risk_score = 47
101rule_id = "30b5bb96-c7db-492c-80e9-1eab00db580b"
102severity = "medium"
103tags = [
104    "Domain: Cloud",
105    "Data Source: AWS",
106    "Data Source: Amazon Web Services",
107    "Data Source: AWS S3",
108    "Use Case: Threat Detection",
109    "Tactic: Impact",
110    "Resources: Investigation Guide",
111]
112timestamp_override = "event.ingested"
113type = "eql"
114
115query = '''
116info where event.dataset == "aws.cloudtrail"
117   and event.provider == "s3.amazonaws.com"
118   and event.action == "PutBucketVersioning"
119   and event.outcome == "success"
120   and stringContains(aws.cloudtrail.request_parameters, "Status=Suspended")
121'''
122
123
124[[rule.threat]]
125framework = "MITRE ATT&CK"
126[[rule.threat.technique]]
127id = "T1490"
128name = "Inhibit System Recovery"
129reference = "https://attack.mitre.org/techniques/T1490/"
130
131
132[rule.threat.tactic]
133id = "TA0040"
134name = "Impact"
135reference = "https://attack.mitre.org/tactics/TA0040/"
136
137[rule.investigation_fields]
138field_names = [
139    "@timestamp",
140    "user.name",
141    "user_agent.original",
142    "source.ip",
143    "aws.cloudtrail.user_identity.arn",
144    "aws.cloudtrail.user_identity.type",
145    "aws.cloudtrail.user_identity.access_key_id",
146    "aws.cloudtrail.resources.arn", 
147    "aws.cloudtrail.resources.type", 
148    "event.action",
149    "event.outcome",
150    "cloud.account.id",
151    "cloud.region",
152    "aws.cloudtrail.request_parameters"
153]

Triage and analysis

Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

Investigating AWS S3 Object Versioning Suspended

This rule detects when object versioning for an S3 bucket is suspended. S3 object versioning protects against data loss by maintaining prior versions of objects, allowing recovery if they are deleted or overwritten.
Adversaries with access to a misconfigured or compromised S3 bucket may disable versioning to inhibit recovery efforts, conceal data destruction, or prepare for ransomware-like activity.
This rule uses EQL to detect use of the PutBucketVersioning API operation where the request parameters include Status=Suspended.

Possible investigation steps

  • Identify the Actor

    • Review aws.cloudtrail.user_identity.arn and aws.cloudtrail.user_identity.access_key_id to determine who performed the action.
    • Verify whether this user or role has a legitimate operational reason to modify bucket versioning and whether such actions are common for this identity.
  • Analyze the Source and Context

    • Review source.ip and user_agent.original to assess the origin of the request.
    • Check for unusual geographic locations, IP ranges, or clients that do not typically manage storage configurations.
  • Evaluate the Affected Resource

    • Review aws.cloudtrail.resources.arn or aws.cloudtrail.request_parameters to identify which bucket’s versioning was modified.
    • Determine whether this bucket contains critical or regulated data (logs, backups, audit evidence, etc.) that would be impacted by versioning suspension.
  • Correlate with Related Activity

    • Search for additional CloudTrail events performed by the same actor or IP address within the same timeframe, such as:
      • DeleteObject, DeleteObjects, or PutBucketLifecycle events (potential data destruction).
      • PutBucketPolicy or PutBucketAcl changes (permission manipulation).
    • Review other detections related to S3 buckets or IAM changes to determine if this event is part of a larger sequence of destructive or unauthorized actions.
  • Validate Intent

    • Confirm whether this configuration change aligns with approved maintenance or automation activity (e.g., cost optimization, test environment reset).
    • If no corresponding change request or justification exists, treat this as a potential defense evasion or impact event.

False positive analysis

  • Legitimate Administrative Actions
    • Administrators or infrastructure automation tools may suspend versioning during migrations or lifecycle testing. Confirm through change management documentation.
  • Automation and Pipelines
    • Verify whether Infrastructure-as-Code tools (e.g., Terraform, CloudFormation) or backup lifecycle scripts routinely modify versioning states.
    • Exclude predictable automation identities where justified, while ensuring strong audit controls remain in place.

Response and remediation

Containment and Validation

  • Re-enable versioning immediately for the affected bucket using the AWS Console or CLI (aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=Enabled).
  • Verify the change with get-bucket-versioning to confirm the bucket is restored to “Enabled.”
  • Identify IAM users or roles with s3:PutBucketVersioning permissions and restrict access to trusted administrators only.
  • Preserve relevant CloudTrail, Config, and CloudWatch logs for the timeframe of the change to ensure integrity of investigation evidence.

Investigation and Scoping

  • Search CloudTrail for related actions by the same user or IP, including DeleteObject, PutBucketLifecycle, or PutBucketPolicy, to determine whether versioning suspension preceded object deletion or policy manipulation.
  • Review S3 access logs or Data Events for deleted, overwritten, or newly uploaded files after versioning suspension.
  • Validate if the change corresponds to an authorized change request or approved pipeline deployment.

Recovery and Hardening

  • If object loss or overwrites occurred, attempt recovery using cross-region replication, AWS Backup, or previous snapshot copies.
  • Enable S3 Object Lock and MFA Delete on critical buckets to prevent future tampering.
  • Configure the AWS Config rule s3-bucket-versioning-enabled to continuously monitor for versioning suspension and trigger automated alerts.
  • Review IAM and service control policies to ensure the principle of least privilege is enforced for all S3 management actions.
  • Document findings and update incident response procedures to include versioning protection as part of ransomware and data destruction prevention strategies.

Additional information

References

Related rules

to-top