Detection rules › Splunk
AWS Defense Evasion Stop Logging Cloudtrail
The following analytic detects StopLogging events in AWS CloudTrail logs. It leverages CloudTrail event data to identify when logging is intentionally stopped, excluding console-based actions and focusing on successful attempts. This activity is significant because adversaries may stop logging to evade detection and operate stealthily within the compromised environment. If confirmed malicious, this action could allow attackers to perform further activities without being logged, hindering incident response and forensic investigations, and potentially leading to unauthorized access or data exfiltration.
Known false positives
- While this search has no known false positives, it is possible that an AWS admin has stopped cloudtrail logging. Please investigate this activity.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry coverage
Rules detecting the same action
These rules filter on the same operation.
- Attempt To Stop CloudTrail Logging (Sigma)
- AWS CloudTrail Important Change (Sigma)
- AWS CloudTrail Log Suspended (Elastic)
- CloudTrail Logging Stopped (Sigma)
Rule body
name: AWS Defense Evasion Stop Logging Cloudtrail
id: 8a2f3ca2-4eb5-4389-a549-14063882e537
version: 12
creation_date: '2022-07-12'
modification_date: '2026-05-13'
author: Bhavin Patel, Splunk
status: production
type: TTP
description: The following analytic detects `StopLogging` events in AWS CloudTrail logs. It leverages CloudTrail event data to identify when logging is intentionally stopped, excluding console-based actions and focusing on successful attempts. This activity is significant because adversaries may stop logging to evade detection and operate stealthily within the compromised environment. If confirmed malicious, this action could allow attackers to perform further activities without being logged, hindering incident response and forensic investigations, and potentially leading to unauthorized access or data exfiltration.
data_source:
- AWS CloudTrail StopLogging
search: |-
`cloudtrail` eventName = StopLogging eventSource = cloudtrail.amazonaws.com userAgent!=console.amazonaws.com errorCode = success
| rename user_name as user
| stats count min(_time) as firstTime max(_time) as lastTime
BY signature dest user
user_agent src vendor_account
vendor_region vendor_product
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `aws_defense_evasion_stop_logging_cloudtrail_filter`
how_to_implement: You must install Splunk AWS Add on and enable Cloudtrail logs in your AWS Environment.
known_false_positives: While this search has no known false positives, it is possible that an AWS admin has stopped cloudtrail logging. Please investigate this activity.
references:
- https://attack.mitre.org/techniques/T1562/008/
finding:
title: User $user$ has stopped Cloudtrail logging for account id $vendor_account$ from IP $src$
entity:
field: user
type: user
score: 50
threat_objects:
- field: src
type: ip_address
analytic_story:
- AWS Defense Evasion
asset_type: AWS Account
mitre_attack_id:
- T1685.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: threat
Stages and Predicates
Stage 1: search
`cloudtrail` eventName = StopLogging eventSource = cloudtrail.amazonaws.com userAgent!=console.amazonaws.com errorCode = success
Stage 2: rename
| rename user_name as user
Stage 3: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY signature dest user
user_agent src vendor_account
vendor_region vendor_product
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `security_content_ctime(lastTime)`
Stage 6: search
| `aws_defense_evasion_stop_logging_cloudtrail_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
errorCode | eq |
| field:"aws::errorCode" kind:eq value:"success" |
eventName | eq |
| field:"aws::eventName" kind:eq value:"StopLogging" |
eventSource | eq |
| field:"aws::eventSource" kind:eq value:"cloudtrail.amazonaws.com" |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"aws:cloudtrail" |
userAgent | ne |
| field:"userAgent" kind:ne value:"console.amazonaws.com" |