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
| Signal | Where | ATT&CK |
|---|---|---|
| StopLogging, DeleteTrail, UpdateTrail on an existing trail | CloudTrail management events | T1562.008 |
| PutEventSelectors or PutInsightSelectors narrowing coverage | CloudTrail | T1562.008 |
| Lifecycle, policy or deletion changes on the log bucket | CloudTrail S3 events | T1562.008 |
| DisableKey or ScheduleKeyDeletion on the trail’s KMS key | CloudTrail KMS events | T1562.008 |
| GuardDuty detector deleted or Config recorder stopped | CloudTrail | T1562.001 |
| A region or account that stops delivering log files | S3 delivery, CloudWatch metrics | T1562.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
- Send a copy of audit logs to a separate log-archive account with a bucket policy that denies deletion, so tampering in the workload account cannot erase the record.
- Use an organisation trail and service control policies that deny StopLogging and DeleteTrail to all but a break-glass role.
- Enable CloudTrail log file validation so edits to delivered files are provable.
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
- Alert on any gap longer than your delivery-latency tolerance for an account that normally emits continuous management events.
- After a confirmed event, rebuild the timeline from the log-archive copy, VPC flow logs and service-native logs such as S3 server access logs.
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 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.
Stay ahead of emerging threats. Get notified when we publish new intelligence reports and advisories.
Subscribe to Alerts