AWS Defense Evasion Delete Cloudtrail
Description
The following analytic detects the deletion of AWS CloudTrail logs by identifying DeleteTrail events within CloudTrail logs. This detection leverages CloudTrail data to monitor for successful DeleteTrail actions, excluding those initiated from the AWS console. This activity is significant because adversaries may delete CloudTrail logs to evade detection and operate stealthily within the compromised environment. If confirmed malicious, this action could allow attackers to cover their tracks, making it difficult to trace their activities and potentially leading to prolonged unauthorized access and further exploitation.
Query · spl
`cloudtrail` eventName = DeleteTrail 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_delete_cloudtrail_filter`
Implementation guide
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.
Analyst notes
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.