Azure Active Directory High Risk User Sign-in Heuristic
Identifies high risk Azure Active Directory (AD) sign-ins by leveraging Microsoft Identity Protection machine learning and heuristics.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/10/18"
3integration = ["azure"]
4maturity = "production"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Austin Songer"]
9description = """
10Identifies high risk Azure Active Directory (AD) sign-ins by leveraging Microsoft Identity Protection machine learning
11and heuristics.
12"""
13from = "now-25m"
14index = ["filebeat-*", "logs-azure*"]
15language = "kuery"
16license = "Elastic License v2"
17name = "Azure Active Directory High Risk User Sign-in Heuristic"
18note = """## Triage and analysis
19
20### Investigating Azure Active Directory High Risk User Sign-in Heuristic
21
22Microsoft Identity Protection is an Azure AD security tool that detects various types of identity risks and attacks.
23
24This rule identifies events produced by the Microsoft Identity Protection with a risk state equal to `confirmedCompromised` or `atRisk`.
25
26#### Possible investigation steps
27
28- 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).
29- Identify the user account involved and validate whether the suspicious activity is normal for that user.
30 - Consider the source IP address and geolocation for the involved user account. Do they look normal?
31 - Consider the device used to sign in. Is it registered and compliant?
32- Investigate other alerts associated with the user account during the past 48 hours.
33- Contact the account owner and confirm whether they are aware of this activity.
34- Check if this operation was approved and performed according to the organization's change management policy.
35- 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.
36
37### False positive analysis
38
39If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and device conditions.
40
41### Response and remediation
42
43- Initiate the incident response process based on the outcome of the triage.
44- Disable or limit the account during the investigation and response.
45- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
46 - Identify the account role in the cloud environment.
47 - Assess the criticality of affected services and servers.
48 - Work with your IT team to identify and minimize the impact on users.
49 - Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
50 - Identify any regulatory or legal ramifications related to this activity.
51- 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.
52- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
53- Consider enabling multi-factor authentication for users.
54- Follow security best practices [outlined](https://docs.microsoft.com/en-us/azure/security/fundamentals/identity-management-best-practices) by Microsoft.
55- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
56- 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).
57
58## Setup
59
60The Azure Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
61references = [
62 "https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-azure-monitor-sign-ins-log-schema",
63 "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/overview-identity-protection",
64 "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk",
65 "https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk#investigation-framework",
66]
67risk_score = 47
68rule_id = "26edba02-6979-4bce-920a-70b080a7be81"
69severity = "medium"
70tags = [
71 "Domain: Cloud",
72 "Data Source: Azure",
73 "Use Case: Identity and Access Audit",
74 "Resources: Investigation Guide",
75 "Tactic: Initial Access",
76]
77timestamp_override = "event.ingested"
78type = "query"
79
80query = '''
81event.dataset:azure.signinlogs and
82 azure.signinlogs.properties.risk_state:("confirmedCompromised" or "atRisk") and event.outcome:(success or Success)
83'''
84
85
86[[rule.threat]]
87framework = "MITRE ATT&CK"
88[[rule.threat.technique]]
89id = "T1078"
90name = "Valid Accounts"
91reference = "https://attack.mitre.org/techniques/T1078/"
92
93
94[rule.threat.tactic]
95id = "TA0001"
96name = "Initial Access"
97reference = "https://attack.mitre.org/tactics/TA0001/"
Triage and analysis
Investigating Azure Active Directory High Risk User Sign-in Heuristic
Microsoft Identity Protection is an Azure AD security tool that detects various types of identity risks and attacks.
This rule identifies events produced by the Microsoft Identity Protection with a risk state equal to confirmedCompromised
or atRisk
.
Possible investigation steps
- Identify the Risk Detection that triggered the event. A list with descriptions can be found here.
- 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 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.
References
Related rules
- Azure Active Directory High Risk Sign-in
- Azure Active Directory PowerShell Sign-in
- AWS Management Console Root Login
- Azure Privilege Identity Management Role Modified
- Multi-Factor Authentication Disabled for an Azure User