Skip to content

Commit

Permalink
Update o365_external_guest_user_invited.yml
Browse files Browse the repository at this point in the history
Update for better ServicePrincipal GUID
  • Loading branch information
nterl0k committed Apr 24, 2024
1 parent 28ed9a8 commit 673d5a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detections/cloud/o365_external_guest_user_invited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: The following analytic identifies the invitation of an external gue
data_source:
- Office 365 Universal Audit Log
search: '`o365_management_activity` Workload=AzureActiveDirectory AND Operation="Add user*" AND ModifiedProperties{}.NewValue="[*Guest*]" AND ModifiedProperties{}.NewValue="[*Invitation*]"
| eval user = (mvindex('ModifiedProperties{}.NewValue',5)), 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))
| eval user = (mvindex('ModifiedProperties{}.NewValue',5)), src_user = case(match(mvindex('Actor{}.ID',-1),"User"),mvindex('Actor{}.ID',0),match(mvindex('Actor{}.ID',-1),"ServicePrincipal"),mvindex('Actor{}.ID',3),true(),mvindex('Actor{}.ID',0))
| rex field=user "(?<user>[\\w\\.-]+@[\\w-]+\\.[\\w-]{2,4})"
| stats values(user) as user, min(_time) as firstTime, max(_time) as lastTime, count by Operation,Id,src_user
| rename Operation as signature, Id as signature_id
Expand Down

0 comments on commit 673d5a0

Please sign in to comment.