[metadata]
creation_date = "2020/12/01"
maturity = "production"
updated_date = "2020/12/15"

[rule]
author = ["Elastic"]
description = """
Identifies a high number (25) of failed Microsoft 365 user authentication attempts from a single IP address within 30
minutes, which could be indicative of a password spraying attack. An adversary may attempt a password spraying attack to
obtain unauthorized access to user accounts.
"""
false_positives = [
    """
    Automated processes that attempt to authenticate using expired credentials and unbounded retries may lead to false
    positives.
    """,
]
from = "now-30m"
index = ["filebeat-*", "logs-o365*"]
language = "kuery"
license = "Elastic License"
name = "Potential Password Spraying of Microsoft 365 User Accounts"
note = "The Microsoft 365 Fleet integration or Filebeat module must be enabled to use this rule."
risk_score = 73
rule_id = "3efee4f0-182a-40a8-a835-102c68a4175d"
severity = "high"
tags = ["Elastic", "Cloud", "Microsoft 365", "Continuous Monitoring", "SecOps", "Identity and Access"]
type = "threshold"

query = '''
event.dataset:o365.audit and event.provider:AzureActiveDirectory and event.category:authentication and event.action:UserLoginFailed and event.outcome:failure
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1110"
name = "Brute Force"
reference = "https://attack.mitre.org/techniques/T1110/"


[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"

[rule.threshold]
field = "source.ip"
value = 25

