T1485.001

Lifecycle-Triggered Deletion

Adversaries may modify the lifecycle policies of a cloud storage bucket to destroy all objects stored within. Cloud storage buckets allow users to set lifecycle policies to automate migration, archival, or deletion of objects after a set period of time. If a threat actor has sufficient permissions to modify these policies, they can apply a rule that expires all objects within one day, achieving large-scale data destruction without issuing explicit delete commands. In AWS environments, an adversary with the s3:PutLifecycleConfiguration permission may invoke the PutBucketLifecycle API call to set a short-expiry deletion rule across an entire bucket. Adversaries have also exploited this mechanism against CloudTrail log storage buckets to destroy audit evidence alongside operational data, combining data destruction with indicator removal. Similar capabilities exist in Azure Blob Storage lifecycle management policies and GCP Storage object lifecycle management.

Microsoft Sentinel / Defender
kusto
let ShortExpiryThresholdDays = 7;
let SuspiciousLifecycleOperations = dynamic(["PutBucketLifecycle", "PutBucketLifecycleConfiguration"]);
// AWS S3 lifecycle policy abuse via AWSCloudTrail
let AWSLifecycleChanges = AWSCloudTrail
| where TimeGenerated > ago(24h)
| where EventSource == "s3.amazonaws.com"
| where EventName in (SuspiciousLifecycleOperations)
| extend RawParams = tostring(RequestParameters)
| extend BucketName = tostring(parse_json(RequestParameters)["bucketName"])
| extend ExpirationDaysStr = extract(@'"Days"\s*:\s*(\d+)', 1, RawParams)
| extend ExpirationDays = toint(ExpirationDaysStr)
| extend HasDateExpiration = RawParams contains "\"Date\""
| extend FilterPrefix = extract(@'"Prefix"\s*:\s*"([^"]*)"', 1, RawParams)
| extend RuleStatus = extract(@'"Status"\s*:\s*"([^"]*)"', 1, RawParams)
| extend IsEnabled = isempty(RuleStatus) or RuleStatus =~ "Enabled"
| extend IsShortExpiry = IsEnabled and (ExpirationDays > 0 and ExpirationDays <= ShortExpiryThresholdDays)
| extend IsWildcardPrefix = isempty(FilterPrefix)
| extend CloudProvider = "AWS"
| extend Actor = UserIdentityArn
| extend SourceIP = SourceIpAddress
| extend ResourceName = BucketName
| extend RiskScore = case(
    IsShortExpiry and IsWildcardPrefix, 4,
    IsShortExpiry, 3,
    IsWildcardPrefix and IsEnabled, 2,
    1)
| where IsEnabled
| project TimeGenerated, CloudProvider, Actor, ResourceName, ExpirationDays,
          HasDateExpiration, FilterPrefix, RuleStatus, IsShortExpiry, IsWildcardPrefix,
          RiskScore, SourceIP, UserAgent, AWSRegion, EventName, ErrorCode, ErrorMessage;
// Azure Blob Storage lifecycle policy changes via AzureActivity
let AzureLifecycleChanges = AzureActivity
| where TimeGenerated > ago(24h)
| where OperationNameValue =~ "microsoft.storage/storageaccounts/managementpolicies/write"
| where ActivityStatusValue =~ "Success"
| extend RawProps = tostring(Properties)
| extend ExpirationDaysStr = extract(@'"daysAfterModificationGreaterThan"\s*:\s*(\d+)', 1, RawProps)
| extend ExpirationDays = toint(ExpirationDaysStr)
| extend IsShortExpiry = ExpirationDays > 0 and ExpirationDays <= ShortExpiryThresholdDays
| extend CloudProvider = "Azure"
| extend Actor = Caller
| extend SourceIP = CallerIpAddress
| extend ResourceName = tostring(split(ResourceId, "/")[8])
| extend IsWildcardPrefix = true
| extend RiskScore = iff(IsShortExpiry, 3, 1)
| extend AWSRegion = ""
| extend EventName = OperationNameValue
| extend ErrorCode = ""
| extend ErrorMessage = ""
| extend RuleStatus = "Enabled"
| extend FilterPrefix = ""
| extend HasDateExpiration = false
| project TimeGenerated, CloudProvider, Actor, ResourceName, ExpirationDays,
          HasDateExpiration, FilterPrefix, RuleStatus, IsShortExpiry, IsWildcardPrefix,
          RiskScore, SourceIP, UserAgent, AWSRegion, EventName, ErrorCode, ErrorMessage;
union AWSLifecycleChanges, AzureLifecycleChanges
| sort by RiskScore desc, TimeGenerated desc
critical severity high confidence

Data Sources

Cloud Storage: Cloud Storage Modification AWS CloudTrail: S3 API Calls Azure Activity Log: Storage Account Operations

Required Tables

AWSCloudTrail AzureActivity

False Positives

  • Legitimate data lifecycle management policies for cost optimization — organizations regularly configure long-expiry lifecycle rules to tier old objects to cheaper storage classes or delete them after compliance retention periods
  • Developer or DevOps engineers testing lifecycle configurations in non-production accounts or sandbox S3 buckets
  • Compliance-driven data destruction policies that legitimately set short retention windows for sensitive PII or regulated data to meet legal deletion requirements
  • Data pipeline cleanup rules that intentionally expire temporary processing artifacts or staging data after a short window
  • Terraform, CDK, or CloudFormation infrastructure-as-code deployments that apply lifecycle policies as part of automated stack provisioning or updates

Unlock Pro Content

Get the full detection package for T1485.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections