diff --git a/packs/wiz.yml b/packs/wiz.yml new file mode 100644 index 000000000..d04e487ca --- /dev/null +++ b/packs/wiz.yml @@ -0,0 +1,7 @@ +AnalysisType: pack +PackID: PantherManaged.Wiz +Description: Group of all Wiz detections +DisplayName: "Panther Wiz Pack" +PackDefinition: + IDs: + - Wiz.Alert.Passthrough diff --git a/rules/wiz_rules/wiz_alert_passthrough.py b/rules/wiz_rules/wiz_alert_passthrough.py index b47ae13ec..c066530fc 100644 --- a/rules/wiz_rules/wiz_alert_passthrough.py +++ b/rules/wiz_rules/wiz_alert_passthrough.py @@ -1,3 +1,6 @@ +from panther_base_helpers import deep_get + + def rule(event): return event.get("status") == "OPEN" @@ -17,16 +20,25 @@ def dedup(event): return event.get("id") +def description(event): + return event.deep_get("sourceRule", "controlDescription", default="") + + +def runbook(event): + return event.deep_get( + "sourceRule", "resolutionRecommendation", default="" + ) + + def alert_context(event): + security_subcategories = event.deep_get("sourceRule", "securitySubCategories", default=[{}]) return { "id": event.get("id", ""), "type": event.get("type", ""), - "description": event.deep_get( - "sourceRule", "controlDescription", default="" - ), - "resolution_recommendation": event.deep_get( - "sourceRule", "resolutionRecommendation", default="" - ), - "severity": event.get("severity", ""), "entity_snapshot": event.get("entitySnapshot", {}), + "mitre_attack_categories": [ + subcategory + for subcategory in security_subcategories + if deep_get(subcategory, "category", "framework", "name") == "MITRE ATT&CK Matrix" + ], } diff --git a/rules/wiz_rules/wiz_alert_passthrough.yml b/rules/wiz_rules/wiz_alert_passthrough.yml index de47990b2..84cf7191d 100644 --- a/rules/wiz_rules/wiz_alert_passthrough.yml +++ b/rules/wiz_rules/wiz_alert_passthrough.yml @@ -51,7 +51,27 @@ Tests: "controlDescription": "Alert Description", "id": "12345", "name": "Alert Name", - "resolutionRecommendation": "Alert Resolution Recommendation" + "resolutionRecommendation": "Alert Resolution Recommendation", + "securitySubCategories": [ + { + "category": { + "framework": { + "name": "Wiz for Risk Assessment" + }, + "name": "High Profile Threats" + }, + "title": "High-profile vulnerability exploited in the wild" + }, + { + "category": { + "framework": { + "name": "MITRE ATT&CK Matrix" + }, + "name": "TA0001 Initial Access" + }, + "title": "T1190 Exploit Public-Facing Application" + }, + ] }, "status": "OPEN", "statusChangedAt": "2024-06-04 02:28:06.597355000",