detection-rules
Loading

AWS CloudTrail Log Created

Detects creation of a new AWS CloudTrail trail via CreateTrail API. While legitimate during onboarding or auditing improvements, adversaries can create trails that write to attacker-controlled destinations, limit regions, or otherwise subvert monitoring objectives. New trails should be validated for destination ownership, encryption, multi-region coverage, and organizational scope.

Rule type: query
Rule indices:

  • filebeat-*
  • logs-aws.cloudtrail-*

Rule Severity: low
Risk Score: 21
Runs every:
Searches indices from: now-6m
Maximum alerts per execution: ?
References:

Tags:

  • Domain: Cloud
  • Data Source: AWS
  • Data Source: Amazon Web Services
  • Data Source: AWS Cloudtrail
  • Use Case: Log Auditing
  • Tactic: Collection
  • Resources: Investigation Guide

Version: ?
Rule authors:

  • Elastic

Rule license: Elastic License v2

Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

AWS CloudTrail is a service that enables governance, compliance, and operational and risk auditing of your AWS account. It logs API calls and related events, providing visibility into user activity. Adversaries may create new trails to capture sensitive data or cover their tracks. This detection identifies CreateTrail calls so responders can verify destination ownership, encryption, and scope before accepting the change.

  • Identify the actor and context
    • Review aws.cloudtrail.user_identity.arn, aws.cloudtrail.user_identity.type, user_agent.original, source.ip.
    • Confirm a related change request exists (onboarding, architecture change).
  • Validate trail configuration
    • In aws.cloudtrail.request_parameters, verify:
      • S3BucketName/CloudWatchLogsLogGroupArn belong to your org (no external accounts).
      • IsMultiRegionTrail=true and IncludeGlobalServiceEvents=true (as per your standard).
      • KmsKeyId is an approved CMK; log file validation enabled.
  • Correlate activity
    • Look for PutEventSelectors, PutInsightSelectors, StartLogging following creation.
    • Check for prior enumeration: DescribeTrails, ListBuckets, GetEventSelectors.
  • Planned creation: Onboarding or compliance initiatives often add trails. Validate via ticket and standard template.
  • Automation: IaC or control-tower pipelines may create trails on account bootstrap.
  • If unauthorized
    • Disable or delete the trail; verify and secure the destination S3/CloudWatch resources.
    • Review the actor’s recent changes and rotate credentials if compromise is suspected.
  • Hardening
    • Restrict cloudtrail:CreateTrail to admin roles.
    • Use AWS Config / Security Hub controls to enforce multi-region, global events, and validated destinations.
event.dataset: "aws.cloudtrail"
    and event.provider: "cloudtrail.amazonaws.com"
    and event.action: "CreateTrail"
    and event.outcome: "success"
		

Framework: MITRE ATT&CK