Name:Azure AD Service Principal Owner Added id:7ddf2084-6cf3-4a44-be83-474f7b73c701 version:6 date:2024-09-30 author:Mauricio Velazco, Gowthamaraj Rajendran, Splunk status:production type:TTP Description:The following analytic detects the addition of a new owner to a Service Principal within an Azure AD tenant. It leverages Azure Active Directory events from the AuditLog log category to identify this activity. This behavior is significant because Service Principals do not support multi-factor authentication or conditional access policies, making them a target for adversaries seeking persistence or privilege escalation. If confirmed malicious, this activity could allow attackers to maintain access to the Azure AD environment with single-factor authentication, potentially leading to unauthorized access and control over critical resources. Data_source:
-Azure Active Directory Add owner to application
search:`azure_monitor_aad` operationName="Add owner to application" | rename properties.* as * | rename initiatedBy.user.userPrincipalName as initiatedBy | rename targetResources{}.userPrincipalName as newOwner | rename targetResources{}.modifiedProperties{}.newValue as displayName | eval displayName = mvindex(displayName,1) | where initiatedBy!=newOwner | stats count min(_time) as firstTime max(_time) as lastTime values(displayName) as displayName by initiatedBy, result, operationName, newOwner | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `azure_ad_service_principal_owner_added_filter`
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 through 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 add new owners for Service Principals. Filter as needed. References: -https://attack.mitre.org/techniques/T1098/ drilldown_searches: name:'View the detection results for - "$displayName$"' search:'%original_detection_search% | search displayName = "$displayName$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$displayName$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$displayName$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' tags: analytic_story: - 'Azure Active Directory Persistence' - 'Azure Active Directory Privilege Escalation' - 'NOBELIUM Group' asset_type:Azure Active Directory confidence:90 impact:60 message:A new owner was added for service principal $displayName$ by $initiatedBy$ mitre_attack_id: - 'T1098' observable: name:'displayName' type:'User' - role: - 'Victim' name:'initiatedBy' type:'User' - role: - 'Attacker' product: - 'Splunk Enterprise' - 'Splunk Enterprise Security' - 'Splunk Cloud' required_fields: - '_time' - 'operationName' - 'properties.initiatedBy.user.userPrincipalName' - 'properties.targetResources{}.userPrincipalName' - 'properties.targetResources{}.modifiedProperties{}.newValue' - 'properties.result' risk_score:54 security_domain:audit