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

to-top