Skip to content

Commit 4bb0447

Browse files
authored
Merge pull request #14089 from MartinPankraz/feature/sap-etd-users-entity
Feature/sap etd users entity
2 parents c8d29e6 + b87ea1d commit 4bb0447

13 files changed

Lines changed: 218 additions & 61 deletions

File tree

.script/tests/KqlvalidationsTests/CustomTables/SAPETDAlerts_CL.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
{
5353
"name": "NormalizedTriggeringEvents",
5454
"type": "dynamic"
55+
},
56+
{
57+
"name": "Users",
58+
"type": "dynamic"
5559
}
5660
]
5761
}

Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-ExecutionofSensitiveFunctionModule.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,21 @@ query: |
4343
| where extracted_function_module in (SenseModules)
4444
| extend AlertName = strcat("SAP ETD - Sensitive Function Module ", extracted_function_module," was executed by user ", extracted_sap_user,
4545
" in a ", tolower(extracted_system_role), " system"), Dummy = " "
46+
| mv-expand Users
47+
| extend
48+
UserAccountName = tostring(Users.UserAccountName),
49+
UserEmail = tostring(Users.EmailAddresses[0])
4650
eventGroupingSettings:
4751
aggregationKind: SingleAlert
4852
entityMappings:
53+
- entityType: Account
54+
fieldMappings:
55+
- identifier: Name
56+
columnName: UserAccountName
57+
- entityType: Mailbox
58+
fieldMappings:
59+
- identifier: MailboxPrimaryAddress
60+
columnName: UserEmail
4961
- entityType: CloudApplication
5062
fieldMappings:
5163
- identifier: AppId
@@ -68,5 +80,6 @@ alertDetailsOverride:
6880
Source: SAP ETD
6981
customDetails:
7082
SAP_User: extracted_sap_user
83+
SAP_UserEmail: UserEmail
7184
ETD_AlertNumber: AlertId
72-
version: 1.0.0
85+
version: 1.0.1

Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-LoginFromUnexpectedNetwork.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ tactics:
2222
relevantTechniques: []
2323
query: |
2424
let AuditTimeAgo = 60m;
25+
let minThreshold= 1;
26+
let minScore= 50;
2527
let regex_sid = @"^([A-Z0-9]{3})/";
2628
let regex_client = @"/(\d{3})$";
2729
let SAPNetworks = _GetWatchlist('SAP - Networks');
2830
SAPETDAlerts_CL
2931
| where TimeGenerated > ago(AuditTimeAgo)
32+
| where Threshold >= minThreshold and Score >= minScore
3033
| where PatternName in ("Logon from external with SAP standard users","Access via unallowed IP Address")
3134
| mv-expand NormalizedTriggeringEvents
3235
| extend sapOriginalEvent = tostring(NormalizedTriggeringEvents)
@@ -40,11 +43,23 @@ query: |
4043
| extend extracted_instance_host = NormalizedTriggeringEvents.NetworkHostnameInitiator
4144
| evaluate ipv4_lookup(SAPNetworks, extracted_user_ip, Network, return_unmatched = true)
4245
| where isempty(Network)
43-
| project TimeGenerated, extracted_user_ip, extracted_sap_user, extracted_sid, extracted_client, extracted_instance_name, extracted_instance_host, AlertId, PatternName, PatternDescription, Status, NormalizedTriggeringEvents
46+
| project TimeGenerated, extracted_user_ip, extracted_sap_user, extracted_sid, extracted_client, extracted_instance_name, extracted_instance_host, AlertId, PatternName, PatternDescription, Status, NormalizedTriggeringEvents, Users
4447
| extend GeoLocation= iff(ipv4_is_private(extracted_user_ip), dynamic({"IsPrivate": true}), geo_info_from_ip_address(extracted_user_ip))
48+
| mv-expand Users
49+
| extend
50+
UserAccountName = tostring(Users.UserAccountName),
51+
UserEmail = tostring(Users.EmailAddresses[0])
4552
eventGroupingSettings:
4653
aggregationKind: AlertPerResult
4754
entityMappings:
55+
- entityType: Account
56+
fieldMappings:
57+
- identifier: Name
58+
columnName: UserAccountName
59+
- entityType: Mailbox
60+
fieldMappings:
61+
- identifier: MailboxPrimaryAddress
62+
columnName: UserEmail
4863
- entityType: CloudApplication
4964
fieldMappings:
5065
- identifier: AppId
@@ -65,5 +80,6 @@ alertDetailsOverride:
6580
{{PatternDescription}}
6681
customDetails:
6782
SAP_User: extracted_sap_user
83+
SAP_UserEmail: UserEmail
6884
ETD_AlertNumber: AlertId
69-
version: 1.0.3
85+
version: 1.0.4

Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-SynchAlerts.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,22 @@ query: |
3030
Host= NormalizedTriggeringEvents.NetworkHostnameInitiator,
3131
Instance= NormalizedTriggeringEvents.NetworkHostnameActor,
3232
User= NormalizedTriggeringEvents.UserAccountActing,
33-
IP= NormalizedTriggeringEvents.NetworkIPAddressInitiator;
33+
IP= NormalizedTriggeringEvents.NetworkIPAddressInitiator
34+
| mv-expand Users
35+
| extend
36+
UserAccountName = tostring(Users.UserAccountName),
37+
UserEmail = tostring(Users.EmailAddresses[0]);
3438
eventGroupingSettings:
3539
aggregationKind: AlertPerResult
3640
entityMappings:
41+
- entityType: Account
42+
fieldMappings:
43+
- identifier: Name
44+
columnName: UserAccountName
45+
- entityType: Mailbox
46+
fieldMappings:
47+
- identifier: MailboxPrimaryAddress
48+
columnName: UserEmail
3749
- entityType: CloudApplication
3850
fieldMappings:
3951
- identifier: Name
@@ -55,5 +67,6 @@ alertDetailsOverride:
5567
alertDescriptionFormat: '{{PatternDescription}}'
5668
customDetails:
5769
SAP_User: User
70+
SAP_UserEmail: UserEmail
5871
ETD_AlertNumber: AlertId
59-
version: 1.0.3
72+
version: 1.0.4

Solutions/SAP ETD Cloud/Analytic Rules/SAPETD-SynchInvestigations.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,26 @@ query: |
2020
SAPETDInvestigations_CL
2121
| where TimeGenerated > ago(AuditTimeAgo)
2222
| where Severity in (_severity)
23+
| mv-expand Users
24+
| extend
25+
UserAccountName = tostring(Users.UserAccountName),
26+
UserEmail = tostring(Users.EmailAddresses[0])
2327
eventGroupingSettings:
2428
aggregationKind: AlertPerResult
29+
entityMappings:
30+
- entityType: Account
31+
fieldMappings:
32+
- identifier: Name
33+
columnName: UserAccountName
34+
- entityType: Mailbox
35+
fieldMappings:
36+
- identifier: MailboxPrimaryAddress
37+
columnName: UserEmail
2538
alertDetailsOverride:
2639
alertDisplayNameFormat: 'SAP ETD - {{Description}} '
2740
alertDescriptionFormat: 'Description: {{Description}}. Processed by {{Processor}}. Severity: {{Severity}}.'
2841
customDetails:
2942
ETD_InvestNumber: InvestigationId
30-
version: 1.0.0
43+
SAP_UserAccount: UserAccountName
44+
SAP_UserEmail: UserEmail
45+
version: 1.0.1

Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_DCR.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,14 @@
5555
{
5656
"name": "NormalizedTriggeringEvents",
5757
"type": "dynamic"
58+
},
59+
{
60+
"name": "Users",
61+
"type": "dynamic"
5862
}
5963
]
6064
},
61-
"Custom-SAPETDInvestigations_CL": {
65+
"Custom-SAPETDInvestigations_CL":{
6266
"columns": [
6367
{
6468
"name": "Version",

Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_PollerConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"timeoutInSeconds": 60,
3434
"queryTimeFormat": "yyyy-MM-ddTHH:mm:ssZ",
3535
"queryParameters": {
36-
"$expand": "NormalizedTriggeringEvents",
36+
"$expand": "NormalizedTriggeringEvents,Users",
3737
"$filter": "CreationTimestamp gt {_QueryWindowStartTime} and CreationTimestamp le {_QueryWindowEndTime}"
3838
},
3939
"headers": {

Solutions/SAP ETD Cloud/Data Connectors/SAPETD_PUSH_CCP/SAPETD_table.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
{
5959
"name": "NormalizedTriggeringEvents",
6060
"type": "dynamic"
61+
},
62+
{
63+
"name": "Users",
64+
"type": "dynamic"
6165
}
6266
]
6367
}
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
2-
"Name": "SAP ETD Cloud",
3-
"Author": "SAP",
4-
"Logo": "<img src=\"https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Logos/SAPBTP.svg\" width=\"75px\" height=\"75px\">",
5-
"Description": "The Microsoft Sentinel Solution for SAP ETD integrates SAP Enterprise Threat Detection entities into Microsoft Sentinel, allowing SOC teams to ingest, monitor, and hunt across SAP data. This integration enhances security by enabling faster detection, investigation, and mitigation of risks within SAP environments.",
6-
"WorkbookDescription": [],
7-
"Workbooks": [],
8-
"Analytic Rules": [
9-
"Analytic Rules/SAPETD-SynchAlerts.yaml",
10-
"Analytic Rules/SAPETD-SynchInvestigations.yaml",
11-
"Analytic Rules/SAPETD-LoginFromUnexpectedNetwork.yaml",
12-
"Analytic Rules/SAPETD-ExecutionofSensitiveFunctionModule.yaml"
13-
],
14-
"Playbooks": [],
15-
"PlaybookDescription": [],
16-
"Parsers": [],
17-
"SavedSearches": [],
18-
"Hunting Queries": [],
19-
"Data Connectors": [
20-
"/Data Connectors/SAPETD_PUSH_CCP/SAPETD_connectorDefinition.json"
21-
],
22-
"Watchlists": [],
23-
"WatchlistDescription": [],
24-
"BasePath": "C:\\GitHub\\Azure-Sentinel\\Solutions\\SAP ETD Cloud",
25-
"Version": "3.0.3",
26-
"Metadata": "SolutionMetadata.json",
27-
"TemplateSpec": true,
28-
"Is1PConnector": false
29-
}
2+
"Name": "SAP ETD Cloud",
3+
"Author": "SAP",
4+
"Logo": "<img src=\"https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Logos/SAPBTP.svg\" width=\"75px\" height=\"75px\">",
5+
"Description": "The Microsoft Sentinel Solution for SAP ETD integrates SAP Enterprise Threat Detection entities into Microsoft Sentinel, allowing SOC teams to ingest, monitor, and hunt across SAP data. This integration enhances security by enabling faster detection, investigation, and mitigation of risks within SAP environments.",
6+
"WorkbookDescription": [],
7+
"Workbooks": [],
8+
"Analytic Rules": [
9+
"Analytic Rules/SAPETD-SynchAlerts.yaml",
10+
"Analytic Rules/SAPETD-SynchInvestigations.yaml",
11+
"Analytic Rules/SAPETD-LoginFromUnexpectedNetwork.yaml",
12+
"Analytic Rules/SAPETD-ExecutionofSensitiveFunctionModule.yaml"
13+
],
14+
"Playbooks": [],
15+
"PlaybookDescription": [],
16+
"Parsers": [],
17+
"SavedSearches": [],
18+
"Hunting Queries": [],
19+
"Data Connectors": [
20+
"/Data Connectors/SAPETD_PUSH_CCP/SAPETD_connectorDefinition.json"
21+
],
22+
"Watchlists": [],
23+
"WatchlistDescription": [],
24+
"BasePath": "C:\\GitHub\\Azure-Sentinel\\Solutions\\SAP ETD Cloud",
25+
"Version": "3.0.4",
26+
"Metadata": "SolutionMetadata.json",
27+
"TemplateSpec": true,
28+
"Is1PConnector": false
29+
}
11.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)