Azure Key Vault Modified

Identifies modifications to a Key Vault in Azure. The Key Vault is a service that safeguards encryption keys and secrets like certificates, connection strings, and passwords. Because this data is sensitive and business critical, access to key vaults should be secured to allow only authorized applications and users. This is a New Terms rule that detects when this activity hasn't been seen by the user in a specified time frame.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/08/31"
 3integration = ["azure"]
 4maturity = "production"
 5updated_date = "2025/07/09"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies modifications to a Key Vault in Azure. The Key Vault is a service that safeguards encryption keys and secrets
11like certificates, connection strings, and passwords. Because this data is sensitive and business critical, access to
12key vaults should be secured to allow only authorized applications and users. This is a New Terms rule that detects when this activity hasn't been seen by the user in a specified time frame.
13"""
14false_positives = [
15    """
16    Key vault modifications may be done by a system or network administrator. Verify whether the username, hostname,
17    and/or resource name should be making changes in your environment. Key vault modifications from unfamiliar users or
18    hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
19    """,
20]
21from = "now-9m"
22index = ["filebeat-*", "logs-azure.activitylogs-*"]
23language = "kuery"
24license = "Elastic License v2"
25name = "Azure Key Vault Modified"
26note = """## Triage and analysis
27
28### Investigating Azure Key Vault Modified
29
30Azure Key Vault is a cloud service that safeguards encryption keys and secrets like certificates, connection strings, and passwords. It is crucial for managing sensitive data in Azure environments. Unauthorized modifications to Key Vaults can lead to data breaches or service disruptions. This rule detects modifications to Key Vaults, which may indicate potential security incidents or misconfigurations.
31
32### Possible investigation steps
33- Review the `azure.activitylogs.operation_name` field to identify the specific operation performed on the Key Vault. Common operations include `Microsoft.KeyVault/vaults/write` for modifications and `Microsoft.KeyVault/vaults/delete` for deletions.
34- Check the `event.outcome` field to confirm the success of the operation. A successful outcome indicates that the modification or deletion was completed.
35- Investigate the `azure.activitylogs.identity.principal_id` or `azure.activitylogs.identity.principal_name` fields to determine the user or service principal that performed the operation. This can help identify whether the action was authorized or potentially malicious.
36- Analyze the `azure.activitylogs.resource_id` field to identify the specific Key Vault that was modified. This can help assess the impact of the change and whether it affects critical resources or applications.
37- Cross-reference the time of the modification with other security events or alerts in the environment to identify any patterns or related activities that may indicate a coordinated attack or misconfiguration.
38- Consult with relevant stakeholders or system owners to verify if the modification was planned or expected, and gather additional context if necessary.
39
40### False positive analysis
41- Routine maintenance activities by administrators can trigger alerts when they modify or delete Key Vaults. To manage this, create exceptions for known maintenance windows or specific administrator accounts.
42- Automated scripts or tools used for Key Vault management might perform frequent updates or deletions, leading to false positives. Identify these scripts and exclude their operations from triggering alerts by using specific identifiers or tags.
43- Changes made by authorized third-party services or integrations that manage Key Vault configurations can also result in false positives. Review and whitelist these services to prevent unnecessary alerts.
44- Regular updates or deployments in a development or testing environment may cause alerts. Consider excluding these environments from monitoring or adjusting the rule to focus on production environments only.
45- Temporary changes for troubleshooting or testing purposes might be flagged. Document these activities and use temporary exceptions to avoid false positives during these periods.
46
47### Response and remediation
48- Immediately isolate the affected Key Vault to prevent further unauthorized access or changes.
49- Review the Azure activity logs to identify the specific operations performed on the Key Vault and their outcomes.
50- Collaborate with security teams to assess the impact of the modifications and determine if any sensitive data was compromised.
51- If unauthorized changes are confirmed, initiate incident response procedures, including notifying affected parties and conducting a thorough investigation.
52- Implement additional monitoring and alerting for the affected Key Vault to detect any further suspicious activity.
53"""
54references = [
55    "https://docs.microsoft.com/en-us/azure/key-vault/general/basic-concepts",
56    "https://docs.microsoft.com/en-us/azure/key-vault/general/secure-your-key-vault",
57    "https://learn.microsoft.com/en-us/azure/key-vault/general/security-features"
58]
59risk_score = 21
60rule_id = "792dd7a6-7e00-4a0a-8a9a-a7c24720b5ec"
61severity = "low"
62tags = [
63    "Domain: Cloud",
64    "Domain: Identity",
65    "Data Source: Azure",
66    "Data Source: Azure Activity Logs",
67    "Tactic: Impact",
68    "Use Case: Configuration Audit",
69    "Resources: Investigation Guide"
70]
71timestamp_override = "event.ingested"
72type = "new_terms"
73
74query = '''
75event.dataset: "azure.activitylogs"
76    and azure.activitylogs.operation_name: MICROSOFT.KEYVAULT/VAULTS/*
77    and event.outcome:(Success or success)
78'''
79
80
81[[rule.threat]]
82framework = "MITRE ATT&CK"
83
84[rule.threat.tactic]
85id = "TA0040"
86name = "Impact"
87reference = "https://attack.mitre.org/tactics/TA0040/"
88
89[rule.new_terms]
90field = "new_terms_fields"
91value = ["azure.activitylogs.identity.claims_initiated_by_user.name"]
92
93[[rule.new_terms.history_window_start]]
94field = "history_window_start"
95value = "now-14d"

Triage and analysis

Investigating Azure Key Vault Modified

Azure Key Vault is a cloud service that safeguards encryption keys and secrets like certificates, connection strings, and passwords. It is crucial for managing sensitive data in Azure environments. Unauthorized modifications to Key Vaults can lead to data breaches or service disruptions. This rule detects modifications to Key Vaults, which may indicate potential security incidents or misconfigurations.

Possible investigation steps

  • Review the azure.activitylogs.operation_name field to identify the specific operation performed on the Key Vault. Common operations include Microsoft.KeyVault/vaults/write for modifications and Microsoft.KeyVault/vaults/delete for deletions.
  • Check the event.outcome field to confirm the success of the operation. A successful outcome indicates that the modification or deletion was completed.
  • Investigate the azure.activitylogs.identity.principal_id or azure.activitylogs.identity.principal_name fields to determine the user or service principal that performed the operation. This can help identify whether the action was authorized or potentially malicious.
  • Analyze the azure.activitylogs.resource_id field to identify the specific Key Vault that was modified. This can help assess the impact of the change and whether it affects critical resources or applications.
  • Cross-reference the time of the modification with other security events or alerts in the environment to identify any patterns or related activities that may indicate a coordinated attack or misconfiguration.
  • Consult with relevant stakeholders or system owners to verify if the modification was planned or expected, and gather additional context if necessary.

False positive analysis

  • Routine maintenance activities by administrators can trigger alerts when they modify or delete Key Vaults. To manage this, create exceptions for known maintenance windows or specific administrator accounts.
  • Automated scripts or tools used for Key Vault management might perform frequent updates or deletions, leading to false positives. Identify these scripts and exclude their operations from triggering alerts by using specific identifiers or tags.
  • Changes made by authorized third-party services or integrations that manage Key Vault configurations can also result in false positives. Review and whitelist these services to prevent unnecessary alerts.
  • Regular updates or deployments in a development or testing environment may cause alerts. Consider excluding these environments from monitoring or adjusting the rule to focus on production environments only.
  • Temporary changes for troubleshooting or testing purposes might be flagged. Document these activities and use temporary exceptions to avoid false positives during these periods.

Response and remediation

  • Immediately isolate the affected Key Vault to prevent further unauthorized access or changes.
  • Review the Azure activity logs to identify the specific operations performed on the Key Vault and their outcomes.
  • Collaborate with security teams to assess the impact of the modifications and determine if any sensitive data was compromised.
  • If unauthorized changes are confirmed, initiate incident response procedures, including notifying affected parties and conducting a thorough investigation.
  • Implement additional monitoring and alerting for the affected Key Vault to detect any further suspicious activity.

References

Related rules

to-top