diff --git a/.script/tests/KqlvalidationsTests/CustomTables/SAPETDAlerts_CL.json b/.script/tests/KqlvalidationsTests/CustomTables/SAPETDAlerts_CL.json index a84f34dc7a1..52e72ed8b5f 100644 --- a/.script/tests/KqlvalidationsTests/CustomTables/SAPETDAlerts_CL.json +++ b/.script/tests/KqlvalidationsTests/CustomTables/SAPETDAlerts_CL.json @@ -50,7 +50,7 @@ "type": "int" }, { - "name": "TriggeringEvents", + "name": "NormalizedTriggeringEvents", "type": "dynamic" } ] diff --git a/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-LoginFromUnexpectedNetwork.yaml b/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-LoginFromUnexpectedNetwork.yaml index de0d0de75f0..3c5a5a94c30 100644 --- a/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-LoginFromUnexpectedNetwork.yaml +++ b/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-LoginFromUnexpectedNetwork.yaml @@ -13,34 +13,32 @@ requiredDataConnectors: - connectorId: SAPETDAlerts dataTypes: - SAPETDAlerts_CL -queryFrequency: 1h -queryPeriod: 2d +queryFrequency: 5m +queryPeriod: 30m triggerOperator: gt triggerThreshold: 0 tactics: [] relevantTechniques: [] query: | - let regex_ip = @"user_ip:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"; - let regex_user = @"user_name:(\w+)"; - let regex_sid = @"sid:(\w{3})"; - let regex_client = @"client:(\d{3})"; - let regex_instance_name = @"instance_name:(\w+)"; - let regex_instance_host = @"instance_host:([\w-]+)"; + let regex_sid = @"^([A-Z0-9]{3})/"; + let regex_client = @"/(\d{3})$"; let SAPNetworks = _GetWatchlist('SAP - Networks'); SAPETDAlerts_CL - | mv-expand TriggeringEvents - | extend sapOriginalEvent = tostring(TriggeringEvents.OriginalEvent) - | extend Id_ = TriggeringEvents.Id - | extend extracted_user_ip = extract(regex_ip, 1, sapOriginalEvent) - | extend extracted_sap_user = extract(regex_user, 1, sapOriginalEvent) - | extend extracted_sid = extract(regex_sid, 1, sapOriginalEvent) - | extend extracted_client = extract(regex_client, 1, sapOriginalEvent) - | extend extracted_instance_name = extract(regex_instance_name, 1, sapOriginalEvent) - | extend extracted_instance_host = extract(regex_instance_host, 1, sapOriginalEvent) + | where PatternName in ("Logon from external with SAP standard users","Access via unallowed IP Address") + | mv-expand NormalizedTriggeringEvents + | extend sapOriginalEvent = tostring(NormalizedTriggeringEvents) + | extend Id_ = NormalizedTriggeringEvents.Id + | extend extracted_user_ip = tostring(NormalizedTriggeringEvents.NetworkIPAddressInitiator) + | where isnotempty(extracted_user_ip) + | extend extracted_sap_user = NormalizedTriggeringEvents.UserAccountTargeted + | extend extracted_sid = extract(regex_sid, 1, tostring(NormalizedTriggeringEvents.SystemIdActor)) + | extend extracted_client = extract(regex_client, 1, tostring(NormalizedTriggeringEvents.SystemIdActor)) + | extend extracted_instance_name = NormalizedTriggeringEvents.NetworkHostnameActor + | extend extracted_instance_host = NormalizedTriggeringEvents.NetworkHostnameInitiator | evaluate ipv4_lookup(SAPNetworks, extracted_user_ip, Network, return_unmatched = true) | where isempty(Network) - | project TimeGenerated, extracted_user_ip, extracted_sap_user, extracted_sid, extracted_client, extracted_instance_name, extracted_instance_host, AlertId, PatternName, PatternDescription, Status - | extend GeoLocation= iff(ipv4_is_private( extracted_user_ip), dynamic({"IsPrivate": true}), geo_info_from_ip_address(extracted_user_ip)) + | project TimeGenerated, extracted_user_ip, extracted_sap_user, extracted_sid, extracted_client, extracted_instance_name, extracted_instance_host, AlertId, PatternName, PatternDescription, Status, NormalizedTriggeringEvents + | extend GeoLocation= iff(ipv4_is_private(extracted_user_ip), dynamic({"IsPrivate": true}), geo_info_from_ip_address(extracted_user_ip)) eventGroupingSettings: aggregationKind: AlertPerResult entityMappings: @@ -65,4 +63,4 @@ alertDetailsOverride: customDetails: SAP_User: extracted_sap_user ETD_AlertNumber: AlertId -version: 1.0.1 \ No newline at end of file +version: 1.0.2 \ No newline at end of file diff --git a/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-SynchAlerts.yaml b/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-SynchAlerts.yaml index d771496c352..cebfdb8ae99 100644 --- a/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-SynchAlerts.yaml +++ b/Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-SynchAlerts.yaml @@ -17,20 +17,20 @@ relevantTechniques: [] query: | let minThreshold= 1; let minScore= 50; - let lookBack= 70d; + let lookBack= 7d; + let regex_sid = @"^([A-Z0-9]{3})/"; + let regex_client = @'\/(.{3})$'; SAPETDAlerts_CL - | mv-expand TriggeringEvents - | extend sapOriginalEvent = tostring(TriggeringEvents.OriginalEvent) - | where PatternName <> "Logon from external with SAP standard users" + | mv-expand NormalizedTriggeringEvents | summarize arg_max(TimeGenerated, *) by AlertId | where Threshold >= minThreshold and Score >= minScore - | extend NewEvent= split(sapOriginalEvent, "\n") - | mv-expand NewEvent to typeof(string) - | parse NewEvent with Key: string ":" Value: string - | extend Value= iff(isempty(Key) and isnotempty(NewEvent), NewEvent, Value), Key= iff(isempty(Key) and isnotempty(NewEvent), TriggeringEvents.EventLogType, Key) - | extend KV= bag_pack(Key, Value) - | summarize KeyValues= make_bag(KV), take_any(CreationTimestamp, MinTimestamp, MaxTimestamp, TriggeringEvents.EventLogType, Measure, PatternDescription, PatternName, Status, Threshold, TriggeringEvents.OriginalEvent) by AlertId - | extend SystemId= KeyValues.sid, ClienId= KeyValues.client, Host= KeyValues.instance_host, Instance= KeyValues.instance_name, User= KeyValues.user_name, IP= KeyValues.user_ip + | extend + SystemId= extract(regex_sid, 1, tostring(NormalizedTriggeringEvents.SystemIdActor)) + ClienId= extract(regex_client, 1, tostring(NormalizedTriggeringEvents.SystemIdActor)), + Host= NormalizedTriggeringEvents.NetworkHostnameInitiator, + Instance= NormalizedTriggeringEvents.NetworkHostnameActor, + User= NormalizedTriggeringEvents.UserAccountActing, + IP= NormalizedTriggeringEvents.NetworkIPAddressInitiator; eventGroupingSettings: aggregationKind: AlertPerResult entityMappings: @@ -56,4 +56,4 @@ alertDetailsOverride: customDetails: SAP_User: User ETD_AlertNumber: AlertId -version: 1.0.1 +version: 1.0.2 diff --git a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_DCR.json b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_DCR.json index 8c73ff63f61..fd7bc1ff86f 100644 --- a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_DCR.json +++ b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_DCR.json @@ -53,7 +53,7 @@ "type": "int" }, { - "name": "TriggeringEvents", + "name": "NormalizedTriggeringEvents", "type": "dynamic" } ] diff --git a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_dataConnector.json b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_dataConnector.json index b0bd2cccf12..bbcd39d7f5b 100644 --- a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_dataConnector.json +++ b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_dataConnector.json @@ -33,7 +33,7 @@ "timeoutInSeconds": 60, "queryTimeFormat": "yyyy-MM-ddTHH:mm:ssZ", "queryParameters": { - "$expand": "TriggeringEvents", + "$expand": "NormalizedTriggeringEvents", "$filter": "CreationTimestamp gt {_QueryWindowStartTime} and CreationTimestamp le {_QueryWindowEndTime}" }, "headers": { diff --git a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_table.json b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_table.json index 3352ab19bec..4d3d837863b 100644 --- a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_table.json +++ b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_table.json @@ -56,7 +56,7 @@ "type": "int" }, { - "name": "TriggeringEvents", + "name": "NormalizedTriggeringEvents", "type": "dynamic" } ] diff --git a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/solutionMetadata.json b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/solutionMetadata.json index 90c6080dcef..4ff9cbb8b10 100644 --- a/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/solutionMetadata.json +++ b/Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/solutionMetadata.json @@ -1,7 +1,7 @@ { "SolutionName":"SAP ETD Cloud", "SolutionAuthor": "SAP", - "SolutionVersion":"3.0.0", + "SolutionVersion":"3.0.1", "PackageId": "azuresentinel.azure-sentinel-solution-SAPLogServPushV1", "TemplateName": "SAPETDPushV1", "ConnectorDefinitionTemplateVersion": "1.0.0", diff --git a/Solutions/SAP ETD Cloud/Data/Solution_SAPETD.json b/Solutions/SAP ETD Cloud/Data/Solution_SAPETD.json index 432f3462847..3fb49e35572 100644 --- a/Solutions/SAP ETD Cloud/Data/Solution_SAPETD.json +++ b/Solutions/SAP ETD Cloud/Data/Solution_SAPETD.json @@ -20,7 +20,7 @@ "Watchlists": [], "WatchlistDescription": [], "BasePath": "C:\\GitHub\\Azure-Sentinel\\Solutions\\SAP ETD Cloud", - "Version": "3.0.0", + "Version": "3.0.1", "Metadata": "SolutionMetadata.json", "TemplateSpec": true, "Is1PConnector": false diff --git a/Solutions/SAP ETD Cloud/Package/3.0.1.zip b/Solutions/SAP ETD Cloud/Package/3.0.1.zip new file mode 100644 index 00000000000..9abd8e20367 Binary files /dev/null and b/Solutions/SAP ETD Cloud/Package/3.0.1.zip differ diff --git a/Solutions/SAP ETD Cloud/Package/mainTemplate.json b/Solutions/SAP ETD Cloud/Package/mainTemplate.json index db748251509..d67543b8790 100644 --- a/Solutions/SAP ETD Cloud/Package/mainTemplate.json +++ b/Solutions/SAP ETD Cloud/Package/mainTemplate.json @@ -99,7 +99,7 @@ "description": "Synch alerts coming in from SAP Enterprise Threat Detection into Microsoft Sentinel (one way)", "displayName": "SAP ETD - Synch alerts", "enabled": false, - "query": "let minThreshold= 1;\nlet minScore= 50;\nlet lookBack= 70d;\nSAPETDAlerts_CL\n| mv-expand TriggeringEvents\n| extend sapOriginalEvent = tostring(TriggeringEvents.OriginalEvent)\n| where PatternName <> \"Logon from external with SAP standard users\"\n| summarize arg_max(TimeGenerated, *) by AlertId\n| where Threshold >= minThreshold and Score >= minScore\n| extend NewEvent= split(sapOriginalEvent, \"\\n\")\n| mv-expand NewEvent to typeof(string)\n| parse NewEvent with Key: string \":\" Value: string\n| extend Value= iff(isempty(Key) and isnotempty(NewEvent), NewEvent, Value), Key= iff(isempty(Key) and isnotempty(NewEvent), TriggeringEvents.EventLogType, Key)\n| extend KV= bag_pack(Key, Value)\n| summarize KeyValues= make_bag(KV), take_any(CreationTimestamp, MinTimestamp, MaxTimestamp, TriggeringEvents.EventLogType, Measure, PatternDescription, PatternName, Status, Threshold, TriggeringEvents.OriginalEvent) by AlertId\n| extend SystemId= KeyValues.sid, ClienId= KeyValues.client, Host= KeyValues.instance_host, Instance= KeyValues.instance_name, User= KeyValues.user_name, IP= KeyValues.user_ip\n", + "query": "let minThreshold= 1;\nlet minScore= 50;\nlet lookBack= 70d;\nSAPETDAlerts_CL\n| mv-expand NormalizedTriggeringEvents\n| extend sapOriginalEvent = tostring(NormalizedTriggeringEvents.OriginalEvent)\n| where PatternName <> \"Logon from external with SAP standard users\"\n| summarize arg_max(TimeGenerated, *) by AlertId\n| where Threshold >= minThreshold and Score >= minScore\n| extend NewEvent= split(sapOriginalEvent, \"\\n\")\n| mv-expand NewEvent to typeof(string)\n| parse NewEvent with Key: string \":\" Value: string\n| extend Value= iff(isempty(Key) and isnotempty(NewEvent), NewEvent, Value), Key= iff(isempty(Key) and isnotempty(NewEvent), NormalizedTriggeringEvents.EventLogType, Key)\n| extend KV= bag_pack(Key, Value)\n| summarize KeyValues= make_bag(KV), take_any(CreationTimestamp, MinTimestamp, MaxTimestamp, NormalizedTriggeringEvents.EventLogType, Measure, PatternDescription, PatternName, Status, Threshold, NormalizedTriggeringEvents.OriginalEvent) by AlertId\n| extend SystemId= KeyValues.sid, ClienId= KeyValues.client, Host= KeyValues.instance_host, Instance= KeyValues.instance_name, User= KeyValues.user_name, IP= KeyValues.user_ip\n", "queryFrequency": "PT1H", "queryPeriod": "P2D", "severity": "Medium", @@ -232,7 +232,7 @@ "description": "Identifies logons from an unexpected network.\nSource Action: Logon to the backend system from an IP address which is not assigned to one of the networks.\nnetworks can be maintained in the \"SAP - Networks\" watchlist of the Microsoft Sentinel Solution for SAP package.\n\n*Data Sources: SAP Enterprise Thread Detection Solution - Alerts*", "displayName": "SAP ETD - Login from unexpected network", "enabled": false, - "query": "let regex_ip = @\"user_ip:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\";\nlet regex_user = @\"user_name:(\\w+)\";\nlet regex_sid = @\"sid:(\\w{3})\";\nlet regex_client = @\"client:(\\d{3})\";\nlet regex_instance_name = @\"instance_name:(\\w+)\";\nlet regex_instance_host = @\"instance_host:([\\w-]+)\";\nlet SAPNetworks = _GetWatchlist('SAP - Networks');\nSAPETDAlerts_CL\n| mv-expand TriggeringEvents\n| extend sapOriginalEvent = tostring(TriggeringEvents.OriginalEvent)\n| extend Id_ = TriggeringEvents.Id\n| extend extracted_user_ip = extract(regex_ip, 1, sapOriginalEvent)\n| extend extracted_sap_user = extract(regex_user, 1, sapOriginalEvent)\n| extend extracted_sid = extract(regex_sid, 1, sapOriginalEvent)\n| extend extracted_client = extract(regex_client, 1, sapOriginalEvent)\n| extend extracted_instance_name = extract(regex_instance_name, 1, sapOriginalEvent)\n| extend extracted_instance_host = extract(regex_instance_host, 1, sapOriginalEvent)\n| evaluate ipv4_lookup(SAPNetworks, extracted_user_ip, Network, return_unmatched = true)\n| where isempty(Network)\n| project TimeGenerated, extracted_user_ip, extracted_sap_user, extracted_sid, extracted_client, extracted_instance_name, extracted_instance_host, AlertId, PatternName, PatternDescription, Status\n| extend GeoLocation= iff(ipv4_is_private( extracted_user_ip), dynamic({\"IsPrivate\": true}), geo_info_from_ip_address(extracted_user_ip))\n", + "query": "let regex_ip = @\"user_ip:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\";\nlet regex_user = @\"user_name:(\\w+)\";\nlet regex_sid = @\"sid:(\\w{3})\";\nlet regex_client = @\"client:(\\d{3})\";\nlet regex_instance_name = @\"instance_name:(\\w+)\";\nlet regex_instance_host = @\"instance_host:([\\w-]+)\";\nlet SAPNetworks = _GetWatchlist('SAP - Networks');\nSAPETDAlerts_CL\n| mv-expand NormalizedTriggeringEvents\n| extend sapOriginalEvent = tostring(NormalizedTriggeringEvents.OriginalEvent)\n| extend Id_ = NormalizedTriggeringEvents.Id\n| extend extracted_user_ip = extract(regex_ip, 1, sapOriginalEvent)\n| extend extracted_sap_user = extract(regex_user, 1, sapOriginalEvent)\n| extend extracted_sid = extract(regex_sid, 1, sapOriginalEvent)\n| extend extracted_client = extract(regex_client, 1, sapOriginalEvent)\n| extend extracted_instance_name = extract(regex_instance_name, 1, sapOriginalEvent)\n| extend extracted_instance_host = extract(regex_instance_host, 1, sapOriginalEvent)\n| evaluate ipv4_lookup(SAPNetworks, extracted_user_ip, Network, return_unmatched = true)\n| where isempty(Network)\n| project TimeGenerated, extracted_user_ip, extracted_sap_user, extracted_sid, extracted_client, extracted_instance_name, extracted_instance_host, AlertId, PatternName, PatternDescription, Status\n| extend GeoLocation= iff(ipv4_is_private( extracted_user_ip), dynamic({\"IsPrivate\": true}), geo_info_from_ip_address(extracted_user_ip))\n", "queryFrequency": "PT1H", "queryPeriod": "P2D", "severity": "Medium", @@ -599,7 +599,7 @@ "type": "int" }, { - "name": "TriggeringEvents", + "name": "NormalizedTriggeringEvents", "type": "dynamic" } ] @@ -686,7 +686,7 @@ "type": "int" }, { - "name": "TriggeringEvents", + "name": "NormalizedTriggeringEvents", "type": "dynamic" } ] @@ -1018,7 +1018,7 @@ "timeoutInSeconds": 60, "queryTimeFormat": "yyyy-MM-ddTHH:mm:ssZ", "queryParameters": { - "$expand": "TriggeringEvents", + "$expand": "NormalizedTriggeringEvents", "$filter": "CreationTimestamp gt {_QueryWindowStartTime} and CreationTimestamp le {_QueryWindowEndTime}" }, "headers": { diff --git a/Solutions/SAP ETD Cloud/ReleaseNotes.md b/Solutions/SAP ETD Cloud/ReleaseNotes.md index 59fa1bd25b6..067000aef23 100644 --- a/Solutions/SAP ETD Cloud/ReleaseNotes.md +++ b/Solutions/SAP ETD Cloud/ReleaseNotes.md @@ -1,3 +1,4 @@ | **Version** | **Date Modified (DD-MM-YYYY)** | **Change History** | |-------------|--------------------------------|---------------------------------------------| -| 3.0.0 | 17-02-2025 | Initial Solution Release | \ No newline at end of file +| 3.0.1 | 31-03-2025 | SAP OData entity change from TriggeringEvents to new NormalizedTriggeringEvents | +| 3.0.0 | 17-02-2025 | Initial Solution Release | diff --git a/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/solutionMetadata.json b/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/solutionMetadata.json index a2be36342e1..af9457060ef 100644 --- a/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/solutionMetadata.json +++ b/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/solutionMetadata.json @@ -1,7 +1,7 @@ { "SolutionName":"SAP LogServ for Microsoft Sentinel", "SolutionAuthor": "SAP", - "SolutionVersion":"3.0.0", + "SolutionVersion":"3.0.1", "PackageId": "azuresentinel.azure-sentinel-solution-SAPLogServPushV1", "TemplateName": "SAPLogServPushV1", "ConnectorDefinitionTemplateVersion": "1.0.0", diff --git a/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/table.json b/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/table.json index d701382a123..21960f5b84a 100644 --- a/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/table.json +++ b/Solutions/SAP LogServ/Data Connectors/SAPLogServ_PUSH_CCP/table.json @@ -65,7 +65,6 @@ "type": "real" } ] - }, - "totalRetentionInDays": 30 + } } } \ No newline at end of file diff --git a/Solutions/SAP LogServ/Data/Solution_SAPLogServ.json b/Solutions/SAP LogServ/Data/Solution_SAPLogServ.json index 7e12dedd503..6cce85039f0 100644 --- a/Solutions/SAP LogServ/Data/Solution_SAPLogServ.json +++ b/Solutions/SAP LogServ/Data/Solution_SAPLogServ.json @@ -7,7 +7,7 @@ "Data Connectors/SAPLogServ_PUSH_CCP/SAPLogServ_connectorDefinition.json" ], "BasePath": "C:\\GitHub\\Azure-Sentinel\\Solutions\\SAP LogServ", - "Version": "3.0.0", + "Version": "3.0.1", "Metadata": "SolutionMetadata.json", "TemplateSpec": true, "Is1PConnector": false diff --git a/Solutions/SAP LogServ/ReleaseNotes.md b/Solutions/SAP LogServ/ReleaseNotes.md index 59fa1bd25b6..d2f1d09bd1e 100644 --- a/Solutions/SAP LogServ/ReleaseNotes.md +++ b/Solutions/SAP LogServ/ReleaseNotes.md @@ -1,3 +1,4 @@ | **Version** | **Date Modified (DD-MM-YYYY)** | **Change History** | |-------------|--------------------------------|---------------------------------------------| +| 3.0.1 | 09-04-2025 | Retention setting dropped from table to default to LogAnalytics ws default | | 3.0.0 | 17-02-2025 | Initial Solution Release | \ No newline at end of file