-
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.
add Crowdstrike.Macos.Add.Trusted.Cert (#820)
- Loading branch information
Showing
3 changed files
with
446 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
25 changes: 25 additions & 0 deletions
25
rules/crowdstrike_rules/crowdstrike_macos_add_trusted_cert.py
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,25 @@ | ||
from panther_base_helpers import crowdstrike_process_alert_context, deep_get | ||
|
||
|
||
def rule(event): | ||
event_platform = deep_get(event, "event_platform", default="<UNKNOWN_PLATFORM>") | ||
fdr_event_type = deep_get(event, "fdr_event_type", default="<UNKNOWN_FDR_EVENT_TYPE>") | ||
image_filename = deep_get(event, "event", "ImageFileName", default="<UNKNOWN_IMAGE_FILE_NAME>") | ||
command_line = deep_get(event, "event", "CommandLine", default="<UNKNOWN_COMMAND_LINE>") | ||
return all( | ||
[ | ||
event_platform == "Mac", | ||
fdr_event_type == "ProcessRollup2", | ||
image_filename == "/usr/bin/security", | ||
"add-trusted-cert" in command_line, | ||
] | ||
) | ||
|
||
|
||
def title(event): | ||
aid = event.get("aid", "<UNKNOWN_AID>") | ||
return f"Crowdstrike: New trusted cert added on device [{aid}]" | ||
|
||
|
||
def alert_context(event): | ||
return crowdstrike_process_alert_context(event) |
Oops, something went wrong.