AWS Defense Evasion Stop Logging Cloudtrail

 Original Source: [splunk source]
Name:AWS Defense Evasion Stop Logging Cloudtrail
id:8a2f3ca2-4eb5-4389-a549-14063882e537
version:12
date:None
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/
drilldown_searches:
 name:'View the detection results for - "$user$"'
 search:'%original_detection_search% | search user = "$user$"'
 earliest_offset:'$info_min_time$'
 latest_offset:'$info_max_time$'
 name:'View risk events for the last 7 days for - "$user$"'
 search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
 earliest_offset:'7d'
 latest_offset:'0'
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

tags:

tests:
 name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.008/stop_delete_cloudtrail/aws_cloudtrail_events.json
  sourcetype: aws:cloudtrail
  source: aws_cloudtrail
 test_type:'unit'
manual_test:None

Related Analytic Stories


AWS Defense Evasion