Detection: Azure AD Temporary Access Pass Created

Description

The following analytic detects the creation of a Temporary Access Pass (TAP) for an Azure AD user. It leverages Azure Active Directory AuditLogs to identify the "Create Temporary Access Pass method for user" operation. TAPs are time-limited passcodes that bypass all authentication requirements including MFA and FIDO2 - an attacker who creates a TAP for a compromised account can sign in from any location without any additional factor. If confirmed malicious, this activity provides an attacker with an unchallenged authentication path into the affected account.

 1`azure_monitor_aad`
 2category=AuditLogs
 3operationName="Create Temporary Access Pass method for user"
 4properties.result="success"
 5
 6
 7| rename properties.* as *
 8
 9| rename initiatedBy.user.userPrincipalName as initiatedBy
10
11| rename initiatedBy.app.displayName as initiatedByApp
12
13
14| eval actor = coalesce(initiatedBy, initiatedByApp)
15
16
17| rename targetResources{}.userPrincipalName as targetUser
18
19| rename userAgent as user_agent
20
21
22| fillnull
23
24
25| stats count min(_time) as firstTime
26              max(_time) as lastTime
27  BY dest user src vendor_account vendor_product user_agent
28     actor targetUser signature
29
30
31| rename actor as user
32
33
34| `security_content_ctime(firstTime)`
35
36| `security_content_ctime(lastTime)`
37
38| `azure_ad_temporary_access_pass_created_filter`

Data Source

Name Platform Sourcetype Source
Azure Active Directory Azure icon Azure 'azure:monitor:aad' 'Azure AD'

Macros Used

Name Value
azure_monitor_aad sourcetype=azure:monitor:aad
azure_ad_temporary_access_pass_created_filter search *
azure_ad_temporary_access_pass_created_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
T1078.004 Cloud Accounts Initial Access
T1556.006 Multi-Factor Authentication Persistence
T1586.003 Cloud Accounts Privilege Escalation
Exploitation
Delivery
Weaponization
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 Finding (Notable) Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Intermediate Finding (Risk Event) Yes
TTP detections generate a Finding (Notable) and may generate Intermediate Findings (Risk Events) for associated entities.

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 through an EventHub. This analytic was written to be used with the azure:monitor:aad sourcetype leveraging the AuditLogs log category.

Known False Positives

IT administrators legitimately create TAPs for users who are locked out or onboarding a new passwordless authentication method. The key differentiators are the actor and timing -- a helpdesk account creating a TAP for a user who just reported a lockout is expected; an unfamiliar actor creating a TAP outside business hours or for a high-privilege account warrants investigation.

Associated Analytic Story

Finding

Title Entity Field Entity Type Risk Score
User [$user$] has created Temporary Access Pass for [$targetUser$] from [$src$] user user 50

Intermediate Findings

Message Entity Field Entity Type Risk Score
User [$user$] has created Temporary Access Pass for [$targetUser$] from [$src$] targetUser user 50

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