MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1136 Create Account |
Rule body yaml
AnalysisType: rule
Filename: snowflake_stream_user_enabled.py
RuleID: Snowflake.Stream.UserEnabled
DisplayName: Snowflake User Enabled
Enabled: true
LogTypes:
- Snowflake.QueryHistory
Severity: Info
Reports:
MITRE ATT&CK:
- TA0003:T1136
Description: Detects users being re-enabled in your environment.
Tags:
- Snowflake
- '[MITRE] Persistence'
- '[MITRE] Create Account'
Tests:
- Name: User Enabled
ExpectedResult: true
Log:
{
"p_event_time": "2024-10-09 21:03:25.750000000",
"p_log_type": "Snowflake.QueryHistory",
"p_row_id": "6283439ab35193e891ac9ea1227b",
"p_source_label": "SF-Ben",
"EXECUTION_STATUS": "SUCCESS",
"QUERY_TEXT": "ALTER USER CLARK_KENT SET DISABLED=FALSE;",
"QUERY_TYPE": "ALTER_USER",
"ROLE_NAME": "ACCOUNTADMIN",
"USER_NAME": "LEX_LUTHOR",
"WAREHOUSE_NAME": "DATAOPS_WH"
}
- Name: User Disabled
ExpectedResult: false
Log:
{
"p_event_time": "2024-10-09 21:03:25.750000000",
"p_log_type": "Snowflake.QueryHistory",
"p_row_id": "6283439ab35193e891ac9ea1227b",
"p_source_label": "SF-Ben",
"EXECUTION_STATUS": "SUCCESS",
"QUERY_TEXT": "ALTER USER CLARK_KENT SET DISABLED=TRUE;",
"QUERY_TYPE": "ALTER_USER",
"ROLE_NAME": "ACCOUNTADMIN",
"USER_NAME": "PERRY_WHITE",
"WAREHOUSE_NAME": "DATAOPS_WH"
}
Detection logic
Condition
QUERY_TYPE eq "ALTER_USER"
EXECUTION_STATUS eq "SUCCESS"
This rule also runs imperative logic the parser cannot express as a filter; the conditions above are the structured part it could extract.
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
EXECUTION_STATUS | eq |
|
QUERY_TYPE | eq |
|
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
user | user_name |
role | role_name |
source | p_source_label |
warehouse | WAREHOUSE_NAME |
USER_NAME |