Dataverse - Bulk record ownership re-assignment or sharing
Id | 6e480329-84bc-409a-b97b-22e8102af3ca |
Rulename | Dataverse - Bulk record ownership re-assignment or sharing |
Description | Identifies individual record ownership changes including sharing of records with other users/teams or re-assignment of ownership exceeding a pre-defined threshold. |
Severity | Medium |
Tactics | PrivilegeEscalation |
Techniques | T1548 |
Required data connectors | Dataverse |
Kind | Scheduled |
Query frequency | 1h |
Query period | 1d |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft Business Applications/Analytic Rules/Dataverse - Bulk record ownership re-assignment or sharing.yaml |
Version | 3.2.0 |
Arm template | 6e480329-84bc-409a-b97b-22e8102af3ca.json |
// Set threshold for number of shared/assigned records
let detection_threshold = 100;
let query_frequency = 1h;
DataverseActivity
| where TimeGenerated >= ago(query_frequency)
| where Message in ("ModifyAccess", "Assign", "GrantAccess")
| summarize
FirstEvent = min(TimeGenerated),
LastEvent = max(TimeGenerated),
Events = count()
by UserId, Message, InstanceUrl, ClientIp
| where Events > detection_threshold
| extend
CloudAppId = int(32780),
AccountName = tostring(split(UserId, '@')[0]),
UPNSuffix = tostring(split(UserId, '@')[1])
| project
FirstEvent,
LastEvent,
Message,
Events,
UserId,
ClientIp,
InstanceUrl,
CloudAppId,
AccountName,
UPNSuffix
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountName
- identifier: UPNSuffix
columnName: UPNSuffix
- entityType: IP
fieldMappings:
- identifier: Address
columnName: ClientIp
- entityType: CloudApplication
fieldMappings:
- identifier: AppId
columnName: CloudAppId
- identifier: InstanceName
columnName: InstanceUrl
queryFrequency: 1h
name: Dataverse - Bulk record ownership re-assignment or sharing
alertDetailsOverride:
alertDisplayNameFormat: Dataverse - High number of record access modification events detected
alertDescriptionFormat: '{{Events}} events of type {{Message}} detected in {{InstanceUrl}} could indicate suspicious or malicious activity.'
kind: Scheduled
tactics:
- PrivilegeEscalation
triggerThreshold: 0
query: |
// Set threshold for number of shared/assigned records
let detection_threshold = 100;
let query_frequency = 1h;
DataverseActivity
| where TimeGenerated >= ago(query_frequency)
| where Message in ("ModifyAccess", "Assign", "GrantAccess")
| summarize
FirstEvent = min(TimeGenerated),
LastEvent = max(TimeGenerated),
Events = count()
by UserId, Message, InstanceUrl, ClientIp
| where Events > detection_threshold
| extend
CloudAppId = int(32780),
AccountName = tostring(split(UserId, '@')[0]),
UPNSuffix = tostring(split(UserId, '@')[1])
| project
FirstEvent,
LastEvent,
Message,
Events,
UserId,
ClientIp,
InstanceUrl,
CloudAppId,
AccountName,
UPNSuffix
relevantTechniques:
- T1548
triggerOperator: gt
queryPeriod: 1d
eventGroupingSettings:
aggregationKind: AlertPerResult
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft Business Applications/Analytic Rules/Dataverse - Bulk record ownership re-assignment or sharing.yaml
severity: Medium
status: Available
id: 6e480329-84bc-409a-b97b-22e8102af3ca
requiredDataConnectors:
- connectorId: Dataverse
dataTypes:
- DataverseActivity
version: 3.2.0
description: Identifies individual record ownership changes including sharing of records with other users/teams or re-assignment of ownership exceeding a pre-defined threshold.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"apiVersion": "2024-01-01-preview",
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/6e480329-84bc-409a-b97b-22e8102af3ca')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/6e480329-84bc-409a-b97b-22e8102af3ca')]",
"properties": {
"alertDetailsOverride": {
"alertDescriptionFormat": "{{Events}} events of type {{Message}} detected in {{InstanceUrl}} could indicate suspicious or malicious activity.",
"alertDisplayNameFormat": "Dataverse - High number of record access modification events detected"
},
"alertRuleTemplateName": "6e480329-84bc-409a-b97b-22e8102af3ca",
"customDetails": null,
"description": "Identifies individual record ownership changes including sharing of records with other users/teams or re-assignment of ownership exceeding a pre-defined threshold.",
"displayName": "Dataverse - Bulk record ownership re-assignment or sharing",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountName",
"identifier": "Name"
},
{
"columnName": "UPNSuffix",
"identifier": "UPNSuffix"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "ClientIp",
"identifier": "Address"
}
]
},
{
"entityType": "CloudApplication",
"fieldMappings": [
{
"columnName": "CloudAppId",
"identifier": "AppId"
},
{
"columnName": "InstanceUrl",
"identifier": "InstanceName"
}
]
}
],
"eventGroupingSettings": {
"aggregationKind": "AlertPerResult"
},
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft Business Applications/Analytic Rules/Dataverse - Bulk record ownership re-assignment or sharing.yaml",
"query": "// Set threshold for number of shared/assigned records\nlet detection_threshold = 100;\nlet query_frequency = 1h;\nDataverseActivity\n| where TimeGenerated >= ago(query_frequency)\n| where Message in (\"ModifyAccess\", \"Assign\", \"GrantAccess\")\n| summarize\n FirstEvent = min(TimeGenerated),\n LastEvent = max(TimeGenerated),\n Events = count()\n by UserId, Message, InstanceUrl, ClientIp\n| where Events > detection_threshold\n| extend\n CloudAppId = int(32780),\n AccountName = tostring(split(UserId, '@')[0]),\n UPNSuffix = tostring(split(UserId, '@')[1])\n| project\n FirstEvent,\n LastEvent,\n Message,\n Events,\n UserId,\n ClientIp,\n InstanceUrl,\n CloudAppId,\n AccountName,\n UPNSuffix\n",
"queryFrequency": "PT1H",
"queryPeriod": "P1D",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"PrivilegeEscalation"
],
"techniques": [
"T1548"
],
"templateVersion": "3.2.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}