Analytic rule catalog
Snowflake - Query on sensitive or restricted table
Back
| Id | f258fa0c-e26c-4e2b-94fb-88b6cef0ca6e |
| Rulename | Snowflake - Query on sensitive or restricted table |
| Description | Detects query on sensitive or restricted table. |
| Severity | Medium |
| Tactics | Collection |
| Techniques | T1119 |
| Required data connectors | Snowflake |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 1h |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic%20Rules/SnowflakeQueryOnSensitiveTable.yaml |
| Version | 1.0.1 |
| Arm template | f258fa0c-e26c-4e2b-94fb-88b6cef0ca6e.json |
let r_tbl = dynamic(['table_name']);
Snowflake
| where QueryType =~ 'SELECT'
| where QueryExecutionStatus =~ 'SUCCESS'
| extend tbl = extract(@'(FROM|from)\s(\S+)\s', 2, QueryText)
| where tbl in~ (r_tbl)
| extend AccountCustomEntity = TargetUsername
id: f258fa0c-e26c-4e2b-94fb-88b6cef0ca6e
entityMappings:
- fieldMappings:
- columnName: AccountCustomEntity
identifier: Name
entityType: Account
severity: Medium
status: Available
requiredDataConnectors:
- dataTypes:
- Snowflake
connectorId: Snowflake
kind: Scheduled
query: |
let r_tbl = dynamic(['table_name']);
Snowflake
| where QueryType =~ 'SELECT'
| where QueryExecutionStatus =~ 'SUCCESS'
| extend tbl = extract(@'(FROM|from)\s(\S+)\s', 2, QueryText)
| where tbl in~ (r_tbl)
| extend AccountCustomEntity = TargetUsername
name: Snowflake - Query on sensitive or restricted table
queryPeriod: 1h
description: |
'Detects query on sensitive or restricted table.'
tactics:
- Collection
triggerOperator: gt
triggerThreshold: 0
relevantTechniques:
- T1119
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic%20Rules/SnowflakeQueryOnSensitiveTable.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/f258fa0c-e26c-4e2b-94fb-88b6cef0ca6e')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/f258fa0c-e26c-4e2b-94fb-88b6cef0ca6e')]",
"properties": {
"alertRuleTemplateName": "f258fa0c-e26c-4e2b-94fb-88b6cef0ca6e",
"customDetails": null,
"description": "'Detects query on sensitive or restricted table.'\n",
"displayName": "Snowflake - Query on sensitive or restricted table",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountCustomEntity",
"identifier": "Name"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic%20Rules/SnowflakeQueryOnSensitiveTable.yaml",
"query": "let r_tbl = dynamic(['table_name']);\nSnowflake\n| where QueryType =~ 'SELECT'\n| where QueryExecutionStatus =~ 'SUCCESS'\n| extend tbl = extract(@'(FROM|from)\\s(\\S+)\\s', 2, QueryText)\n| where tbl in~ (r_tbl)\n| extend AccountCustomEntity = TargetUsername\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Collection"
],
"techniques": [
"T1119"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}