Skip to content

Commit

Permalink
Update o365_privileged_role_assigned.yml
Browse files Browse the repository at this point in the history
user/servicepincipal parsing update
  • Loading branch information
nterl0k committed Apr 20, 2024
1 parent c8f8fb2 commit fdeb58c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detections/cloud/o365_privileged_role_assigned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: The following analytic identifies the assignment of sensitive and p
data_source:
- Office 365 Universal Audit Log
search: '`o365_management_activity` Workload=AzureActiveDirectory Operation IN ("Add member to role.","Add eligible member to role.")
| eval user = ObjectId, src_user = UserId, object_name = mvindex('ModifiedProperties{}.NewValue', mvfind('ModifiedProperties{}.Name',"Role\.DisplayName")), object_id = mvindex('ModifiedProperties{}.NewValue', mvfind('ModifiedProperties{}.Name',"Role\.TemplateId")), signature = Operation, result = ResultStatus, category = mvindex('Target{}.ID',2)
| eval user = ObjectId, src_user = case(match(mvindex('Actor{}.ID',-1),"User"),mvindex('Actor{}.ID',0),match(mvindex('Actor{}.ID',-1),"ServicePrincipal"),mvindex('Actor{}.ID',1),true(),mvindex('Actor{}.ID',0)), object_name = mvindex('ModifiedProperties{}.NewValue', mvfind('ModifiedProperties{}.Name',"Role\.DisplayName")), object_id = mvindex('ModifiedProperties{}.NewValue', mvfind('ModifiedProperties{}.Name',"Role\.TemplateId")), signature = Operation, result = ResultStatus, category = mvindex('Target{}.ID',2)
| stats count, min(_time) as firstTime, max(_time) as lastTime by src_user, user, category, result, object_name, object_id, signature
| lookup privileged_azure_ad_roles azuretemplateid as object_id OUTPUT isprvilegedadrole
| search isprvilegedadrole="TRUE" category="User"
Expand Down Expand Up @@ -60,4 +60,4 @@ tests:
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/o365_azure_workload_events/o365_azure_workload_events.log
sourcetype: o365:management:activity
source: o365
source: o365

0 comments on commit fdeb58c

Please sign in to comment.