1. Resources
  2. Detection rules
  3. CloudTrail Logging Stopped or Weakened

CloudTrail Logging Stopped or Weakened detection rules

An attacker stops, deletes or reconfigures a CloudTrail trail so that the actions that follow are not recorded, or are recorded only partially.

Platform
AWS
Severity
High
Log source
AWS CloudTrail
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Credentials for a principal allowed to call cloudtrail:StopLogging, DeleteTrail, UpdateTrail or PutEventSelectors on a trail owned by the account.
Impact
Loss of audit visibility for the actions that follow, so investigations lose the evidence to scope the compromise and detections that depend on CloudTrail stop firing.
Response
Start logging again or recreate the trail with its previous settings, then deactivate the access keys or revoke the role sessions of the principal that made the call.
Mitigation
Use an organization trail managed from the management account, and deny the trail stop, delete and update actions with a service control policy.
CloudTrail events
DeleteLogGroupDeleteLogStreamPutRetentionPolicyPutBucketLoggingUpdateTrailPutEventSelectorsStopLoggingDeleteTrailStopEventDataStoreIngestionDeleteEventDataStore
Threat groups
APT29

How the attack works

CloudTrail trails deliver the account's API activity to S3, CloudWatch Logs and, through them, to the SIEM. A principal allowed to call cloudtrail:StopLogging or cloudtrail:DeleteTrail can switch that record off; UpdateTrail and PutEventSelectors are quieter ways to weaken it, for example by turning a multi-Region trail into a single-Region one, redirecting delivery, or excluding management events or event sources from the selectors. The copies of the record can be attacked as well: deleting the CloudWatch Logs log group a trail delivers to, or shortening its retention, removes what alarms and forwarders read, and PutBucketLogging can switch off server access logging on the bucket that stores the log files.

Attackers do this right before the actions they want to hide, so the change itself is often the last clear event from the session. CloudTrail records the call with the caller in userIdentity and the affected trail (name or ARN) and new settings in requestParameters. Event history keeps management events for 90 days even when no trail is logging, so the call stays visible there.

What an attacker needs

  • Credentials for a principal allowed to call cloudtrail:StopLogging, DeleteTrail, UpdateTrail or PutEventSelectors on the trail.
  • A trail owned by the account; organization trails can only be changed from the management account or the CloudTrail delegated administrator.

Impact

Loss of audit visibility for the actions that follow, in one Region or across the account. Investigations lose the evidence needed to scope the compromise, and detections that depend on CloudTrail stop firing.

Detection rules

CloudWatch Logs Log Group or Stream Deleted, or Retention Changed

Detects DeleteLogGroup, DeleteLogStream and PutRetentionPolicy calls to CloudWatch Logs (event source logs.amazonaws.com). A trail can deliver its events to a CloudWatch Logs log group, and metric filters, alarms and SIEM forwarders often read from there. Deleting the log group or its streams removes that copy and breaks the alarms built on it, and a short retention period makes the events expire early. The Threat Technique Catalog for AWS lists these calls with the other ways of disabling cloud logs. The rule matches every log group, not only the one a trail writes to, and it does not read the new retention period: check the log group named in the request parameters and what depends on it. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelLowStatusExperimentalLog sourceAWS CloudTrail
title: CloudWatch Logs Log Group or Stream Deleted, or Retention Changed
id: d2c5ca72-1d41-4a1d-9184-dfcfa75fd372
status: experimental
description: >-
  Detects DeleteLogGroup, DeleteLogStream and PutRetentionPolicy calls to
  CloudWatch Logs (event source logs.amazonaws.com). A trail can deliver its events to a CloudWatch Logs
  log group, and metric filters, alarms and SIEM forwarders often read from
  there. Deleting the log group or its streams removes that copy and breaks
  the alarms built on it, and a short retention period makes the events
  expire early. The Threat Technique Catalog for AWS lists these calls with
  the other ways of disabling cloud logs. The rule matches every log group,
  not only the one a trail writes to, and it does not read the new retention
  period: check the log group named in the request parameters and what
  depends on it.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/logging_cw_api_calls_cwl.html
  - https://docs.aws.amazon.com/awscloudtrail/latest/userguide/send-cloudtrail-events-to-cloudwatch-logs.html
  - https://aws-samples.github.io/threat-technique-catalog-for-aws/Techniques/T1562.008.html
  - https://attack.mitre.org/techniques/T1685/002/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.t1685.002
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: logs.amazonaws.com
    eventName:
      - DeleteLogGroup
      - DeleteLogStream
      - PutRetentionPolicy
  condition: selection
falsepositives:
  - Infrastructure-as-code pipelines and deployment tools, which delete the log groups of resources they remove and set retention on new log groups, and cost clean-up by the platform team. Add those roles to a filter_* selection on userIdentity.arn, or limit the rule to the log groups that hold audit and security logs.
level: low

False positives

  • Infrastructure-as-code pipelines and deployment tools, which delete the log groups of resources they remove and set retention on new log groups, and cost clean-up by the platform team. Add those roles to a filter_* selection on userIdentity.arn, or limit the rule to the log groups that hold audit and security logs.

S3 Server Access Logging Configuration Changed

Detects PutBucketLogging calls to Amazon S3. The call sets the server access logging configuration of a bucket, and the same call switches the logging off when it is sent with an empty logging status. Server access logs record the requests made to a bucket, so turning them off on the bucket that stores the CloudTrail log files hides who read or deleted those files. S3 logs PutBucketLogging as a bucket-level management event. The rule matches the event name only and cannot tell a change from a removal: read the bucket and the new configuration in the request parameters. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelLowStatusExperimentalLog sourceAWS CloudTrail
title: S3 Server Access Logging Configuration Changed
id: c83c892f-380b-4505-8d15-4f2f14cac6e1
status: experimental
description: >-
  Detects PutBucketLogging calls to Amazon S3. The call sets the server
  access logging configuration of a bucket, and the same call switches the
  logging off when it is sent with an empty logging status. Server access
  logs record the requests made to a bucket, so turning them off on the
  bucket that stores the CloudTrail log files hides who read or deleted
  those files. S3 logs PutBucketLogging as a bucket-level management event.
  The rule matches the event name only and cannot tell a change from a
  removal: read the bucket and the new configuration in the request
  parameters.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudtrail-logging-s3-info.html
  - https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html
  - https://attack.mitre.org/techniques/T1685/002/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.t1685.002
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: s3.amazonaws.com
    eventName: PutBucketLogging
  condition: selection
falsepositives:
  - Platform teams and infrastructure-as-code pipelines that enable server access logging on new buckets or change its target bucket. Add those roles to a filter_* selection on userIdentity.arn, or limit the rule to the buckets that hold log files.
level: low

False positives

  • Platform teams and infrastructure-as-code pipelines that enable server access logging on new buckets or change its target bucket. Add those roles to a filter_* selection on userIdentity.arn, or limit the rule to the buckets that hold log files.

CloudTrail Trail Configuration or Event Selectors Changed

Detects UpdateTrail and PutEventSelectors calls. Both can reduce what a trail records (single-Region instead of multi-Region, a different S3 destination, management events or event sources excluded) without stopping it. Compare requestParameters with the previous trail configuration. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelMediumStatusExperimentalLog sourceAWS CloudTrail
title: CloudTrail Trail Configuration or Event Selectors Changed
id: 2444388e-c5c3-47e9-ab01-4fdabe6464c4
status: experimental
description: >-
  Detects UpdateTrail and PutEventSelectors calls. Both can reduce what a trail
  records (single-Region instead of multi-Region, a different S3 destination,
  management events or event sources excluded) without stopping it. Compare
  requestParameters with the previous trail configuration.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_UpdateTrail.html
  - https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_PutEventSelectors.html
  - https://docs.aws.amazon.com/securityhub/latest/userguide/cloudwatch-controls.html
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.t1685.002
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: cloudtrail.amazonaws.com
    eventName:
      - UpdateTrail
      - PutEventSelectors
  condition: selection
falsepositives:
  - Logging changes by the cloud platform team or infrastructure-as-code pipelines; allow-list those roles after confirming the new configuration does not reduce coverage.
level: medium

False positives

  • Logging changes by the cloud platform team or infrastructure-as-code pipelines; allow-list those roles after confirming the new configuration does not reduce coverage.

CloudTrail Trail Stopped or Deleted

Detects StopLogging and DeleteTrail calls, and the CloudTrail Lake equivalents StopEventDataStoreIngestion and DeleteEventDataStore. Each one stops the recording of API activity for a trail or event data store. Calls that failed (errorCode present) show an attempt and are worth reviewing too.

LevelHighStatusExperimentalLog sourceAWS CloudTrail
title: CloudTrail Trail Stopped or Deleted
id: b6ec0fcf-783b-4649-8af0-b42b13413c68
status: experimental
description: >-
  Detects StopLogging and DeleteTrail calls, and the CloudTrail Lake equivalents
  StopEventDataStoreIngestion and DeleteEventDataStore. Each one stops the
  recording of API activity for a trail or event data store. Calls that failed
  (errorCode present) show an attempt and are worth reviewing too.
references:
  - https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_StopLogging.html
  - https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_Operations.html
  - https://docs.aws.amazon.com/eventbridge/latest/ref/events-ref-cloudtrail.html
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.t1685.002
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: cloudtrail.amazonaws.com
    eventName:
      - StopLogging
      - DeleteTrail
      - StopEventDataStoreIngestion
      - DeleteEventDataStore
  condition: selection
falsepositives:
  - Planned decommissioning or replacement of a trail or event data store; confirm a change record and that a replacement is logging.
level: high

False positives

  • Planned decommissioning or replacement of a trail or event data store; confirm a change record and that a replacement is logging.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Trail stopped and started again shortly after

Detection hypothesisSequence of events

An attacker who wants a gap in the record, but no trail that is visibly off, stops logging, acts and starts logging again. A stop and a start of the same trail within a short time leaves a hole that a check of the current trail status does not show.

  1. A StopLogging event from cloudtrail.amazonaws.com. Note the trail named in the request parameters and the caller in userIdentity.arn.
  2. Within 2 hours a StartLogging event from cloudtrail.amazonaws.com for the same trail.
  3. Rebuild the gap from CloudTrail Event history, which keeps management events for 90 days whether or not a trail is logging, and review what the same principal did between the two events.

EventsStopLoggingStartLogging

LimitsMaintenance and tests of the trail by the platform team produce the same pair. The 2 hours are a starting point. A trail that stays stopped does not match and is covered by the single-event rule on this page.

Bucket that receives the trail deleted, given a short lifecycle rule or a new bucket policy

Detection hypothesisNeeds your own listsJoins two logs

A trail keeps logging while the S3 bucket it writes to is deleted, gets a lifecycle rule that expires the log files within days, or gets a bucket policy that no longer lets CloudTrail write. GuardDuty's CloudTrailLoggingDisabled finding also fires when the bucket that stores the logs of a trail is deleted. These S3 calls are common, and only your list of trail buckets turns them into a signal.

  1. List the buckets your trails deliver to, from the S3BucketName parameter of CreateTrail and UpdateTrail requests or from the current trail configuration.
  2. Collect DeleteBucket, PutBucketLifecycle, PutBucketPolicy and DeleteBucketPolicy events from s3.amazonaws.com and read the bucket in requestParameters.bucketName.
  3. Alert when the bucket is on the list. For a lifecycle change compare the expiration of the new rules with your log retention, and for a policy change check that CloudTrail may still write to the bucket.

EventsDeleteBucketPutBucketLifecyclePutBucketPolicyDeleteBucketPolicy

LimitsRetention changes by the logging team produce the same events. A trail bucket in a separate log archive account shows these events only in that account's CloudTrail. S3 deletes a bucket only when it is empty, and removing the log files first leaves object-level data events that most trails do not record.

Triage

  • Identify the caller (userIdentity.arn) and the trail named in requestParameters, and check for an approved change.
  • For UpdateTrail and PutEventSelectors, compare the new settings in requestParameters with the trail's previous configuration (multi-Region, S3 destination, management events, excluded sources).
  • Review what the same principal did immediately after the change in CloudTrail Event history, and restart logging if it is still stopped.

Response

Once the attack is confirmed:

  1. Turn recording back on. Start logging on the stopped trail or create the deleted trail again, and set a changed trail back to multi-Region with management events and its previous event selectors.
  2. If delivery was redirected, point the trail back to your own log destination and treat what was delivered elsewhere as exposed to the attacker.
  3. Contain the principal that made the call by deactivating its access keys or revoking its role sessions. It holds CloudTrail write permissions and has probably used others.
  4. Rebuild the gap from CloudTrail Event history, which keeps management events for 90 days whether or not a trail is logging, and review what the same principal did while the trail was off.
  5. Check that the SIEM and the detections that depend on the trail receive events again.

Mitigation

  • Use an organization trail managed from the management account, so member-account principals cannot stop or delete it.
  • Deny cloudtrail:StopLogging, DeleteTrail, UpdateTrail and PutEventSelectors with a service control policy for everyone except a break-glass role.
  • Deliver logs to a separate log-archive account with S3 Object Lock and enable log file validation.

Frequently asked questions

Is the call that stops a trail still recorded anywhere?

Yes. CloudTrail records the call with the caller in `userIdentity` and the affected trail in `requestParameters`. Event history keeps management events for 90 days even when no trail is logging, so the call and what the same principal did next stay visible there.

How can a trail be weakened without being stopped?

`UpdateTrail` can turn a multi-Region trail into a single-Region one or redirect delivery, and `PutEventSelectors` can exclude management events or event sources. The trail keeps logging, so a check that only asks whether logging is on sees nothing. The trail configuration rule matches both calls. It cannot judge whether a change reduces coverage, so compare the new settings with the previous configuration.

Can a principal in a member account stop an organization trail?

No. An organization trail can only be changed from the management account or the CloudTrail delegated administrator. A principal in a member account can stop or delete the trails that the account itself owns, which is why a centrally managed organization trail is harder to switch off.

Do the rules cover CloudTrail Lake?

In part. The rule for stopped or deleted trails matches `StopEventDataStoreIngestion` and `DeleteEventDataStore`, the CloudTrail Lake equivalents of stopping and deleting a trail. Other changes to an event data store are not matched by any rule on this page.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.