← Back to Explore
elastichighTTP
AWS CloudTrail Log Updated
Detects updates to an existing CloudTrail trail via UpdateTrail API which may reduce visibility, change destinations, or weaken integrity (e.g., removing global events, moving the S3 destination, or disabling validation). Adversaries can modify trails to evade detection while maintaining a semblance of logging. Validate any configuration change against approved baselines.
Detection Query
data_stream.dataset: "aws.cloudtrail"
and event.provider: "cloudtrail.amazonaws.com"
and event.action: "UpdateTrail"
and event.outcome: "success"
and not user_agent.original: (*Pulumi* or *Terraform*)
Author
Elastic
Created
2020/06/10
Data Sources
AWS CloudTrailfilebeat-*logs-aws.cloudtrail-*
References
Tags
Domain: CloudPlatform: AWSData Source: AWS CloudTrailTactic: ImpactRule Type: Custom Query (KQL)Resources: Investigation Guide
Raw Content
[metadata]
creation_date = "2020/06/10"
integration = ["aws"]
maturity = "production"
updated_date = "2026/08/05"
[rule]
author = ["Elastic"]
description = """
Detects updates to an existing CloudTrail trail via UpdateTrail API which may reduce visibility, change destinations, or
weaken integrity (e.g., removing global events, moving the S3 destination, or disabling validation). Adversaries can
modify trails to evade detection while maintaining a semblance of logging. Validate any configuration change against
approved baselines.
"""
false_positives = [
"""
Trail updates 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 updates from 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 Updated"
note = """## Triage and analysis
### Investigating AWS CloudTrail Log Updated
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. Trail modifications can be used by attackers to redirect logs to non-approved buckets, drop regions, or disable valuable selectors. This rule identifies a modification on CloudTrail settings using the `UpdateTrail` API.
#### Possible investigation steps
- **Actor and context**
- Check `aws.cloudtrail.user_identity.arn`, `user_agent.original`, `source.ip`; verify approved change.
- **Assess the modification**
- In `aws.cloudtrail.request_parameters`, note changes to:
- `S3BucketName`, `CloudWatchLogsLogGroupArn`, `KmsKeyId`
- `IsMultiRegionTrail`, `IncludeGlobalServiceEvents`
- Event or insight selectors (management vs data events)
- **Correlate**
- Look for preceding `StopLogging` or following `DeleteTrail`.
- Review concurrent IAM policy edits or role changes by the same actor.
### False positive analysis
- **Planned changes**: Baseline drift during region onboarding or encryption rotation.
- **Automation**: IaC pipelines updating trails as templates evolve.
### Response and remediation
- **If unauthorized**
- Revert to baseline; validate destination ownership and KMS policy.
- Investigate time ranges where visibility may have been reduced.
- **Hardening**
- Constrain `cloudtrail:UpdateTrail`, require approvals, and monitor with AWS Config rules.
### 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_UpdateTrail.html",
"https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudtrail/update-trail.html",
]
risk_score = 73
rule_id = "3e002465-876f-4f04-b016-84ef48ce7e5d"
severity = "high"
tags = [
"Domain: Cloud",
"Platform: AWS",
"Data Source: AWS CloudTrail",
"Tactic: Impact",
"Rule Type: Custom Query (KQL)",
"Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"
query = '''
data_stream.dataset: "aws.cloudtrail"
and event.provider: "cloudtrail.amazonaws.com"
and event.action: "UpdateTrail"
and event.outcome: "success"
and not user_agent.original: (*Pulumi* or *Terraform*)
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1565"
name = "Data Manipulation"
reference = "https://attack.mitre.org/techniques/T1565/"
[[rule.threat.technique.subtechnique]]
id = "T1565.001"
name = "Stored Data Manipulation"
reference = "https://attack.mitre.org/techniques/T1565/001/"
[rule.threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
[[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",
]