Detection rules › Splunk

O365 High Privilege Role Granted

Status
production
Severity
medium
Group by
ObjectId, aws::recipientAccountId, dest, role_id, role_name, signature, src, user, vendor_product
Author
Mauricio Velazco, Splunk
Source
github.com/splunk/security_content

The following analytic detects when high-privilege roles such as "Exchange Administrator," "SharePoint Administrator," or "Global Administrator" are granted within Office 365. It leverages O365 audit logs to identify events where these roles are assigned to any user or service account. This activity is significant for SOCs as these roles provide extensive permissions, allowing broad access and control over critical resources and data. If confirmed malicious, this could enable attackers to gain significant control over O365 resources, access, modify, or delete critical data, and compromise the overall security and functionality of the O365 environment.

Known false positives

  • Privilege roles may be assigned for legitimate purposes, filter as needed.

MITRE ATT&CK coverage

Telemetry coverage

PlatformRecord / event type
Microsoft 365Add member to role.

Rules detecting the same action

These rules filter on the same operation.

Rule body

name: O365 High Privilege Role Granted
id: e78a1037-4548-4072-bb1b-ad99ae416426
version: 10
creation_date: '2023-12-06'
modification_date: '2026-05-13'
author: Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic detects when high-privilege roles such as "Exchange Administrator," "SharePoint Administrator," or "Global Administrator" are granted within Office 365. It leverages O365 audit logs to identify events where these roles are assigned to any user or service account. This activity is significant for SOCs as these roles provide extensive permissions, allowing broad access and control over critical resources and data. If confirmed malicious, this could enable attackers to gain significant control over O365 resources, access, modify, or delete critical data, and compromise the overall security and functionality of the O365 environment.
data_source:
    - O365 Add member to role.
search: "`o365_management_activity` Operation=\"Add member to role.\" Workload=AzureActiveDirectory | eval role_id = mvindex('ModifiedProperties{}.NewValue',2) | eval role_name = mvindex('ModifiedProperties{}.NewValue',1) | where role_id IN (\"29232cdf-9323-42fd-ade2-1d097af3e4de\", \"f28a1f50-f6e7-4571-818b-6a12f2af6b6c\", \"62e90394-69f5-4237-9190-012177145e10\") | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by signature dest user src vendor_account vendor_product ObjectId role_name role_id | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `o365_high_privilege_role_granted_filter`"
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives: Privilege roles may be assigned for legitimate purposes, filter as needed.
references:
    - https://attack.mitre.org/techniques/T1098/003/
    - https://learn.microsoft.com/en-us/azure/active-directory/roles/permissions-reference
    - https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/about-exchange-online-admin-role?view=o365-worldwide
    - https://learn.microsoft.com/en-us/sharepoint/sharepoint-admin-role
finding:
    title: $user$ granted high privilege roles to $ObjectId$
    entity:
        field: user
        type: user
        score: 50
analytic_story:
    - Office 365 Persistence Mechanisms
asset_type: O365 Tenant
mitre_attack_id:
    - T1098.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: identity

Stages and Predicates

Stage 1: search

`o365_management_activity` Operation="Add member to role." Workload=AzureActiveDirectory

Stage 2: eval

| eval role_id = mvindex('ModifiedProperties{}.NewValue',2)

Stage 3: eval

| eval role_name = mvindex('ModifiedProperties{}.NewValue',1)

Stage 4: where

| where role_id IN ("29232cdf-9323-42fd-ade2-1d097af3e4de", "f28a1f50-f6e7-4571-818b-6a12f2af6b6c", "62e90394-69f5-4237-9190-012177145e10")

Stage 5: fillnull

| fillnull

Stage 6: stats

| stats count min(_time) as firstTime max(_time) as lastTime by signature dest user src vendor_account vendor_product ObjectId role_name role_id

Stage 7: search

| `security_content_ctime(firstTime)`

Stage 8: search

| `security_content_ctime(lastTime)`

Stage 9: search

| `o365_high_privilege_role_granted_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Operationeq
  • "Add member to role."
field:"Operation" kind:eq
Workloadeq
  • AzureActiveDirectory
field:"Workload" kind:eq value:"AzureActiveDirectory"
role_idin
  • "29232cdf-9323-42fd-ade2-1d097af3e4de"
  • "62e90394-69f5-4237-9190-012177145e10"
  • "f28a1f50-f6e7-4571-818b-6a12f2af6b6c"
field:"role_id" kind:in
sourcetypeeq
  • o365:management:activity
field:"sourcetype" kind:eq value:"o365:management:activity"