[metadata]
creation_date = "2020/11/18"
maturity = "production"
updated_date = "2021/01/04"

[rule]
author = ["Elastic"]
description = """
Identifies when a Safe Link policy is disabled in Microsoft 365. Safe Link policies for Office applications extend phishing
protection to documents that contain hyperlinks, even after they have been delivered to a user.
"""
false_positives = [
    """
    Disabling safe links may be done by a system or network administrator. Verify that the configuration change was
    expected. Exceptions can be added to this rule to filter expected behavior.
    """,
]
from = "now-30m"
index = ["filebeat-*", "logs-o365*"]
language = "kuery"
license = "Elastic License"
name = "Microsoft 365 Exchange Safe Link Policy Disabled"
note = "The Microsoft 365 Fleet integration or Filebeat module must be enabled to use this rule."
references = [
    "https://docs.microsoft.com/en-us/powershell/module/exchange/disable-safelinksrule?view=exchange-ps",
    "https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/atp-safe-links?view=o365-worldwide",
]
risk_score = 47
rule_id = "a989fa1b-9a11-4dd8-a3e9-f0de9c6eb5f2"
severity = "medium"
tags = ["Elastic", "Cloud", "Microsoft 365", "Continuous Monitoring", "SecOps", "Identity and Access"]
type = "query"

query = '''
event.dataset:o365.audit and event.provider:Exchange and event.category:web and event.action:"Disable-SafeLinksRule" and event.outcome:success
'''


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


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

