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

Snowflake - User granted admin privileges

Back
Id5ed33eee-0ab6-4bf5-9e9b-6100db83d39a
RulenameSnowflake - User granted admin privileges
DescriptionDetects when user asigned admin privileges.
SeverityMedium
TacticsPrivilegeEscalation
TechniquesT1078
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/SnowflakeUserAddAdminPrivileges.yaml
Version1.0.1
Arm template5ed33eee-0ab6-4bf5-9e9b-6100db83d39a.json
Deploy To Azure
let adm_roles = dynamic(['SECURITYADMIN', 'SYSADMIN', 'ACCOUNTADMIN']);
Snowflake
| where QueryType =~ 'GRANT'
| where QueryText startswith 'GRANT ROLE'
| extend granted_role = extract(@'GRANT ROLE\s(\S+)\sto\suser', 1, QueryText)
| where granted_role in~ (adm_roles)
| extend usr = extract(@'GRANT ROLE\s(\S+)\sto\suser(\S+)', 2, QueryText)
| extend AccountCustomEntity = usr
queryPeriod: 1h
query: |
  let adm_roles = dynamic(['SECURITYADMIN', 'SYSADMIN', 'ACCOUNTADMIN']);
  Snowflake
  | where QueryType =~ 'GRANT'
  | where QueryText startswith 'GRANT ROLE'
  | extend granted_role = extract(@'GRANT ROLE\s(\S+)\sto\suser', 1, QueryText)
  | where granted_role in~ (adm_roles)
  | extend usr = extract(@'GRANT ROLE\s(\S+)\sto\suser(\S+)', 2, QueryText)
  | extend AccountCustomEntity = usr  
name: Snowflake - User granted admin privileges
entityMappings:
- fieldMappings:
  - columnName: AccountCustomEntity
    identifier: Name
  entityType: Account
queryFrequency: 1h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Snowflake/Analytic Rules/SnowflakeUserAddAdminPrivileges.yaml
requiredDataConnectors:
- connectorId: Snowflake
  dataTypes:
  - Snowflake
description: |
    'Detects when user asigned admin privileges.'
kind: Scheduled
version: 1.0.1
status: Available
severity: Medium
relevantTechniques:
- T1078
triggerOperator: gt
triggerThreshold: 0
tactics:
- PrivilegeEscalation
id: 5ed33eee-0ab6-4bf5-9e9b-6100db83d39a