Detection rules › Splunk

O365 Add App Role Assignment Grant User

Status
production
Severity
medium
Group by
aws::recipientAccountId, dest, signature, src, user, vendor_product
Author
Rod Soto, Splunk
Source
github.com/splunk/security_content

The following analytic detects the addition of an application role assignment grant to a user in Office 365. It leverages data from the o365_management_activity dataset, specifically monitoring the "Add app role assignment grant to user" operation. This activity is significant as it can indicate unauthorized privilege escalation or the assignment of sensitive roles to users. If confirmed malicious, this could allow an attacker to gain elevated permissions, potentially leading to unauthorized access to critical resources and data within the Office 365 environment.

Known false positives

  • The creation of a new Federation is not necessarily malicious, however this events need to be followed closely, as it may indicate federated credential abuse or backdoor via federated identities at a different cloud provider.

MITRE ATT&CK coverage

TacticTechniques
Persistence

Telemetry coverage

Rule body

name: O365 Add App Role Assignment Grant User
id: b2c81cc6-6040-11eb-ae93-0242ac130002
version: 12
creation_date: '2021-01-26'
modification_date: '2026-05-13'
author: Rod Soto, Splunk
status: production
type: TTP
description: The following analytic detects the addition of an application role assignment grant to a user in Office 365. It leverages data from the `o365_management_activity` dataset, specifically monitoring the "Add app role assignment grant to user" operation. This activity is significant as it can indicate unauthorized privilege escalation or the assignment of sensitive roles to users. If confirmed malicious, this could allow an attacker to gain elevated permissions, potentially leading to unauthorized access to critical resources and data within the Office 365 environment.
data_source:
    - O365 Add app role assignment grant to user.
search: |-
    `o365_management_activity` Workload=AzureActiveDirectory Operation="Add app role assignment grant to user."
      | fillnull
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY signature dest user
           src vendor_account vendor_product
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `o365_add_app_role_assignment_grant_user_filter`
how_to_implement: You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity
known_false_positives: The creation of a new Federation is not necessarily malicious, however this events need to be followed closely, as it may indicate federated credential abuse or backdoor via federated identities at a different cloud provider.
references:
    - https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/wp-m-unc2452-2021-000343-01.pdf
    - https://www.cisa.gov/uscert/ncas/alerts/aa21-008a
finding:
    title: User $user$ added a new app role assignment
    entity:
        field: user
        type: user
        score: 50
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 50
          message: User $user$ added a new app role assignment
analytic_story:
    - Office 365 Persistence Mechanisms
    - Cloud Federated Credential Abuse
asset_type: O365 Tenant
mitre_attack_id:
    - T1136.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: threat

Stages and Predicates

Stage 1: search

`o365_management_activity` Workload=AzureActiveDirectory Operation="Add app role assignment grant to user."

Stage 2: fillnull

| fillnull

Stage 3: stats

| stats count min(_time) as firstTime max(_time) as lastTime
    BY signature dest user
       src vendor_account vendor_product

Stage 4: search

| `security_content_ctime(firstTime)`

Stage 5: search

| `security_content_ctime(lastTime)`

Stage 6: search

| `o365_add_app_role_assignment_grant_user_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Operationeq
  • "Add app role assignment grant to user."
field:"Operation" kind:eq
Workloadeq
  • AzureActiveDirectory
field:"Workload" kind:eq value:"AzureActiveDirectory"
sourcetypeeq
  • o365:management:activity
field:"sourcetype" kind:eq value:"o365:management:activity"