EXPLORE
← Back to Explore
elasticlowTTP

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.

MITRE ATT&CK

collectiondefense-evasion

Detection Query

data_stream.dataset: "aws.cloudtrail" 
    and event.provider: "cloudtrail.amazonaws.com" 
    and event.action: "CreateTrail" 
    and event.outcome: "success"

Author

Elastic

Created

2020/06/10

Data Sources

AWSAmazon Web ServicesAWS Cloudtrailfilebeat-*logs-aws.cloudtrail-*

Tags

Domain: CloudData Source: AWSData Source: Amazon Web ServicesData Source: AWS CloudtrailUse Case: Log AuditingTactic: CollectionResources: Investigation Guide
Raw Content
[metadata]
creation_date = "2020/06/10"
integration = ["aws"]
maturity = "production"
updated_date = "2026/04/10"

[rule]
author = ["Elastic"]
description = """
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.
"""
false_positives = [
    """
    Trail creations may be made by a system or network administrator. Verify whether the user identity, user agent,
    and/or hostname should be making changes in your environment. Trail creations by unfamiliar users or hosts should be
    investigated. If known behavior is causing false positives, it can be exempted from the rule.
    """,
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS CloudTrail Log Created"
note = """## Triage and analysis

### Investigating AWS CloudTrail Log Created

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.

#### Possible investigation steps

- **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`.

### False positive analysis
- **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.

### Response and remediation
- **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.

### Additional information
- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)** 
- **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)** 
- **Security Best Practices:** [AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/).
"""
references = [
    "https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_CreateTrail.html",
    "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/create-trail.html",
]
risk_score = 21
rule_id = "594e0cbf-86cc-45aa-9ff7-ff27db27d3ed"
severity = "low"
tags = [
    "Domain: Cloud",
    "Data Source: AWS",
    "Data Source: Amazon Web Services",
    "Data Source: AWS Cloudtrail",
    "Use Case: Log Auditing",
    "Tactic: Collection",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset: "aws.cloudtrail" 
    and event.provider: "cloudtrail.amazonaws.com" 
    and event.action: "CreateTrail" 
    and event.outcome: "success"
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1530"
name = "Data from Cloud Storage"
reference = "https://attack.mitre.org/techniques/T1530/"

[rule.threat.tactic]
id = "TA0009"
name = "Collection"
reference = "https://attack.mitre.org/tactics/TA0009/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"

[[rule.threat.technique.subtechnique]]
id = "T1562.008"
name = "Disable or Modify Cloud Logs"
reference = "https://attack.mitre.org/techniques/T1562/008/"

[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.name",
    "user_agent.original",
    "source.ip",
    "aws.cloudtrail.user_identity.arn",
    "aws.cloudtrail.user_identity.type",
    "aws.cloudtrail.user_identity.access_key_id",
    "event.action",
    "event.outcome",
    "cloud.account.id",
    "cloud.region",
    "aws.cloudtrail.request_parameters",
    "aws.cloudtrail.response_elements",
]