Detection rules › Splunk

O365 Safe Links Detection

Status
production
Severity
medium
Group by
AlertId, Name, aws::recipientAccountId, dest, ot, src, trc, vendor_product
Author
Steven Dick
Source
github.com/splunk/security_content

The following analytic detects when any Microsoft Safe Links alerting is triggered. This behavior may indicate when user has interacted with a phishing or otherwise malicious link within the Microsoft Office ecosystem.

Known false positives

  • Based on Safe Links policies, may vary.

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Telemetry coverage

PlatformRecord / event type
Microsoft 365AlertEntityGenerated

Rule body

name: O365 Safe Links Detection
id: 711d9e8c-2cb0-45cf-8813-5f191ecb9b26
version: 11
creation_date: '2024-04-07'
modification_date: '2026-05-13'
author: Steven Dick
status: production
type: TTP
description: The following analytic detects when any Microsoft Safe Links alerting is triggered. This behavior may indicate when user has interacted with a phishing or otherwise malicious link within the Microsoft Office ecosystem.
data_source:
    - Office 365 Universal Audit Log
search: |-
    `o365_management_activity` Name="*a potentially malicious URL*" Operation=AlertEntityGenerated
      | fromjson Data
      | fillnull
      | stats count min(_time) as firstTime max(_time) as lastTime values(ObjectId) as url values(od) as desc
        BY AlertId, trc, Name,
           ot, dest, vendor_account,
           vendor_product, src
      | rename Name as signature, AlertId as signature_id, trc as user, ot as action
      | eval action = CASE(action == "Allowed", "allowed", action=="BlockPageOverride", "allowed", true(),"blocked")
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `o365_safe_links_detection_filter`
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events. The Safe Links capability must be configured and is typically only available to E3/E5 level customers.
known_false_positives: Based on Safe Links policies, may vary.
references:
    - https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/safe-links-about?view=o365-worldwide
    - https://attack.mitre.org/techniques/T1566/
finding:
    title: $user$ triggered a Microsoft Safe Links detection.
    entity:
        field: user
        type: user
        score: 50
analytic_story:
    - Office 365 Account Takeover
    - Spearphishing Attachments
asset_type: O365 Tenant
mitre_attack_id:
    - T1566.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: threat

Stages and Predicates

Stage 1: search

`o365_management_activity` Name="*a potentially malicious URL*" Operation=AlertEntityGenerated

Stage 2: search

| fromjson Data

Stage 3: fillnull

| fillnull

Stage 4: stats

| stats count min(_time) as firstTime max(_time) as lastTime values(ObjectId) as url values(od) as desc
    BY AlertId, trc, Name,
       ot, dest, vendor_account,
       vendor_product, src

Stage 5: rename

| rename Name as signature, AlertId as signature_id, trc as user, ot as action

Stage 6: eval

| eval action = CASE(action == "Allowed", "allowed", action=="BlockPageOverride", "allowed", true(),"blocked")
action =
ifaction="Allowed""allowed"
elifaction="BlockPageOverride""allowed"
else"blocked"

Stage 7: search

| `security_content_ctime(firstTime)`

Stage 8: search

| `security_content_ctime(lastTime)`

Stage 9: search

| `o365_safe_links_detection_filter`

Indicators

These rows show field, operator, and value matches.

Search terms

These SPL tokens match against raw event text.

StageTerm
2fromjson
2Data