-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Create ExternalUserAddedRemovedInTeams.yaml #1067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
80d6166
Create ExternalUserAddedRemovedInTeams.yaml
samikroy 8c3b98d
Merge branch 'master' into patch-1
samikroy 7a9540a
Update ExternalUserAddedRemovedInTeams.yaml
samikroy a688667
Update ExternalUserAddedRemovedInTeams.yaml
samikroy 21441d4
Update ExternalUserAddedRemovedInTeams.yaml
samikroy fb67634
Delete AzureActivity.json
samikroy 3cff893
Delete WorkbooksMetadata.json
samikroy 372e1d9
Update ExternalUserAddedRemovedInTeams.yaml
samikroy 03c8b78
Added accidentally removed files.
samikroy b9f30ec
Update WorkbooksMetadata.json
samikroy bd564f4
Merge branch 'master' into patch-1
samikroy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
Detections/OfficeActivity/ExternalUserAddedRemovedInTeams.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| id: e9ceg568-6257-4dab-9a48-4793727y46a2 | ||
| name: External user added and removed in short timeframe | ||
| description: | | ||
| 'This detection flags the occurances of external user accounts that are added to a Team and then removed within | ||
| one hour.This data is a part of Office 365 Connector in Azure Sentinel.' | ||
| tactics: | ||
| - Persistence | ||
| relevantTechniques: | ||
| - T1136 | ||
| query: | | ||
|
|
||
| // If you want to look at user added further than 7 days ago adjust this value | ||
| let time_ago = 7d; | ||
| // If you want to change the timeframe of how quickly accounts need to be added and removed change this value | ||
| let time_delta = 1h; | ||
| OfficeActivity | ||
| | where OfficeWorkload == "MicrosoftTeams" | ||
| | where TimeGenerated > ago(time_ago) | ||
| | where OfficeWorkload == "MicrosoftTeams" | ||
|
samikroy marked this conversation as resolved.
Outdated
|
||
| | where TimeGenerated > ago(time_ago) | ||
|
samikroy marked this conversation as resolved.
Outdated
|
||
| | where Operation =~ "MemberAdded" | ||
| | extend UPN = tostring(parse_json(Members)[0].UPN) | ||
| | where UPN contains ("#EXT#") | ||
| | project TimeAdded=TimeGenerated, Operation, UPN, UserWhoAdded = UserId, TeamName=ItemName | ||
| | join ( | ||
| OfficeActivity | ||
| | where OfficeWorkload == "MicrosoftTeams" | ||
| | where TimeGenerated > ago(time_ago) | ||
| | where Operation =~ "MemberRemoved" | ||
| | extend UPN = tostring(parse_json(Members)[0].UPN) | ||
| | where UPN contains ("#EXT#") | ||
| | project TimeDeleted=TimeGenerated, Operation, UPN, UserWhoDeleted = UserId, TeamName=ItemName | ||
| ) on UPN | ||
| | where TimeDeleted < (TimeAdded + time_delta) | ||
|
samikroy marked this conversation as resolved.
Outdated
|
||
| | project TimeAdded, TimeDeleted, UPN, UserWhoAdded, UserWhoDeleted, TeamName | ||
|
samikroy marked this conversation as resolved.
|
||
| | extend timestamp = TimeAdded, AccountCustomEntity = UPN | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.