DET-007 · human · confidence High
AWS Deletions in CloudTrail
CloudTrail records who deleted or terminated AWS resources.
Events such as DeleteBucket, DeleteDBInstance, TerminateInstances, DeleteTrail, and DeleteSnapshot show up with the caller in userIdentity and the time in eventTime. They help find sabotage, evidence removal, and cost-cutting gone wrong. Treat trail and logging changes as higher severity. Send logs to a separate account with object lock. Also check who held the role at the time, since a short-lived assumed role can hide the person behind the call. Compare the caller to the change tickets and the team that owns the resource.
- Data sources
- AWS CloudTrail management events
- Platforms
- AWS
Logic
SELECT eventTime, userIdentity.arn, eventName, sourceIPAddress FROM cloudtrail
WHERE eventName LIKE 'Delete%' OR eventName LIKE 'Terminate%' OR eventName IN ('StopLogging','DeleteTrail')
GROUP BY userIdentity.arn HAVING count(*) > 10 in 1hFalse positives
Teardown of test environments and IaC pipelines.