CLOUDTRAIL
STOPLOGGING
DELETETRAIL
LOG GAPS
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting CloudTrail Tampering and Logging Anomalies

An attacker who disables CloudTrail is telling you something. The risk is that the alert depends on the logs they just turned off.

Scroll

Defense evasion in AWS usually starts with the audit trail: stopping or deleting a trail, narrowing its event selectors, or damaging the bucket and key that protect the logs. Each of these is itself an API call, usually recorded by another trail, so it can be alerted on. The harder case is silence, which needs a heartbeat rather than a signature.

Signals at a Glance

SignalWhereATT&CK
StopLogging, DeleteTrail, UpdateTrail on an existing trailCloudTrail management eventsT1562.008
PutEventSelectors or PutInsightSelectors narrowing coverageCloudTrailT1562.008
Lifecycle, policy or deletion changes on the log bucketCloudTrail S3 eventsT1562.008
DisableKey or ScheduleKeyDeletion on the trail’s KMS keyCloudTrail KMS eventsT1562.008
GuardDuty detector deleted or Config recorder stoppedCloudTrailT1562.001
A region or account that stops delivering log filesS3 delivery, CloudWatch metricsT1562.008

The Tampering API Calls

Cover the trail, its coverage and the services that watch alongside it. This Sigma rule collects the core calls; split it by severity once you know which are routine in your change process:

title: AWS Logging And Detection Service Tampering
logsource:
  product: aws
  service: cloudtrail
detection:
  trail:
    eventSource: 'cloudtrail.amazonaws.com'
    eventName:
      - 'StopLogging'
      - 'DeleteTrail'
      - 'UpdateTrail'
      - 'PutEventSelectors'
      - 'PutInsightSelectors'
  config:
    eventSource: 'config.amazonaws.com'
    eventName:
      - 'StopConfigurationRecorder'
      - 'DeleteConfigurationRecorder'
      - 'DeleteDeliveryChannel'
  guardduty:
    eventSource: 'guardduty.amazonaws.com'
    eventName:
      - 'DeleteDetector'
      - 'UpdateDetector'
  condition: trail or config or guardduty
level: high
# tune/validate: UpdateTrail and UpdateDetector occur in legitimate changes; allowlist your IaC roles

Detecting Silence

If tampering succeeds before an alert runs, the signal is absence. A CloudWatch Logs metric filter on the trail’s log group is a fast, native tripwire, and an Athena heartbeat finds regions or accounts that have gone quiet:

# CloudWatch Logs metric filter pattern (CIS-style) on the CloudTrail log group
{ ($.eventName = CreateTrail) || ($.eventName = UpdateTrail) || ($.eventName = DeleteTrail) || ($.eventName = StartLogging) || ($.eventName = StopLogging) }

-- Athena SQL - hours with no events for an account and region that normally has steady traffic
SELECT recipientaccountid, awsregion, date_trunc('hour', from_iso8601_timestamp(eventtime)) AS hr, count(*) AS events
FROM cloudtrail_logs
WHERE from_iso8601_timestamp(eventtime) > current_timestamp - interval '7' day
GROUP BY 1, 2, 3
ORDER BY recipientaccountid, awsregion, hr;
-- tune/validate: compare against each region's own hourly baseline; quiet regions need a longer window, and gaps should alert in your scheduler, not by eye
Vetted sources

Use AWS CloudTrail best practices, the CIS AWS Foundations Benchmark monitoring controls, GuardDuty defense evasion findings and the SigmaHQ AWS CloudTrail rules. Baseline your own environment: infrastructure-as-code pipelines legitimately update trails during deployments.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026