Detection rules › Splunk

Azure AD External Guest User Invited

Status
production
Severity
medium
Group by
aws::recipientAccountId, aws::userAgent, dest, initiatedBy, signature, src, type, user, vendor_product
Author
Gowthamaraj Rajendran, Mauricio Velazco, Splunk
Source
github.com/splunk/security_content

The following analytic detects the invitation of an external guest user within Azure AD. It leverages Azure AD AuditLogs to identify events where an external user is invited, using fields such as operationName and initiatedBy. Monitoring these invitations is crucial as they can lead to unauthorized access if abused. If confirmed malicious, this activity could allow attackers to gain access to internal resources, potentially leading to data breaches or further exploitation of the environment.

Known false positives

  • Administrator may legitimately invite external guest users. Filter as needed.

MITRE ATT&CK coverage

TacticTechniques
Persistence

Telemetry coverage

PlatformRecord / event type
AzureInvite external user

Rules detecting the same action

These rules filter on the same operation.

Rule body

name: Azure AD External Guest User Invited
id: c1fb4edb-cab1-4359-9b40-925ffd797fb5
version: 12
creation_date: '2022-08-19'
modification_date: '2026-05-13'
author: Gowthamaraj Rajendran, Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic detects the invitation of an external guest user within Azure AD. It leverages Azure AD AuditLogs to identify events where an external user is invited, using fields such as operationName and initiatedBy. Monitoring these invitations is crucial as they can lead to unauthorized access if abused. If confirmed malicious, this activity could allow attackers to gain access to internal resources, potentially leading to data breaches or further exploitation of the environment.
data_source:
    - Azure Active Directory Invite external user
search: |-
    `azure_monitor_aad` operationName="Invite external user"
      | rename properties.* as *
      | rename initiatedBy.user.userPrincipalName as initiatedBy
      | rename targetResources{}.type as type
      | rename userAgent as user_agent
      | fillnull
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY dest user src
           vendor_account vendor_product user_agent
           initiatedBy type signature
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `azure_ad_external_guest_user_invited_filter`
how_to_implement: You must install the latest version of Splunk Add-on for Microsoft Cloud Services from Splunkbase(https://splunkbase.splunk.com/app/3110/#/details). You must be ingesting Azure Active Directory events into your Splunk environment. This analytic was written to be used with the azure:monitor:aad sourcetype leveraging the AuditLogs log category.
known_false_positives: Administrator may legitimately invite external guest users. Filter as needed.
references:
    - https://dirkjanm.io/assets/raw/US-22-Mollema-Backdooring-and-hijacking-Azure-AD-accounts_final.pdf
    - https://www.blackhat.com/us-22/briefings/schedule/#backdooring-and-hijacking-azure-ad-accounts-by-abusing-external-identities-26999
    - https://attack.mitre.org/techniques/T1136/003/
    - https://docs.microsoft.com/en-us/azure/active-directory/external-identities/b2b-quickstart-add-guest-users-portal
finding:
    title: External Guest User $user$ initiated by $initiatedBy$
    entity:
        field: user
        type: user
        score: 50
intermediate_findings:
    entities:
        - field: initiatedBy
          type: user
          score: 50
          message: External Guest User $user$ initiated by $initiatedBy$
analytic_story:
    - Azure Active Directory Persistence
asset_type: Azure Active Directory
mitre_attack_id:
    - T1136.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: threat

Stages and Predicates

Stage 1: search

`azure_monitor_aad` operationName="Invite external user"

Stage 2: rename

| rename properties.* as *

Stage 3: rename

| rename initiatedBy.user.userPrincipalName as initiatedBy

Stage 4: rename

| rename targetResources{}.type as type

Stage 5: rename

| rename userAgent as user_agent

Stage 6: fillnull

| fillnull

Stage 7: stats

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

Stage 8: search

| `security_content_ctime(firstTime)`

Stage 9: search

| `security_content_ctime(lastTime)`

Stage 10: search

| `azure_ad_external_guest_user_invited_filter`

Indicators

These rows show field, operator, and value matches.