You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Microsoft Sentinel Threat Monitoring for SAP solution data reference (public preview)
11
+
# Microsoft Sentinel Threat Monitoring for SAP solution data reference
12
12
13
13
[!INCLUDE [Banner for top of topics](../includes/banner.md)]
14
14
15
15
> [!IMPORTANT]
16
-
> The Microsoft Sentinel Threat Monitoring for SAP solution is currently in PREVIEW. The [Azure Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) include additional legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
16
+
> Some components of the Microsoft Sentinel Threat Monitoring for SAP solution are currently in PREVIEW. The [Azure Preview Supplemental Terms](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) include additional legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
17
17
>
18
18
> Some logs, noted below, are not sent to Microsoft Sentinel by default, but you can manually add them as needed. For more information, see [Define the SAP logs that are sent to Microsoft Sentinel](sap-solution-deploy-alternate.md#define-the-sap-logs-that-are-sent-to-microsoft-sentinel).
19
19
>
@@ -31,6 +31,13 @@ Users are *strongly encouraged* to use the functions as the subjects of their an
@@ -65,7 +72,7 @@ Users are considered privileged when they are listed in the *SAP - Privileged Us
65
72
**Parameters:**
66
73
- TimeAgo
67
74
- Optional
68
-
- Default value: 7 days
75
+
- Default value: Seven days
69
76
- Determines that the function seeks User master data from the time defined by the `TimeAgo` value until the time defined by the `now()` value.
70
77
71
78
The **SAPUsersGetPrivileged** function returns the following data:
@@ -84,7 +91,7 @@ The **SAPUsersAuthorizations** function brings together data from several tables
84
91
**Parameters:**
85
92
- TimeAgo
86
93
- Optional
87
-
- Default value: 7 days
94
+
- Default value: Seven days
88
95
- Determines that the function seeks User master data from the time defined by the `TimeAgo` value until the time defined by the `now()` value.
89
96
90
97
The **SAPUsersAuthorizations** function returns the following data:
@@ -112,17 +119,16 @@ The **SAPConnectorHealth** function reflects the status of the agent's and the u
112
119
| LastSeen | Timestamp of latest activity |
113
120
| StatusCode | Code reflecting the system's status |
114
121
115
-
116
122
### SAPConnectorOverview
117
123
118
124
The **SAPConnectorOverview** function shows row counts of each SAP table per System ID. It returns a list of data records per system ID, and their time generated.
119
125
120
126
**Parameters:**
121
-
- TimeAgo
122
-
- Optional
123
-
- Default value: 7 days
124
-
- Determines that the function seeks User master data from the time defined by the `TimeAgo` value until the time defined by the `now()` value.
125
127
128
+
- TimeAgo
129
+
- Optional
130
+
- Default value: Seven days
131
+
- Determines that the function seeks User master data from the time defined by the `TimeAgo` value until the time defined by the `now()` value.
126
132
127
133
| Field | Description |
128
134
| --------------- | ----------- |
@@ -136,6 +142,249 @@ SAPConnectorOverview(7d)
136
142
| summarize count() by bin(TimeGenerated, 1d), SystemID_s
137
143
```
138
144
145
+
### SAPUsersEmail
146
+
147
+
The **SAPUsersEmail** function allows for a performance oriented lookup of an SAP user's email address per SAP system and client, normally used to associate it with an active directory account.
148
+
Using data extracted from SAP tables USR21 (User Name/Address Key Assignment) and ADR6 (E-Mail Addresses), the SAPUsersEmail function looks for an Email address. In case one is not found, the user ID is returned instead of an Email address. This behavior ensures that SAP service accounts (such as DDIC), that often are not associated with an email addresses, will be logged as pseudo AD accounts, enabling some UEBA features, aiding in the investigation of incidents and hunting activities.
149
+
150
+
| Field | Description |
151
+
| --------------- | ----------- |
152
+
| ClientID | The SAP Client ID |
153
+
| SystemID | The SAP System ID |
154
+
| User | The SAP User ID |
155
+
| Email | The Email address of the SAP User |
156
+
157
+
### SAPSystems
158
+
159
+
The **SAPSystems** function is used to centrally present the per-system configuration made using the 'SAP - Systems' watchlist.
160
+
161
+
**Parameters:**
162
+
163
+
- SelectedSystems
164
+
- Optional
165
+
- Default value: "All Systems"
166
+
- Used to filter specific SAP systems
167
+
- SelectedSystemRoles
168
+
- Optional
169
+
- Default value: "All System Roles"
170
+
- Determines the roles of the SAP Systems to be looked at (as defined in the "SAP - Systems" watchlist)
171
+
172
+
| Field | Description | Data Source/Notes
173
+
| ------------- | ------------- | -------------
174
+
| SearchKey | Search Key | Indexed field for SAP System ID
175
+
| SystemRole | The SAP System's Role | Production, UAT
176
+
| SystemUsage | The main usage of the SAP system | ERP, CRM
177
+
| SystemID | The SAP System ID |
178
+
179
+
180
+
### SAPAuditLogConfiguration
181
+
182
+
The **SAPAuditLogConfiguration** function returns the local configuration of the SAP audit log alerting of the Sentinel workspace, to be used for the different SAP audit log related alerts.
183
+
It joins the data in the 'SAP Dynamic Audit Log Monitor Configuration' and 'SAP - Systems' watchlists to provide a per-system configuration at a per-system-role effort.
184
+
185
+
**Parameters:**
186
+
187
+
- SelectedSystems
188
+
- Optional
189
+
- Default value: "All Systems"
190
+
- Used to filter specific SAP systems to look at.
191
+
- SelectedSystemRoles
192
+
- Optional
193
+
- Default value: "All System Roles"
194
+
- Determines the roles of the SAP Systems to be looked at (as defined in the "SAP - Systems" watchlist).
195
+
- SelectedSeverities
196
+
- Optional
197
+
- Default value: ["High", "Medium"]
198
+
- Used to determine events to be looked at in terms of their severities. Severities per SAP audit log message ID and system role are defined in the "SAP_Dynamic_Audit_Log_Monitor_Configuration" watchlist.
199
+
- SelectedRuleTypes
200
+
- Optional
201
+
- Default value: "All RuleTypes"
202
+
- Determines what events are relevant for detecting the anomalies on. Rule types per SAP audit log message ID and system role are defined in the "SAP_Dynamic_Audit_Log_Monitor_Configuration" watchlist.
203
+
204
+
| Field | Description | Data Source/Notes
205
+
| ------------- | ------------- | -------------
206
+
| CategoryName | SAP given event category | 'SAP Dynamic Audit Log Monitor Configuration' watchlist
207
+
| DestinationEmail | Email address of the Assigned Team | 'SAP Dynamic Audit Log Monitor Configuration' watchlist
208
+
| DetailedDescription | A markdown formatted text to be displayed on alerts | 'SAP Dynamic Audit Log Monitor Configuration' watchlist
209
+
| MessageID | The SAP audit log message ID | 'SAP Dynamic Audit Log Monitor Configuration' watchlist
210
+
| MessageText | A sample message text | 'SAP Dynamic Audit Log Monitor Configuration' watchlist
211
+
| RolesTagsToExclude | an ABAP Role, Profile or free text tag | 'SAP Dynamic Audit Log Monitor Configuration' watchlist
| SystemID | The SAP System ID | 'SAP - Systems' watchlist
216
+
| SystemRole | The SAP System's Role | 'SAP - Systems' watchlist
217
+
| SystemUsage | The main usage of the SAP system | 'SAP - Systems' watchlist
218
+
| IsProd | Production system flag | 'SAP - Systems' watchlist
219
+
| Severity | The derived severity | Severity per system usage
220
+
| Threshold | The derived threshold | Event count per system Usage
221
+
| BagOfDetails | Bag of Details | A dictionary detailing the event definition
222
+
223
+
224
+
### SAPAuditLogAnomalies
225
+
226
+
The **SAPAuditLogAnomalies** uses Sentinel's underlying Kusto database's built-in machine learning capabilities to help detect anomalous events observed on the SAP audit log.
227
+
Developed for the “SAP - (Experimental) Dynamic Anomaly based Audit Log Monitor Alerts” alert rule, this function was initially designed to alert on recent anomalies but it can also help to highlight historical anomalies (see examples below).
228
+
229
+
**Parameters:**
230
+
231
+
- LearningTime
232
+
- Optional
233
+
- Default Value: 14 days
234
+
- Determines the timespan used for the model learning
235
+
- DetectingTime
236
+
- Optional
237
+
- Default value: One hour
238
+
- Determines the timespan to be looked at for detecting anomalies. Calling this function with DetectingTime = 0h will highlight anomalies across the entire LearningTime timespan
239
+
- SelectedSystems
240
+
- Optional
241
+
- Default value: "All Systems"
242
+
- Used to filter specific SAP systems to look at.
243
+
- SelectedSystemRoles
244
+
- Optional
245
+
- Default value: "All System Roles"
246
+
- Determines the roles of the SAP Systems to be looked at (as defined in the "SAP - Systems" watchlist).
247
+
- SelectedSeverities
248
+
- Optional
249
+
- Default value: ["High", "Medium"]
250
+
- Used to determine events to be looked at in terms of their severities. Severities per SAP audit log message ID and system role are defined in the "SAP_Dynamic_Audit_Log_Monitor_Configuration" watchlist.
251
+
- SelectedPrefixMask
252
+
- Optional
253
+
- Default value: 24
254
+
- Used to determine the subnet mask level used for learning and detecting.
255
+
- SelectedRuleTypes
256
+
- Optional
257
+
- Default value: "AnomaliesOnly"
258
+
- Determines what events are relevant for detecting the anomalies on. Rule types per SAP audit log message ID and system role are defined in the "SAP_Dynamic_Audit_Log_Monitor_Configuration" watchlist.
259
+
260
+
#### Logic
261
+
262
+
The function learns the slice of the history defined by the different input parameters, at the user, network attributes, system, seasonality, and activity levels. It then judges events occurring within the last DetectingTime timespan according to what it has learned, applying thresholds and other configurable exclusion criteria obtained from the SAP audit log configuration watchlist. Once a sliding window of user activity was deemed anomalous, a second query returns the entire user activity as evidence supporting the decision.
263
+
264
+
#### Additional notes
265
+
266
+
As with any machine learning solution, this function performs better with time. Further adjustments can be made using local configuration.
267
+
It is advisable to restrict the size of the learned database to be under 100 million records using the many available input parameters.
268
+
269
+
Example: looking for anomalies for events of high severity that occurred within the past hour on production systems for event types which are marked as "AnomaliesOnly" in the "SAP_Dynamic_Audit_Log_Monitor_Configuration"
|**Multiple fields from SAPAuditLog**| Key fields from the SAP Audit log |
285
+
|**Multiple fields from SAPAuditLogConfiguration**| Key fields from the Sentinel for SAP audit log configuration |
286
+
| DiscoveredOn | The rounded hour on which the anomaly was observed on |
287
+
| EventCount | Number of events counted per row returned|
288
+
| AnomalCount | Number of events observed within relevant sliding window|
289
+
| MinTime | Time of first event observed |
290
+
| MaxTime | Time of last event observed|
291
+
| Score | the anomaly scores as produced by the anomaly model|
292
+
293
+
### SAPUsersGetVIP
294
+
295
+
The Sentinel for SAP solution uses a concept of central user tagging, designed to allow for lower false positive rate with minimal effort on the customer end:
296
+
297
+
- Users can be tagged using the "SAP User Config" watchlist (for example DDIC is assigned with “RunObsoleteProgOK”). Multiple users can have multiple tags.
298
+
- An alert rule sends the relevant tags to the **SAPUsersGetVIP** function asking for a list of users to be excluded. The alert rule “SAP - Execution of an Obsolete or an Insecure Program” can ask for users bearing the tag “RunObsoleteProgOK”.
299
+
300
+
Here is a KQL query demonstrating the use case described below:
301
+
302
+
```kusto
303
+
// Execution of Obsolete/Insecure Program
304
+
let ObsoletePrograms = _GetWatchlist("SAP - Obsolete Programs");
305
+
// here you can exclude system users which are OK to run obsolete/ sensitive programs
306
+
// by adding those users in the SAP_User_Config watchlist with a tag of 'RunObsoleteProgOK'
307
+
let excludeUsersTags= dynamic(['RunObsoleteProgOK']);
308
+
let excludedUsers= SAPUsersGetVIP(SearchForTags= dynamic(["RunObsoleteProgOK"]))| summarize by User2Exclude=SAPUser;
309
+
// Query logic
310
+
SAPAuditLog
311
+
| where MessageID == 'AUW'
312
+
| where ABAPProgramName in (ObsoletePrograms) // The program is obsolete
313
+
| join kind=leftantisemi excludedUsers on $left.User == $right.User2Exclude
314
+
```
315
+
316
+
This functionality is heavily used in the Deterministic and Anomalous Audit Log Monitor Alerts, 'where tags can be associated with SAP audit log message ID, and can also be easily extended to custom alert rules.
317
+
**Parameters:**
318
+
319
+
- SearchForTags
320
+
- Optional
321
+
- Default value: dynamic('All Tags')
322
+
- When SearchForTags equals 'All Tags', all users are returned along with their tags, else, only users bearing the tags specified in SearchForTags are returned. TagsIntersect will show which tags were found, and IntersectionSize will hold the count of those.
323
+
- SpecialFocusTags
324
+
- Optional
325
+
- Default value: "Do not return any in-focus users"
326
+
- The function returns all users bearing the tags specified in SpecialFocusTags, and marked those with specialFocusTagged = true.
| Logic | IntersectionSize | The number of intersected Tags |
341
+
342
+
### SAPUsersHeader
343
+
344
+
The **SAPUsersHeader** function is designed to provide a high-level view of the SAP user. It uses data extracted from both the SAP user master data tables and recent activity on the SAP audit log to gather Email and IP addresses. It then returns last known email and IP addresses along with primary email and IP addresses.
345
+
**Parameters:**
346
+
SelectedSystemRoles:dynamic = dynamic(["All System Roles"]) SelectedSystems:dynamic = dynamic(["All Systems"]) SelectedUsers:dynamic = dynamic(["All Users"]) SelectedUser:string = "All Users"
347
+
348
+
- SelectedSystems
349
+
- Optional
350
+
- Default value: "All Systems"
351
+
- Used to filter specific SAP systems to look at.
352
+
- SelectedSystemRoles
353
+
- Optional
354
+
- Default value: "All System Roles"
355
+
- Determines the roles of the SAP Systems to be looked at (as defined in the "SAP - Systems" watchlist).
356
+
- SelectedUsers
357
+
- Optional
358
+
- Default value: "All Users"
359
+
- Can input lists of users.
360
+
- SelectedUser
361
+
- Optional
362
+
- Default value: "All Users"
363
+
- Accepts a single user only
364
+
365
+
#### Additional notes
366
+
For performance considerations, only a few days of audit activity are considered.
367
+
For a full history of user activity, run a custom KQL query against the SAPAuditLog function.
@@ -291,7 +540,7 @@ For best results, use the Microsoft Sentinel functions listed below to visualize
291
540
| ViewName | View name |
292
541
293
542
294
-
### ABAP DB table data log
543
+
### ABAP DB table data log (PREVIEW)
295
544
296
545
To have this log sent to Microsoft Sentinel, you must [add it manually to the **systemconfig.ini** file](sap-solution-deploy-alternate.md#define-the-sap-logs-that-are-sent-to-microsoft-sentinel).
297
546
@@ -325,7 +574,7 @@ To have this log sent to Microsoft Sentinel, you must [add it manually to the **
325
574
| VersionNumber | Version number |
326
575
327
576
328
-
### ABAP Gateway log
577
+
### ABAP Gateway log (PREVIEW)
329
578
330
579
To have this log sent to Microsoft Sentinel, you must [add it manually to the **systemconfig.ini** file](sap-solution-deploy-alternate.md#define-the-sap-logs-that-are-sent-to-microsoft-sentinel).
331
580
@@ -335,7 +584,7 @@ To have this log sent to Microsoft Sentinel, you must [add it manually to the **
335
584
336
585
-**Log purpose**: Monitors Gateway activities. Available by the SAP Control Web Service. This log is generated with data across all clients.
337
586
338
-
#### ABAPOS_GW_CL log schema
587
+
#### ABAPOS_GW_CL log schema
339
588
340
589
| Field | Description |
341
590
| ------------ | ---------------- |
@@ -347,8 +596,7 @@ To have this log sent to Microsoft Sentinel, you must [add it manually to the **
347
596
| SystemNumber | System number |
348
597
349
598
350
-
### ABAP ICM log
351
-
599
+
### ABAP ICM log (PREVIEW)
352
600
To have this log sent to Microsoft Sentinel, you must [add it manually to the **systemconfig.ini** file](sap-solution-deploy-alternate.md#define-the-sap-logs-that-are-sent-to-microsoft-sentinel).
353
601
354
602
-**Microsoft Sentinel function for querying this log**: SAPOS_ICM
0 commit comments