diff --git a/rules/integrations/azure/initial_access_azure_active_directory_high_risk_signin.toml b/rules/integrations/azure/initial_access_azure_active_directory_high_risk_signin.toml deleted file mode 100644 index fb43d7cada4..00000000000 --- a/rules/integrations/azure/initial_access_azure_active_directory_high_risk_signin.toml +++ /dev/null @@ -1,104 +0,0 @@ -[metadata] -creation_date = "2021/01/04" -integration = ["azure"] -maturity = "production" -updated_date = "2024/05/21" - -[rule] -author = ["Elastic", "Willem D'Haese"] -description = """ -Identifies high risk Azure Active Directory (AD) sign-ins by leveraging Microsoft's Identity Protection machine learning -and heuristics. Identity Protection categorizes risk into three tiers: low, medium, and high. While Microsoft does not -provide specific details about how risk is calculated, each level brings higher confidence that the user or sign-in is -compromised. -""" -from = "now-25m" -index = ["filebeat-*", "logs-azure*"] -language = "kuery" -license = "Elastic License v2" -name = "Azure Active Directory High Risk Sign-in" -note = """## Triage and analysis - -### Investigating Azure Active Directory High Risk Sign-in - -Microsoft Identity Protection is an Azure AD security tool that detects various types of identity risks and attacks. - -This rule identifies events produced by Microsoft Identity Protection with high risk levels or high aggregated risk level. - -#### Possible investigation steps - -- Identify the Risk Detection that triggered the event. A list with descriptions can be found [here](https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/concept-identity-protection-risks#risk-types-and-detection). -- Identify the user account involved and validate whether the suspicious activity is normal for that user. - - Consider the source IP address and geolocation for the involved user account. Do they look normal? - - Consider the device used to sign in. Is it registered and compliant? -- Investigate other alerts associated with the user account during the past 48 hours. -- Contact the account owner and confirm whether they are aware of this activity. -- Check if this operation was approved and performed according to the organization's change management policy. -- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours. - -### False positive analysis - -If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions. - -### Response and remediation - -- Initiate the incident response process based on the outcome of the triage. -- Disable or limit the account during the investigation and response. -- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context: - - Identify the account role in the cloud environment. - - Assess the criticality of affected services and servers. - - Work with your IT team to identify and minimize the impact on users. - - Identify if the attacker is moving laterally and compromising other accounts, servers, or services. - - Identify any regulatory or legal ramifications related to this activity. -- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions. -- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users. -- Consider enabling multi-factor authentication for users. -- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft. -- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector. -- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR). - -## Setup - -The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule. - -Note that details for `azure.signinlogs.properties.risk_level_during_signin` and `azure.signinlogs.properties.risk_level_aggregated` -are only available for Azure AD Premium P2 customers. All other customers will be returned `hidden`. -""" -references = [ - "https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/howto-conditional-access-policy-risk", - "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection", - "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk", -] -risk_score = 73 -rule_id = "37994bca-0611-4500-ab67-5588afe73b77" -severity = "high" -tags = [ - "Domain: Cloud", - "Data Source: Azure", - "Use Case: Identity and Access Audit", - "Resources: Investigation Guide", - "Tactic: Initial Access", -] -timestamp_override = "event.ingested" -type = "query" - -query = ''' -event.dataset:azure.signinlogs and - (azure.signinlogs.properties.risk_level_during_signin:high or azure.signinlogs.properties.risk_level_aggregated:high) and - event.outcome:(success or Success) -''' - - -[[rule.threat]] -framework = "MITRE ATT&CK" -[[rule.threat.technique]] -id = "T1078" -name = "Valid Accounts" -reference = "https://attack.mitre.org/techniques/T1078/" - - -[rule.threat.tactic] -id = "TA0001" -name = "Initial Access" -reference = "https://attack.mitre.org/tactics/TA0001/" - diff --git a/rules/integrations/azure/initial_access_entra_id_high_risk_signin.toml b/rules/integrations/azure/initial_access_entra_id_high_risk_signin.toml new file mode 100644 index 00000000000..edeab46d0d5 --- /dev/null +++ b/rules/integrations/azure/initial_access_entra_id_high_risk_signin.toml @@ -0,0 +1,96 @@ +[metadata] +creation_date = "2021/01/04" +integration = ["azure"] +maturity = "production" +updated_date = "2025/05/21" + +[rule] +author = ["Elastic", "Willem D'Haese"] +description = """ +Identifies high risk Microsoft Entra ID sign-ins by leveraging Microsoft's Identity Protection machine learning +and heuristics. Identity Protection categorizes risk into three tiers: low, medium, and high. While Microsoft does not +provide specific details about how risk is calculated, each level brings higher confidence that the user or sign-in is +compromised. +""" +from = "now-9m" +index = ["filebeat-*", "logs-azure.signinlogs*"] +language = "kuery" +license = "Elastic License v2" +name = "Microsoft Entra ID High Risk Sign-in" +note = """## Triage and analysis + +### Investigating Microsoft Entra ID High Risk Sign-in + +This rule detects high-risk sign-ins in Microsoft Entra ID as identified by Identity Protection. These sign-ins are flagged with a risk level of `high` during the authentication process, indicating a strong likelihood of compromise based on Microsoft’s machine learning and heuristics. This alert is valuable for identifying accounts under active attack or compromise using valid credentials. + +### Possible investigation steps + +- Review the `azure.signinlogs.properties.user_id` and associated identity fields to determine the impacted user. +- Inspect the `risk_level_during_signin` field and confirm it is set to `high`. If `risk_level_aggregated` is also present and high, this suggests sustained risk across multiple sign-ins. +- Check `source.ip`, `source.geo.country_name`, and `source.as.organization.name` to evaluate the origin of the sign-in attempt. Flag unexpected geolocations or ASNs (e.g., anonymizers or residential ISPs). +- Review the `device_detail` fields such as `operating_system` and `browser` for new or unrecognized devices. +- Validate the `client_app_used` (e.g., legacy protocols, desktop clients) and `app_display_name` (e.g., Office 365 Exchange Online) to assess if risky legacy methods were involved. +- Examine `applied_conditional_access_policies` to verify if MFA or blocking policies were triggered or bypassed. +- Check `authentication_details.authentication_method` to see if multi-factor authentication was satisfied (e.g., "Mobile app notification"). +- Correlate this activity with other alerts or sign-ins from the same account within the last 24–48 hours. +- Contact the user to confirm if the sign-in was expected. If not, treat the account as compromised and proceed with containment. + +### False positive analysis + +- Risky sign-ins may be triggered during legitimate travel, VPN use, or remote work scenarios from unusual locations. +- In some cases, users switching devices or networks rapidly may trigger high-risk scores. +- Automated scanners or penetration tests using known credentials may mimic high-risk login behavior. +- Confirm whether the risk was remediated automatically by Microsoft Identity Protection before proceeding with escalations. + +### Response and remediation + +- If compromise is suspected, immediately disable the user account and revoke active sessions and tokens. +- Initiate credential reset and ensure multi-factor authentication is enforced. +- Review audit logs and sign-in history for the account to assess lateral movement or data access post sign-in. +- Inspect activity on services such as Exchange, SharePoint, or Azure resources to understand the impact. +- Determine if the attacker leveraged other accounts or escalated privileges. +- Use the incident findings to refine conditional access policies, such as enforcing MFA for high-risk sign-ins or blocking legacy protocols. +- Review and tighten policies that allow sign-ins from high-risk geographies or unknown devices. +""" +references = [ + "https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/howto-conditional-access-policy-risk", + "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection", + "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk", +] +risk_score = 73 +rule_id = "37994bca-0611-4500-ab67-5588afe73b77" +severity = "high" +tags = [ + "Domain: Cloud", + "Data Source: Azure", + "Data Source: Microsoft Entra ID", + "Data Source: Microsoft Entra ID Sign-in Logs", + "Use Case: Identity and Access Audit", + "Resources: Investigation Guide", + "Tactic: Initial Access", +] +timestamp_override = "event.ingested" +type = "query" + +query = ''' +event.dataset:azure.signinlogs and + ( + azure.signinlogs.properties.risk_level_during_signin:high or + azure.signinlogs.properties.risk_level_aggregated:high + ) +''' + + +[[rule.threat]] +framework = "MITRE ATT&CK" +[[rule.threat.technique]] +id = "T1078" +name = "Valid Accounts" +reference = "https://attack.mitre.org/techniques/T1078/" + + +[rule.threat.tactic] +id = "TA0001" +name = "Initial Access" +reference = "https://attack.mitre.org/tactics/TA0001/" +