-
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.
Tweak existing exfiltration rules; add additional rules (#1036)
* Tweak existing exfiltration rules; add additional rules * Check shared_account_ids against current Account ID * Retrieve the current account ID once
- Loading branch information
Evan Gibler
authored
Dec 13, 2023
1 parent
ff81fc6
commit 4639517
Showing
8 changed files
with
606 additions
and
74 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
21 changes: 21 additions & 0 deletions
21
rules/aws_cloudtrail_rules/aws_rds_manual_snapshot_created.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,21 @@ | ||
from panther_base_helpers import aws_rule_context | ||
|
||
|
||
def rule(event): | ||
return all( | ||
[ | ||
event.get("eventSource", "") == "rds.amazonaws.com", | ||
event.get("eventName", "") == "CreateDBSnapshot", | ||
event.deep_get("responseElements", "snapshotType") in {"manual", "public"}, | ||
] | ||
) | ||
|
||
|
||
def title(event): | ||
account_id = event.get("recipientAccountId", "") | ||
rds_instance_id = event.deep_get("responseElements", "dBInstanceIdentifier") | ||
return f"Manual RDS Snapshot Created in [{account_id}] for RDS instance [{rds_instance_id}]" | ||
|
||
|
||
def alert_context(event): | ||
return aws_rule_context(event) |
Oops, something went wrong.