Azure Entra ID Password Spraying (Non-Interactive SFA)
editAzure Entra ID Password Spraying (Non-Interactive SFA)
editIdentifies potential brute-force (password spraying) attempts against Azure Entra ID user accounts by detecting a high number of failed non-interactive single-factor authentication (SFA) login attempts within a 10-minute window. Attackers may attempt to brute force user accounts to gain unauthorized access to Azure Entra ID services. Non-interactive SFA login attempts bypass conditional-access policies (CAP) and multi-factor authentication (MFA) requirements, making them a high-risk vector for unauthorized access. Adversaries may attempt this to identify which accounts are still valid from acquired credentials via phishing, infostealers, or other means.
Rule type: esql
Rule indices: None
Severity: medium
Risk score: 47
Runs every: 10m
Searches indices from: now-30m (Date Math format, see also Additional look-back time
)
Maximum alerts per execution: 100
References:
Tags:
- Domain: Cloud
- Data Source: Azure
- Data Source: Entra ID
- Data Source: Entra ID Sign-in
- Use Case: Identity and Access Audit
- Use Case: Threat Detection
- Tactic: Credential Access
- Resources: Investigation Guide
Version: 1
Rule authors:
- Elastic
Rule license: Elastic License v2
Investigation guide
editTriage and analysis
Investigating Azure Entra ID Password Spraying (Non-Interactive SFA)
This rule identifies repeated failed authentication attempts using non-interactive authentication, which is often leveraged for automated attacks or legacy authentication methods. Successful compromise of an account could lead to unauthorized access, privilege escalation, or lateral movement within the environment.
This is an ES|QL rule with aggregations that truncate results in the alert document. It is recommended to pivot investigation into the raw documents for further triage and analysis.
Possible investigation steps
-
Identify the source IP address from which the failed login attempts originated by reviewing
source.ip
. Determine if the IP is associated with known malicious activity using threat intelligence sources or if it belongs to a corporate VPN, proxy, or automation process. -
Analyze affected user accounts by reviewing
azure.signinlogs.properties.user_principal_name
to determine if they belong to privileged roles or high-value users. Look for patterns indicating multiple failed attempts across different users, which could suggest a password spraying attempt. -
Examine the authentication method used in
azure.signinlogs.properties.authentication_details
to identify which authentication protocols were attempted and why they failed. Legacy authentication methods may be more susceptible to brute-force attacks. -
Review the authentication error codes found in
azure.signinlogs.properties.status.error_code
to understand why the login attempts failed. Common errors include50126
for invalid credentials,50053
for account lockouts,50055
for expired passwords, and50056
for users without a password. -
Correlate failed logins with other sign-in activity by looking at
event.outcome
. Identify if there were any successful logins from the same user shortly after multiple failures or if there are different geolocations or device fingerprints associated with the same account. -
Review
azure.signinlogs.properties.app_id
to identify which applications were initiating the authentication attempts. Determine if these applications are Microsoft-owned, third-party, or custom applications and if they are authorized to access the resources. -
Check for any conditional access policies that may have been triggered by the failed login attempts by reviewing
azure.signinlogs.properties.authentication_requirement
. This can help identify if the failed attempts were due to policy enforcement or misconfiguration.
False positive analysis
Common benign scenarios
-
Automated scripts or applications using non-interactive authentication may trigger this detection, particularly if they rely on legacy authentication protocols recorded in
azure.signinlogs.properties.authentication_protocol
. -
Corporate proxies or VPNs may cause multiple users to authenticate from the same IP, appearing as repeated failed attempts under
source.ip
. -
User account lockouts from forgotten passwords or misconfigured applications may show multiple authentication failures in
azure.signinlogs.properties.status.error_code
.
How to reduce false positives
-
Exclude known trusted IPs, such as corporate infrastructure, from alerts by filtering
source.ip
. -
Exlcude known custom applications from
azure.signinlogs.properties.app_id
that are authorized to use non-interactive authentication. -
Ignore principals with a history of failed logins due to legitimate reasons, such as expired passwords or account lockouts, by filtering
azure.signinlogs.properties.user_principal_name
. - Correlate sign-in failures with password reset events or normal user behavior before triggering an alert.
Response and remediation
Immediate actions
-
Block the source IP address in
source.ip
if determined to be malicious. -
Reset passwords for all affected user accounts listed in
azure.signinlogs.properties.user_principal_name
and enforce stronger password policies. -
Ensure basic authentication is disabled for all applications using legacy authentication protocols listed in
azure.signinlogs.properties.authentication_protocol
. - Enable multi-factor authentication (MFA) for impacted accounts to mitigate credential-based attacks.
-
Review conditional access policies to ensure they are correctly configured to block unauthorized access attempts recorded in
azure.signinlogs.properties.authentication_requirement
. -
Review Conditional Access policies to enforce risk-based authentication and block unauthorized access attempts recorded in
azure.signinlogs.properties.authentication_requirement
.
Long-term mitigation
- Implement a zero-trust security model by enforcing least privilege access and continuous authentication.
- Regularly review and update conditional access policies to ensure they are effective against evolving threats.
-
Restrict the use of legacy authentication protocols by disabling authentication methods listed in
azure.signinlogs.properties.client_app_used
. -
Regularly audit authentication logs in
azure.signinlogs
to detect abnormal login behavior and ensure early detection of potential attacks. - Regularly rotate client credentials and secrets for applications using non-interactive authentication to reduce the risk of credential theft.
Rule query
editfrom logs-azure.signinlogs* | keep @timestamp, event.dataset, event.category, azure.signinlogs.properties.is_interactive, azure.signinlogs.properties.authentication_requirement, azure.signinlogs.properties.resource_display_name, azure.signinlogs.properties.status.error_code, azure.signinlogs.properties.resource_service_principal_id, azure.signinlogs.category, event.outcome, azure.signinlogs.properties.user_principal_name, source.ip // truncate the timestamp to a 10-minute window | eval target_time_window = DATE_TRUNC(10 minutes, @timestamp) | WHERE event.dataset == "azure.signinlogs" and event.category == "authentication" and azure.signinlogs.properties.is_interactive == false and azure.signinlogs.properties.authentication_requirement == "singleFactorAuthentication" and event.outcome != "success" and azure.signinlogs.properties.status.error_code in (50053, 50126, 50055, 50056, 50064, 50144) // for tuning review azure.signinlogs.properties.status.error_code // https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes // count the number of unique user login attempts | stats unique_user_login_count = count_distinct(azure.signinlogs.properties.resource_service_principal_id) by target_time_window, azure.signinlogs.properties.user_principal_name, azure.signinlogs.properties.status.error_code // filter for >= 20 failed SFA auth attempts with the same error codes | where unique_user_login_count >= 20
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Credential Access
- ID: TA0006
- Reference URL: https://attack.mitre.org/tactics/TA0006/
-
Technique:
- Name: Brute Force
- ID: T1110
- Reference URL: https://attack.mitre.org/techniques/T1110/
-
Sub-technique:
- Name: Password Spraying
- ID: T1110.003
- Reference URL: https://attack.mitre.org/techniques/T1110/003/