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
relevantTechniques:
- T1548
name: Dataverse - Bulk record ownership re-assignment or sharing
queryPeriod: 1d
triggerThreshold: 0
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
id: 6e480329-84bc-409a-b97b-22e8102af3ca
eventGroupingSettings:
aggregationKind: AlertPerResult
severity: Medium
requiredDataConnectors:
- dataTypes:
- DataverseActivity
connectorId: Dataverse
description: Identifies individual record ownership changes including sharing of records with other users/teams or re-assignment of ownership exceeding a pre-defined threshold.
version: 3.2.0
status: Available
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
tactics:
- PrivilegeEscalation
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
kind: Scheduled
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft Business Applications/Analytic Rules/Dataverse - Bulk record ownership re-assignment or sharing.yaml
queryFrequency: 1h
{
"$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"
}
]
}