Try in Splunk Security Cloud

Description

The following analytic detects the creation of a Service Principal in an Azure AD environment. It leverages Azure Active Directory events ingested through EventHub, specifically monitoring the "Add service principal" operation. This activity is significant because Service Principals can be used by adversaries to establish persistence and bypass multi-factor authentication and conditional access policies. If confirmed malicious, this could allow attackers to maintain single-factor access to the Azure AD environment, potentially leading to unauthorized access to resources and prolonged undetected activity.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-30
  • Author: Gowthamaraj Rajendran, Mauricio Velazco, Splunk
  • ID: f8ba49e7-ffd3-4b53-8f61-e73974583c5d

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1136.003 Cloud Account Persistence
Kill Chain Phase
  • Installation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
7
8
`azure_monitor_aad`  operationName="Add service principal" properties.initiatedBy.user.id=* 
| rename properties.* as * 
| rename targetResources{}.displayName as displayName 
| rename targetResources{}.type as type 
| stats count min(_time) as firstTime max(_time) as lastTime values(displayName) as displayName by type, user, result, operationName 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `azure_ad_service_principal_created_filter`

Macros

The SPL above uses the following Macros:

:information_source: azure_ad_service_principal_created_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • properties.targetResources{}.displayName
  • properties.targetResources{}.type
  • user
  • properties.result

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

Known False Positives

Administrator may legitimately create Service Principal. Filter as needed.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
45.0 50 90 Service Principal named $displayName$ created by $user$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

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 | version: 2