Detection: O365 New MFA Method Registered

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.

 1`o365_management_activity` Workload=AzureActiveDirectory  Operation="Update user."  
 2| eval propertyName = mvindex('ModifiedProperties{}.Name', 0) 
 3| search propertyName = StrongAuthenticationMethod 
 4| eval oldvalue = mvindex('ModifiedProperties{}.OldValue',0) 
 5| eval newvalue = mvindex('ModifiedProperties{}.NewValue',0) 
 6| rex field=newvalue max_match=0 "(?i)(?<new_method_type>\"MethodType\")" 
 7| rex field=oldvalue max_match=0 "(?i)(?<old_method_type>\"MethodType\")" 
 8| eval count_new_method_type = coalesce(mvcount(new_method_type), 0) 
 9| eval count_old_method_type = coalesce(mvcount(old_method_type), 0) 
10|  where count_new_method_type > count_old_method_type 
11|  stats earliest(_time) as firstTime latest(_time) as lastTime values(propertyName) by user newvalue oldvalue 
12| `security_content_ctime(firstTime)` 
13| `security_content_ctime(lastTime)` 
14| `o365_new_mfa_method_registered_filter`

Data Source

Name Platform Sourcetype Source Supported App
O365 Update user. N/A 'o365:management:activity' 'o365' N/A

Macros Used

Name Value
o365_management_activity sourcetype=o365:management:activity
o365_new_mfa_method_registered_filter search *
o365_new_mfa_method_registered_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1098 Account Manipulation Persistence
T1098.005 Device Registration Privilege Escalation
KillChainPhase.EXPLOITAITON
KillChainPhase.INSTALLATION
NistCategory.DE_CM
Cis18Value.CIS_10
APT3
APT41
APT5
Dragonfly
FIN13
HAFNIUM
Kimsuky
Lazarus Group
Magic Hound
APT29

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

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 legitimally, investigate and filter as needed.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
A new MFA method was added for $user$ 30 60 50
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset o365 o365:management:activity
Integration ✅ Passing Dataset o365 o365:management:activity

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 2