Detection: Azure AD User Enabled And Password Reset

Description

The following analytic detects an Azure AD user enabling a previously disabled account and resetting its password within 2 minutes. It uses Azure Active Directory events to identify this sequence of actions. This activity is significant because it may indicate an adversary with administrative access attempting to establish a backdoor identity within the Azure AD tenant. If confirmed malicious, this could allow the attacker to maintain persistent access, escalate privileges, and potentially exfiltrate sensitive information from the environment.

1`azure_monitor_aad` (operationName="Enable account" OR operationName="Reset password (by admin)" OR operationName="Update user") 
2| transaction user startsWith=(operationName="Enable account") endsWith=(operationName="Reset password (by admin)") maxspan=2m 
3| rename properties.* as * 
4| rename initiatedBy.user.userPrincipalName as initiatedBy 
5| fillnull 
6| stats count min(_time) as firstTime max(_time) as lastTime by dest user src vendor_account vendor_product initiatedBy signature 
7| `security_content_ctime(firstTime)` 
8| `security_content_ctime(lastTime)` 
9| `azure_ad_user_enabled_and_password_reset_filter`

Data Source

Name Platform Sourcetype Source
Azure Active Directory Enable account Azure icon Azure 'azure:monitor:aad' 'Azure AD'
Azure Active Directory Reset password (by admin) Azure icon Azure 'azure:monitor:aad' 'Azure AD'
Azure Active Directory Update user Azure icon Azure 'azure:monitor:aad' 'Azure AD'

Macros Used

Name Value
azure_monitor_aad sourcetype=azure:monitor:aad
azure_ad_user_enabled_and_password_reset_filter search *
azure_ad_user_enabled_and_password_reset_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
Exploitation
Installation
DE.CM
CIS 10

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 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 AuditLog log category.

Known False Positives

While not common, Administrators may enable accounts and reset their passwords for legitimate reasons. Filter as needed.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

A user account, $user$, was enabled and its password reset within 2 minutes by $initiatedBy$

Risk Object Risk Object Type Risk Score Threat Objects
user user 45 No Threat Objects
initiatedBy user 45 No Threat Objects

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset Azure AD azure:monitor:aad
Integration ✅ Passing Dataset Azure AD azure:monitor:aad

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: 8