Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Snowflake - Unusual query

Back
Id1dd1d9e5-3ebf-43cb-be07-6082d5eabe79
RulenameSnowflake - Unusual query
DescriptionDetects unusual query.
SeverityMedium
TacticsCollection
TechniquesT1119
Required data connectorsSnowflake
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeUnusualQuery.yaml
Version1.0.0
Arm template1dd1d9e5-3ebf-43cb-be07-6082d5eabe79.json
Deploy To Azure
Snowflake
| where QUERY_TYPE_s =~ 'SELECT'
| where EXECUTION_STATUS_s =~ 'SUCCESS'
| where QUERY_TEXT_s startswith @'SELECT *'
| extend AccountCustomEntity = TargetUsername
relevantTechniques:
- T1119
name: Snowflake - Unusual query
requiredDataConnectors:
- dataTypes:
  - Snowflake
  connectorId: Snowflake
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
  entityType: Account
triggerThreshold: 0
id: 1dd1d9e5-3ebf-43cb-be07-6082d5eabe79
tactics:
- Collection
version: 1.0.0
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeUnusualQuery.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
    'Detects unusual query.'
query: |
  Snowflake
  | where QUERY_TYPE_s =~ 'SELECT'
  | where EXECUTION_STATUS_s =~ 'SUCCESS'
  | where QUERY_TEXT_s startswith @'SELECT *'
  | 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/1dd1d9e5-3ebf-43cb-be07-6082d5eabe79')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/1dd1d9e5-3ebf-43cb-be07-6082d5eabe79')]",
      "properties": {
        "alertRuleTemplateName": "1dd1d9e5-3ebf-43cb-be07-6082d5eabe79",
        "customDetails": null,
        "description": "'Detects unusual query.'\n",
        "displayName": "Snowflake - Unusual query",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "Name"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeUnusualQuery.yaml",
        "query": "Snowflake\n| where QUERY_TYPE_s =~ 'SELECT'\n| where EXECUTION_STATUS_s =~ 'SUCCESS'\n| where QUERY_TEXT_s startswith @'SELECT *'\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.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}