let threshold = 10000;
Snowflake
| where TOTAL_ELAPSED_TIME_d > threshold
| extend AccountCustomEntity = TargetUsername
relevantTechniques:
- T1499
name: Snowflake - Abnormal query process time
requiredDataConnectors:
- dataTypes:
- Snowflake
connectorId: Snowflake
entityMappings:
- fieldMappings:
- identifier: Name
columnName: AccountCustomEntity
entityType: Account
triggerThreshold: 0
id: 1376f5e5-855a-4f88-8591-19eba4575a0f
tactics:
- Impact
version: 1.0.0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeLongQueryProcessTime.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
'Detects query with abnormal proccess time.'
query: |
let threshold = 10000;
Snowflake
| where TOTAL_ELAPSED_TIME_d > threshold
| extend AccountCustomEntity = TargetUsername
triggerOperator: gt
{
"$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/1376f5e5-855a-4f88-8591-19eba4575a0f')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/1376f5e5-855a-4f88-8591-19eba4575a0f')]",
"properties": {
"alertRuleTemplateName": "1376f5e5-855a-4f88-8591-19eba4575a0f",
"customDetails": null,
"description": "'Detects query with abnormal proccess time.'\n",
"displayName": "Snowflake - Abnormal query process time",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountCustomEntity",
"identifier": "Name"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeLongQueryProcessTime.yaml",
"query": "let threshold = 10000;\nSnowflake\n| where TOTAL_ELAPSED_TIME_d > threshold\n| extend AccountCustomEntity = TargetUsername\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Impact"
],
"techniques": [
"T1499"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}