-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rules: Tines Actions Disabled Change (#781)
* Rules: Adding Tines rule for Actions Disabled Changes. - Detects if the operation_name is ActonsDisabledChange. --------- Co-authored-by: calkim-panther <113376708+calkim-panther@users.noreply.github.com> Co-authored-by: Ed <ed.anderson@panther.io>
- Loading branch information
1 parent
0496364
commit 2a30d3e
Showing
2 changed files
with
64 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from panther_base_helpers import deep_get | ||
from panther_tines_helpers import tines_alert_context | ||
|
||
ACTIONS = ["ActionsDisabledChange"] | ||
|
||
|
||
def rule(event): | ||
action = deep_get(event, "operation_name", default="<NO_OPERATION_NAME>") | ||
return action in ACTIONS | ||
|
||
|
||
def title(event): | ||
action = deep_get(event, "operation_name", default="<NO_OPERATION_NAME>") | ||
actor = deep_get(event, "user_email", default="<NO_USERNAME>") | ||
return f"Tines: {action} " f"by {actor}" | ||
|
||
|
||
def alert_context(event): | ||
return tines_alert_context(event) |
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,45 @@ | ||
AnalysisType: rule | ||
Filename: tines_actions_disabled_changes.py | ||
RuleID: Tines.Actions.DisabledChanges | ||
DisplayName: Tines Actions Disabled Change | ||
Enabled: true | ||
LogTypes: | ||
- Tines.Audit | ||
Tags: | ||
- Tines | ||
Severity: Medium | ||
Description: > | ||
Detections when Tines Actions are set to Disabled Change | ||
DedupPeriodMinutes: 60 | ||
Threshold: 1 | ||
SummaryAttributes: | ||
- event | ||
Tests: | ||
- Name: Tines Actions Disabled Change | ||
ExpectedResult: true | ||
Log: | ||
{ | ||
"created_at": "2023-05-23 23:16:41", | ||
"id": 7111111, | ||
"operation_name": "ActionsDisabledChange", | ||
"request_ip": "12.12.12.12", | ||
"request_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36", | ||
"tenant_id": "8888", | ||
"user_email": "user@company.com", | ||
"user_id": "17171", | ||
"user_name": "user at company dot com" | ||
} | ||
- Name: Tines Login | ||
ExpectedResult: false | ||
Log: | ||
{ | ||
"created_at": "2023-05-17 14:45:19", | ||
"id": 7888888, | ||
"operation_name": "Login", | ||
"request_ip": "12.12.12.12", | ||
"request_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36", | ||
"tenant_id": "8888", | ||
"user_email": "user@company.com", | ||
"user_id": "17171", | ||
"user_name": "user at company dot com" | ||
} |