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

Snowflake - Multiple failed queries

Back
Id5f8a81d9-7d27-4ff5-a0ce-4285ee02c2c8
RulenameSnowflake - Multiple failed queries
DescriptionDetects multiple failed queries in short timeframe.
SeverityHigh
TacticsDiscovery
TechniquesT1518
T1082
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/SnowflakeMultipleFailedQueries.yaml
Version1.0.1
Arm template5f8a81d9-7d27-4ff5-a0ce-4285ee02c2c8.json
Deploy To Azure
let threshold = 50;
Snowflake
| where EXECUTION_STATUS_s !~ 'SUCCESS'
| summarize count() by TargetUsername, bin(TimeGenerated, 5m)
| where count_ > threshold
| extend AccountCustomEntity = TargetUsername
queryPeriod: 1h
version: 1.0.1
kind: Scheduled
triggerThreshold: 0
relevantTechniques:
- T1518
- T1082
triggerOperator: gt
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
  entityType: Account
query: |
  let threshold = 50;
  Snowflake
  | where EXECUTION_STATUS_s !~ 'SUCCESS'
  | summarize count() by TargetUsername, bin(TimeGenerated, 5m)
  | where count_ > threshold
  | extend AccountCustomEntity = TargetUsername  
name: Snowflake - Multiple failed queries
queryFrequency: 1h
requiredDataConnectors:
- connectorId: Snowflake
  dataTypes:
  - Snowflake
description: |
    'Detects multiple failed queries in short timeframe.'
status: Available
id: 5f8a81d9-7d27-4ff5-a0ce-4285ee02c2c8
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeMultipleFailedQueries.yaml
tactics:
- Discovery
severity: High
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/5f8a81d9-7d27-4ff5-a0ce-4285ee02c2c8')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/5f8a81d9-7d27-4ff5-a0ce-4285ee02c2c8')]",
      "properties": {
        "alertRuleTemplateName": "5f8a81d9-7d27-4ff5-a0ce-4285ee02c2c8",
        "customDetails": null,
        "description": "'Detects multiple failed queries in short timeframe.'\n",
        "displayName": "Snowflake - Multiple failed queries",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "Name"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeMultipleFailedQueries.yaml",
        "query": "let threshold = 50;\nSnowflake\n| where EXECUTION_STATUS_s !~ 'SUCCESS'\n| summarize count() by TargetUsername, bin(TimeGenerated, 5m)\n| where count_ > threshold\n| extend AccountCustomEntity = TargetUsername\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Discovery"
        ],
        "techniques": [
          "T1082",
          "T1518"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}