Detection rules › Splunk

O365 New MFA Method Registered

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

The following analytic detects the registration of a new Multi-Factor Authentication (MFA) method for a user account within Office 365. It leverages O365 audit logs to identify changes in MFA configurations. This activity is significant as it may indicate an attacker's attempt to maintain persistence on a compromised account. If confirmed malicious, the attacker could bypass existing security measures, solidify their access, and potentially escalate privileges or access sensitive data. Immediate verification and remediation are required to secure the affected account.

Known false positives

  • Users may register MFA methods legitimately, investigate and filter as needed.

MITRE ATT&CK coverage

Telemetry coverage

PlatformRecord / event type
Microsoft 365Update user.

Rule body

name: O365 New MFA Method Registered
id: 4e12db1f-f7c7-486d-8152-a221cad6ac2b
version: 11
creation_date: '2023-12-06'
modification_date: '2026-05-13'
author: Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic detects the registration of a new Multi-Factor Authentication (MFA) method for a user account within Office 365. It leverages O365 audit logs to identify changes in MFA configurations. This activity is significant as it may indicate an attacker's attempt to maintain persistence on a compromised account. If confirmed malicious, the attacker could bypass existing security measures, solidify their access, and potentially escalate privileges or access sensitive data. Immediate verification and remediation are required to secure the affected account.
data_source:
    - O365 Update user.
search: |
    `o365_management_activity`
    Workload=AzureActiveDirectory
    Operation="Update user."
    | eval propertyName = mvindex('ModifiedProperties{}.Name', 0)
    | search propertyName IN ("StrongAuthenticationMethod", "StrongAuthenticationPhoneAppDetail")
    | eval oldvalue = mvindex('ModifiedProperties{}.OldValue',0)
    | eval newvalue = mvindex('ModifiedProperties{}.NewValue',0)
    | rex field=newvalue max_match=0 "(?i)(?<new_method_type>MethodType|DeviceName)"
    | rex field=oldvalue max_match=0 "(?i)(?<old_method_type>MethodType|DeviceName)"
    | eval count_new_method_type = coalesce(mvcount(new_method_type), 0)
    | eval count_old_method_type = coalesce(mvcount(old_method_type), 0)
    | where count_new_method_type > count_old_method_type
    | fillnull
    | stats earliest(_time) as firstTime
            latest(_time) as lastTime
            values(propertyName) as propertyName
      by user newvalue oldvalue vendor_account
         vendor_product dest signature src
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `o365_new_mfa_method_registered_filter`
how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives: Users may register MFA methods legitimately, investigate and filter as needed.
references:
    - https://attack.mitre.org/techniques/T1098/005/
    - https://www.microsoft.com/en-us/security/blog/2023/06/08/detecting-and-mitigating-a-multi-stage-aitm-phishing-and-bec-campaign/
    - https://www.csoonline.com/article/573451/sophisticated-bec-scammers-bypass-microsoft-365-multi-factor-authentication.html
finding:
    title: A new MFA method was added for $user$
    entity:
        field: user
        type: user
        score: 50
analytic_story:
    - Office 365 Persistence Mechanisms
asset_type: O365 Tenant
mitre_attack_id:
    - T1098.005
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: cloud
security_domain: identity

Stages and Predicates

Stage 1: search

`o365_management_activity`
Workload=AzureActiveDirectory
Operation="Update user."

Stage 2: eval

| eval propertyName = mvindex('ModifiedProperties{}.Name', 0)

Stage 3: search

| search propertyName IN ("StrongAuthenticationMethod", "StrongAuthenticationPhoneAppDetail")

Stage 4: eval

| eval oldvalue = mvindex('ModifiedProperties{}.OldValue',0)

Stage 5: eval

| eval newvalue = mvindex('ModifiedProperties{}.NewValue',0)

Stage 6: rex

| rex field=newvalue max_match=0 "(?i)(?<new_method_type>MethodType|DeviceName)"

Stage 7: rex

| rex field=oldvalue max_match=0 "(?i)(?<old_method_type>MethodType|DeviceName)"

Stage 8: eval

| eval count_new_method_type = coalesce(mvcount(new_method_type), 0)

Stage 9: eval

| eval count_old_method_type = coalesce(mvcount(old_method_type), 0)

Stage 10: where

| where count_new_method_type > count_old_method_type

Stage 11: fillnull

| fillnull

Stage 12: stats

| stats earliest(_time) as firstTime
        latest(_time) as lastTime
        values(propertyName) as propertyName
  by user newvalue oldvalue vendor_account
     vendor_product dest signature src

Stage 13: search

| `security_content_ctime(firstTime)`

Stage 14: search

| `security_content_ctime(lastTime)`

Stage 15: search

| `o365_new_mfa_method_registered_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Operationeq
  • "Update user."
field:"Operation" kind:eq
Workloadeq
  • AzureActiveDirectory
field:"Workload" kind:eq value:"AzureActiveDirectory"
count_new_method_typecross_field_compare
  • count_old_method_type transforms: op:gt
field:"count_new_method_type" kind:cross_field_compare value:"count_old_method_type"
propertyNamein
  • "StrongAuthenticationMethod"
  • "StrongAuthenticationPhoneAppDetail"
field:"propertyName" kind:in
sourcetypeeq
  • o365:management:activity
field:"sourcetype" kind:eq value:"o365:management:activity"