Skip to content

Commit cabf1c2

Browse files
terrancedejesusimays11claude
authored
[Rule Tuning] Update Azure / M365 Rule Names and File Paths (#5172)
* Tuning azure and m365 rule names and file paths * addressing unit test failures * addressing unit test failures * Changed Frontdoor to Front Door * removed extra space in name * adjusted Microsoft 365 to M365 in rule name * Update rules/integrations/azure/credential_access_storage_account_key_regenerated.toml * Update rules/integrations/azure/defense_evasion_automation_runbook_deleted.toml * Update rules/integrations/azure/execution_automation_runbook_created_or_modified.toml * Update rules/integrations/azure/persistence_automation_account_created.toml * Update rules/integrations/azure/impact_key_vault_modified_by_unusual_user.toml * Update rules/integrations/azure/initial_access_entra_id_protection_sign_in_risk_detected.toml * Update rules/integrations/azure/initial_access_entra_id_protection_user_risk_detected.toml * Update rules/integrations/azure/persistence_automation_webhook_created.toml * Update rules/integrations/azure/persistence_entra_id_global_administrator_role_assigned.toml * Update rules/integrations/azure/persistence_entra_id_mfa_disabled_for_user.toml * Update rules/integrations/azure/persistence_event_hub_created_or_updated.toml * Update rules/integrations/o365/collection_onedrive_excessive_file_downloads.toml * Update rules/integrations/o365/initial_access_defender_for_m365_threat_intelligence_signal.toml * Update rules/integrations/azure/credential_access_entra_id_signin_brute_force_microsoft_365.toml Co-authored-by: Isai <[email protected]> * Update rules/integrations/azure/credential_access_entra_id_signin_brute_force_microsoft_365.toml Co-authored-by: Isai <[email protected]> * Update rules/integrations/o365/credential_access_entra_id_potential_user_account_brute_force.toml Co-authored-by: Isai <[email protected]> * Update rules/integrations/o365/credential_access_entra_id_potential_user_account_brute_force.toml Co-authored-by: Isai <[email protected]> * fixed additional rule names * Update rule dates and investigation guide headers - Set updated_date to 2025/12/10 for all modified rules - Fix investigation guide headers to match actual rule names - Ensures compliance with test_rule_change_has_updated_date - Ensures compliance with test_investigation_guide_uses_rule_name 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * changed kibana alert rule name to rule ID --------- Co-authored-by: Isai <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent f4085ad commit cabf1c2

File tree

102 files changed

+294
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+294
-294
lines changed

rules/cross-platform/initial_access_azure_o365_with_network_alert.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
creation_date = "2025/04/29"
33
integration = ["azure", "o365"]
44
maturity = "production"
5-
updated_date = "2025/07/30"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
99
description = """
10-
This rule correlate Azure or Office 356 mail successful sign-in events with network security alerts by source.ip.
10+
This rule correlate Entra-ID or Microsoft 365 mail successful sign-in events with network security alerts by source address.
1111
Adversaries may trigger some network security alerts such as reputation or other anomalies before accessing cloud
1212
resources.
1313
"""
@@ -19,10 +19,10 @@ false_positives = [
1919
from = "now-60m"
2020
language = "esql"
2121
license = "Elastic License v2"
22-
name = "Microsoft 365 or Entra ID Sign-in from a Suspicious Source"
22+
name = "M365 or Entra ID Identity Sign-in from a Suspicious Source"
2323
note = """## Triage and analysis
2424
25-
### Investigating Microsoft 365 or Entra ID Sign-in from a Suspicious Source
25+
### Investigating M365 or Entra ID Identity Sign-in from a Suspicious Source
2626
2727
#### Possible investigation steps
2828
@@ -82,7 +82,7 @@ from logs-o365.audit-*, logs-azure.signinlogs-*, .alerts-security.*
8282
| where @timestamp > now() - 8 hours
8383
// filter for azure or m365 sign-in and external alerts with source.ip not null
8484
| where to_ip(source.ip) is not null
85-
and (event.dataset in ("o365.audit", "azure.signinlogs") or kibana.alert.rule.name == "External Alerts")
85+
and (event.dataset in ("o365.audit", "azure.signinlogs") or kibana.alert.rule.rule_id == "eb079c62-4481-4d6e-9643-3ca499df7aaa")
8686
and not cidr_match(
8787
to_ip(source.ip),
8888
"10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
@@ -93,13 +93,13 @@ from logs-o365.audit-*, logs-azure.signinlogs-*, .alerts-security.*
9393
)
9494
9595
// capture relevant raw fields
96-
| keep source.ip, event.action, event.outcome, event.dataset, kibana.alert.rule.name, event.category
96+
| keep source.ip, event.action, event.outcome, event.dataset, kibana.alert.rule.rule_id, event.category
9797
9898
// classify each source ip based on alert type
9999
| eval
100100
Esql.source_ip_mail_access_case = case(event.dataset == "o365.audit" and event.action == "MailItemsAccessed" and event.outcome == "success", to_ip(source.ip), null),
101101
Esql.source_ip_azure_signin_case = case(event.dataset == "azure.signinlogs" and event.outcome == "success", to_ip(source.ip), null),
102-
Esql.source_ip_network_alert_case = case(kibana.alert.rule.name == "external alerts" and not event.dataset in ("o365.audit", "azure.signinlogs"), to_ip(source.ip), null)
102+
Esql.source_ip_network_alert_case = case(kibana.alert.rule.rule_id == "eb079c62-4481-4d6e-9643-3ca499df7aaa" and not event.dataset in ("o365.audit", "azure.signinlogs"), to_ip(source.ip), null)
103103
104104
// aggregate by source ip
105105
| stats
@@ -109,7 +109,7 @@ from logs-o365.audit-*, logs-azure.signinlogs-*, .alerts-security.*
109109
Esql.source_ip_network_alert_case_count_distinct = count_distinct(Esql.source_ip_network_alert_case),
110110
Esql.event_dataset_count_distinct = count_distinct(event.dataset),
111111
Esql.event_dataset_values = values(event.dataset),
112-
Esql.kibana_alert_rule_name_values = values(kibana.alert.rule.name),
112+
Esql.kibana_alert_rule_id_values = values(kibana.alert.rule.rule_id),
113113
Esql.event_category_values = values(event.category)
114114
by Esql.source_ip = to_ip(source.ip)
115115

rules/integrations/azure/collection_entra_auth_broker_sharepoint_access_for_user_principal.toml renamed to rules/integrations/azure/collection_entra_id_auth_broker_sharepoint_access_for_user_principal.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/05/01"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/05/07"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -30,10 +30,10 @@ from = "now-9m"
3030
index = ["logs-azure.signinlogs-*"]
3131
language = "kuery"
3232
license = "Elastic License v2"
33-
name = "Microsoft Entra ID SharePoint Access for User Principal via Auth Broker"
33+
name = "Entra ID SharePoint Accessed by Unusual User and Microsoft Authentication Broker Client"
3434
note = """## Triage and analysis
3535
36-
### Investigating Microsoft Entra ID SharePoint Access for User Principal via Auth Broker
36+
### Investigating Entra ID SharePoint Accessed by Unusual User and Microsoft Authentication Broker Client
3737
3838
This rule identifies non-interactive sign-ins to SharePoint Online via the Microsoft Authentication Broker application using a refresh token or Primary Refresh Token (PRT). This type of activity may indicate token replay attacks, OAuth abuse, or automated access from previously consented apps or stolen sessions.
3939

rules/integrations/azure/collection_graph_email_access_by_unusual_public_client_via_graph.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/05/06"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/09/08"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -18,10 +18,10 @@ from = "now-9m"
1818
index = ["logs-azure.graphactivitylogs-*"]
1919
language = "kuery"
2020
license = "Elastic License v2"
21-
name = "Suspicious Email Access by First-Party Application via Microsoft Graph"
21+
name = "Microsoft Graph Request Email Access by Unusual User and Client"
2222
note = """## Triage and analysis
2323
24-
### Investigating Suspicious Email Access by First-Party Application via Microsoft Graph
24+
### Investigating Microsoft Graph Request Email Access by Unusual User and Client
2525
2626
This rule detects instances where a previously unseen or rare Microsoft Graph application client ID accesses email-related APIs, such as `/me/messages`, `/sendMail`, or `/mailFolders/inbox/messages`. These accesses are performed via delegated user credentials using common OAuth scopes like `Mail.Read`, `Mail.ReadWrite`, `Mail.Send`, or `email`. This activity may indicate unauthorized use of a newly consented or compromised application to read or exfiltrate mail content. This is a New Terms rule that only signals if the application ID (`azure.graphactivitylogs.properties.app_id`) and user principal object ID (`azure.graphactivitylogs.properties.user_principal_object_id`) have not been seen doing this activity in the last 14 days.
2727

rules/integrations/azure/credential_access_azure_entra_susp_device_code_signin.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/12/02"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/12/02"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -20,10 +20,10 @@ false_positives = [
2020
from = "now-9m"
2121
language = "esql"
2222
license = "Elastic License v2"
23-
name = "Suspicious Microsoft Entra ID Concurrent Sign-Ins via DeviceCode"
23+
name = "Entra ID OAuth Device Code Flow with Concurrent Sign-ins"
2424
note = """## Triage and analysis
2525
26-
### Investigating Suspicious Microsoft Entra ID Concurrent Sign-Ins via DeviceCode
26+
### Investigating Entra ID OAuth Device Code Flow with Concurrent Sign-ins
2727
2828
### Possible investigation steps
2929

rules/integrations/azure/credential_access_entra_id_brute_force_activity.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/09/06"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/09/26"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -23,10 +23,10 @@ from = "now-60m"
2323
interval = "15m"
2424
language = "esql"
2525
license = "Elastic License v2"
26-
name = "Microsoft Entra ID Sign-In Brute Force Activity"
26+
name = "Entra ID User Sign-in Brute Force Attempted"
2727
note = """## Triage and analysis
2828
29-
### Investigating Microsoft Entra ID Sign-In Brute Force Activity
29+
### Investigating Entra ID User Sign-in Brute Force Attempted
3030
3131
This rule detects brute-force authentication activity in Entra ID sign-in logs. It classifies failed sign-in attempts into behavior types such as password spraying, credential stuffing, or password guessing. The classification (`bf_type`) helps prioritize triage and incident response.
3232

rules/integrations/azure/credential_access_entra_id_excessive_account_lockouts.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ integration = ["azure"]
44
maturity = "production"
55
min_stack_version = "9.0.0"
66
min_stack_comments = "Bug fix in threshold rules."
7-
updated_date = "2025/12/08"
7+
updated_date = "2025/12/10"
88

99
[rule]
1010
author = ["Elastic"]
@@ -24,10 +24,10 @@ index = ["filebeat-*", "logs-azure.signinlogs-*"]
2424
interval = "30m"
2525
language = "kuery"
2626
license = "Elastic License v2"
27-
name = "Microsoft Entra ID Excessive Account Lockouts Detected"
27+
name = "Entra ID Excessive Account Lockouts Detected"
2828
note = """## Triage and analysis
2929
30-
### Investigating Microsoft Entra ID Excessive Account Lockouts Detected
30+
### Investigating Entra ID Excessive Account Lockouts Detected
3131
3232
This rule detects a high number of sign-in failures due to account lockouts (error code `50053`) in Microsoft Entra ID sign-in logs. These lockouts are typically caused by repeated authentication failures, often as a result of brute-force tactics such as password spraying, credential stuffing, or automated guessing. This detection is time-bucketed and aggregates attempts to identify bursts or coordinated campaigns targeting multiple users.
3333

rules/integrations/azure/credential_access_entra_signin_brute_force_microsoft_365.toml renamed to rules/integrations/azure/credential_access_entra_id_signin_brute_force_microsoft_365.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/09/06"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/09/26"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -23,10 +23,10 @@ from = "now-60m"
2323
interval = "15m"
2424
language = "esql"
2525
license = "Elastic License v2"
26-
name = "Microsoft 365 Brute Force via Entra ID Sign-Ins"
26+
name = "Entra ID Sign-in Brute Force Attempted (Microsoft 365)"
2727
note = """## Triage and analysis
2828
29-
### Investigating Microsoft 365 Brute Force via Entra ID Sign-Ins
29+
### Investigating Entra ID Sign-in Brute Force Attempted (Microsoft 365)
3030
3131
Identifies brute-force authentication activity against Microsoft 365 services using Entra ID sign-in logs. This detection groups and classifies failed sign-in attempts based on behavior indicative of password spraying, credential stuffing, or password guessing. The classification (`bf_type`) is included for immediate triage.
3232

rules/integrations/azure/credential_access_azure_entra_suspicious_signin.toml renamed to rules/integrations/azure/credential_access_entra_id_suspicious_signin.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/04/28"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/09/30"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -20,10 +20,10 @@ false_positives = [
2020
from = "now-60m"
2121
language = "esql"
2222
license = "Elastic License v2"
23-
name = "Microsoft Entra ID Concurrent Sign-Ins with Suspicious Properties"
23+
name = "Entra ID Concurrent Sign-in with Suspicious Properties"
2424
note = """## Triage and analysis
2525
26-
### Investigating Microsoft Entra ID Concurrent Sign-Ins with Suspicious Properties
26+
### Investigating Entra ID Concurrent Sign-in with Suspicious Properties
2727
2828
### Possible investigation steps
2929

rules/integrations/azure/credential_access_azure_entra_totp_brute_force_attempts.toml renamed to rules/integrations/azure/credential_access_entra_id_totp_brute_force_attempts.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/12/11"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/09/26"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -21,10 +21,10 @@ false_positives = [
2121
from = "now-9m"
2222
language = "esql"
2323
license = "Elastic License v2"
24-
name = "Microsoft Entra ID MFA TOTP Brute Force Attempts"
24+
name = "Entra ID MFA TOTP Brute Force Attempted"
2525
note = """## Triage and analysis
2626
27-
### Investigating Microsoft Entra ID MFA TOTP Brute Force Attempts
27+
### Investigating Entra ID MFA TOTP Brute Force Attempted
2828
2929
This rule detects brute force attempts against Azure Entra multi-factor authentication (MFA) Time-based One-Time Password (TOTP) verification codes. It identifies high-frequency failed TOTP code attempts for a single user in a short time-span with a high number of distinct session IDs. Adversaries may programmatically attempt to brute-force TOTP codes by generating several sessions and attempting to guess the correct code.
3030

rules/integrations/azure/credential_access_azure_key_vault_excessive_retrieval.toml renamed to rules/integrations/azure/credential_access_key_vault_excessive_retrieval.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/07/10"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/10/14"
5+
updated_date = "2025/12/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -30,10 +30,10 @@ from = "now-9m"
3030
interval = "8m"
3131
language = "esql"
3232
license = "Elastic License v2"
33-
name = "Excessive Secret or Key Retrieval from Azure Key Vault"
33+
name = "Azure Key Vault Excessive Secret or Key Retrieved"
3434
note = """## Triage and analysis
3535
36-
### Investigating Excessive Secret or Key Retrieval from Azure Key Vault
36+
### Investigating Azure Key Vault Excessive Secret or Key Retrieved
3737
3838
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 excessive secret or key retrieval operations from Azure Key Vault, which may indicate potential abuse or unauthorized access attempts.
3939

0 commit comments

Comments
 (0)