-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into bp/s3-confused-deputy
- Loading branch information
Showing
86 changed files
with
2,744 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
correlation_rules/snowflake_potential_brute_force_success.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
AnalysisType: correlation_rule | ||
RuleID: "Snowflake.PotentialBruteForceSuccess" | ||
DisplayName: "Snowflake Brute Force Login Success" | ||
Enabled: true | ||
Severity: High | ||
Description: Detecting brute force activity and reporting when a user has incorrectly logged in multiple times and then had a successful login. | ||
Detection: | ||
- Sequence: | ||
- ID: Multiple Failed Logins | ||
RuleID: Snowflake.Stream.BruteForceByIp | ||
MinMatchCount: 5 | ||
- ID: Successful Login | ||
RuleID: Snowflake.Stream.LoginSuccess | ||
Transitions: | ||
- ID: Multiple Failed Logins FOLLOWED BY Successful Login | ||
From: Multiple Failed Logins | ||
To: Successful Login | ||
WithinTimeFrameMinutes: 30 | ||
Match: | ||
- On: CLIENT_IP | ||
Schedule: | ||
RateMinutes: 720 | ||
TimeoutMinutes: 15 | ||
LookbackWindowMinutes: 1440 | ||
Tests: | ||
- Name: Successful Bulk Login | ||
ExpectedResult: true | ||
RuleOutputs: | ||
- ID: Multiple Failed Logins | ||
Matches: | ||
CLIENT_IP: | ||
"1.1.1.1": [0, 2, 3, 6, 9, 10, 11, 15] | ||
- ID: Successful Login | ||
Matches: | ||
CLIENT_IP: | ||
"1.1.1.1": [16] | ||
- Name: Successful Login With Single Failure | ||
ExpectedResult: false | ||
RuleOutputs: | ||
- ID: Multiple Failed Logins | ||
Matches: | ||
CLIENT_IP: | ||
"1.1.1.1": [0] | ||
- ID: Successful Login | ||
Matches: | ||
CLIENT_IP: | ||
"1.1.1.1": [1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
""" Global helpers for Snowflake streaming detections. """ | ||
|
||
|
||
def query_history_alert_context(event): | ||
return { | ||
"user": event.get("user_name", "<UNKNOWN USER>"), | ||
"role": event.get("role_name", "<UNKNOWN ROLE>"), | ||
"source": event.get("p_source_label", "<UNKNOWN SOURCE>"), | ||
# Not all queries are run in a warehouse; e.g.: getting worksheet files | ||
"warehouse": event.get("WAREHOUSE_NAME", "<NO WAREHOUSE>"), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AnalysisType: global | ||
Filename: panther_snowflake_helpers.py | ||
GlobalID: "panther_snowflake_helpers" | ||
Description: > | ||
Global helpers for Snowflake streaming detections |
Oops, something went wrong.