-
Notifications
You must be signed in to change notification settings - Fork 672
[New Rule] AWS Backup Vault Access Policy Modified or Deleted #6313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bryans3c
wants to merge
6
commits into
main
Choose a base branch
from
rule/aws-backup-vault-access-policy-modified
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+118
−0
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6311cfc
[New Rule] AWS Backup Vault Access Policy Modified or Deleted
bryans3c 24b6508
Potential fix for pull request finding
bryans3c cfb9b43
Potential fix for pull request finding
bryans3c 973669e
Rename defense_evasion_backup_vault_access_policy_modified.toml to de…
bryans3c 930316e
Potential fix for pull request finding
bryans3c 63a0d21
Update defense_evasion_backup_vault_access_policy_modified_or_deleted…
bryans3c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
118 changes: 118 additions & 0 deletions
118
rules/integrations/aws/defense_evasion_backup_vault_access_policy_modified_or_deleted.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| [metadata] | ||
| creation_date = "2026/06/19" | ||
| integration = ["aws"] | ||
| maturity = "production" | ||
| updated_date = "2026/06/19" | ||
|
|
||
| [rule] | ||
| author = ["Elastic"] | ||
| description = """ | ||
| Identifies modification or removal of an AWS Backup vault access policy via PutBackupVaultAccessPolicy or | ||
| DeleteBackupVaultAccessPolicy. The vault access policy is a resource-based policy that controls which principals, | ||
| including external accounts, can act on the vault and its recovery points. Adversaries may add or broaden principals to | ||
| gain cross-account access to backups (data theft), or weaken or delete the policy to remove protections such as | ||
| deny-delete guardrails. These changes are infrequent and should align with approved access design. | ||
| """ | ||
| false_positives = [ | ||
| """ | ||
| Security and platform teams legitimately set vault access policies for cross-account backup and disaster-recovery | ||
| designs, often via infrastructure-as-code. Review the policy document in "aws.cloudtrail.request_parameters" for new | ||
| or external principals, and confirm recipients are approved. Known automation roles can be excluded after | ||
| validation. | ||
| """, | ||
| ] | ||
| from = "now-6m" | ||
| index = ["logs-aws.cloudtrail-*"] | ||
| language = "kuery" | ||
| license = "Elastic License v2" | ||
| name = "AWS Backup Vault Access Policy Modified or Deleted" | ||
|
bryans3c marked this conversation as resolved.
|
||
| note = """## Triage and analysis | ||
|
|
||
| ### Investigating AWS Backup Vault Access Policy Modified or Deleted | ||
|
|
||
| The backup vault access policy is a resource-based policy governing who can access the vault and its recovery points. "PutBackupVaultAccessPolicy" replaces the policy and "DeleteBackupVaultAccessPolicy" removes it. Unexpected changes can grant external accounts access to backups (enabling copy/exfiltration of protected data) or strip deny-delete and other guardrails, weakening protection ahead of destruction. | ||
|
|
||
| ### Possible investigation steps | ||
|
|
||
| - Identify the actor in "aws.cloudtrail.user_identity.arn" and "aws.cloudtrail.user_identity.type", and review "source.ip" and "user_agent.original" for an unexpected origin. | ||
| - Inspect the policy document in "aws.cloudtrail.request_parameters" for new "Principal" entries, external account IDs, or removal of restrictive statements. | ||
| - Determine which vault and recovery points are affected and whether cross-account copy or restore activity followed. | ||
| - Correlate with adjacent backup activity by the same principal (StartCopyJob, DeleteRecoveryPoint, Vault Lock changes). | ||
|
|
||
| ### False positive analysis | ||
|
|
||
| - Cross-account backup/DR designs legitimately set vault policies, often via IaC. Confirm recipients are approved and exclude known automation roles on "aws.cloudtrail.user_identity.arn" after validation. | ||
|
|
||
| ### Response and remediation | ||
|
|
||
| - If unauthorized, restore a known-good vault access policy, remove rogue or external principals, and review for any cross-account copy or restore of recovery points. | ||
| - Rotate or restrict credentials for the principal if compromise is suspected, and restrict "backup:PutBackupVaultAccessPolicy" and "backup:DeleteBackupVaultAccessPolicy" to trusted administrators. | ||
|
|
||
| ### Additional information | ||
|
|
||
| - [Backup vault access policies](https://docs.aws.amazon.com/aws-backup/latest/devguide/create-a-vault-access-policy.html) | ||
| - [PutBackupVaultAccessPolicy API](https://docs.aws.amazon.com/aws-backup/latest/devguide/API_PutBackupVaultAccessPolicy.html) | ||
| """ | ||
| references = [ | ||
| "https://docs.aws.amazon.com/aws-backup/latest/devguide/create-a-vault-access-policy.html", | ||
| "https://docs.aws.amazon.com/aws-backup/latest/devguide/API_PutBackupVaultAccessPolicy.html", | ||
| "https://docs.aws.amazon.com/aws-backup/latest/devguide/API_DeleteBackupVaultAccessPolicy.html", | ||
| ] | ||
|
Copilot marked this conversation as resolved.
|
||
| risk_score = 47 | ||
| rule_id = "0e5af193-c983-4d08-8d85-cff6f46454cc" | ||
| setup = """The AWS integration (Elastic Agent), CloudTrail logging, and a configured CloudTrail trail are required for this rule. See the AWS integration documentation: https://docs.elastic.co/integrations/aws/cloudtrail""" | ||
|
bryans3c marked this conversation as resolved.
Outdated
|
||
| severity = "medium" | ||
| tags = [ | ||
| "Domain: Cloud", | ||
| "Data Source: AWS", | ||
| "Data Source: Amazon Web Services", | ||
| "Data Source: AWS CloudTrail", | ||
| "Data Source: AWS Backup", | ||
| "Use Case: Threat Detection", | ||
| "Tactic: Defense Evasion", | ||
| "Resources: Investigation Guide", | ||
| ] | ||
|
Copilot marked this conversation as resolved.
|
||
| timestamp_override = "event.ingested" | ||
| type = "query" | ||
|
|
||
| query = ''' | ||
| data_stream.dataset: "aws.cloudtrail" | ||
| and event.provider: "backup.amazonaws.com" | ||
| and event.action: ("PutBackupVaultAccessPolicy" or "DeleteBackupVaultAccessPolicy") | ||
| and event.outcome: "success" | ||
| and not aws.cloudtrail.user_identity.type: "AWSService" | ||
| ''' | ||
|
|
||
|
|
||
| [[rule.threat]] | ||
| framework = "MITRE ATT&CK" | ||
| [[rule.threat.technique]] | ||
| id = "T1562" | ||
| name = "Impair Defenses" | ||
| reference = "https://attack.mitre.org/techniques/T1562/" | ||
|
|
||
|
|
||
| [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", | ||
| "source.as.number", | ||
| "source.as.organization.name", | ||
| "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", | ||
| ] | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.