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
Copy file name to clipboardExpand all lines: articles/sentinel/audit-sentinel-data.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Use the **AzureActivity** table when auditing activity in your SOC environment w
45
45
46
46
The **AzureActivity** table includes data from many services, including Microsoft Sentinel. To filter in only data from Microsoft Sentinel, start your query with the following code:
47
47
48
-
```kql
48
+
```kusto
49
49
AzureActivity
50
50
| where OperationNameValue startswith "MICROSOFT.SECURITYINSIGHTS"
51
51
```
@@ -67,7 +67,7 @@ For more information, see [Microsoft Sentinel data included in Azure Activity lo
67
67
68
68
The following **AzureActivity** table query lists all actions taken by a specific Microsoft Entra user in the last 24 hours.
69
69
70
-
```kql
70
+
```kusto
71
71
AzureActivity
72
72
| where OperationNameValue contains "SecurityInsights"
73
73
| where Caller == "[AzureAD username]"
@@ -78,7 +78,7 @@ AzureActivity
78
78
79
79
The following **AzureActivity** table query lists all the delete operations performed in your Microsoft Sentinel workspace.
80
80
81
-
```kql
81
+
```kusto
82
82
AzureActivity
83
83
| where OperationNameValue contains "SecurityInsights"
84
84
| where OperationName contains "Delete"
@@ -150,7 +150,7 @@ LAQueryLogs data includes information such as:
150
150
151
151
For example, the following query shows how many queries were run in the last week, on a per-day basis:
152
152
153
-
```kql
153
+
```kusto
154
154
LAQueryLogs
155
155
| where TimeGenerated > ago(7d)
156
156
| summarize events_count=count() by bin(TimeGenerated, 1d)
@@ -162,7 +162,7 @@ The following sections show more sample queries to run on the **LAQueryLogs** ta
162
162
163
163
The following **LAQueryLogs** table query shows the number of queries run, where anything other than an HTTP response of **200 OK** was received. For example, this number includes queries that had failed to run.
164
164
165
-
```kql
165
+
```kusto
166
166
LAQueryLogs
167
167
| where ResponseCode != 200
168
168
| count
@@ -172,7 +172,7 @@ LAQueryLogs
172
172
173
173
The following **LAQueryLogs** table query lists the users who ran the most CPU-intensive queries, based on CPU used and length of query time.
174
174
175
-
```kql
175
+
```kusto
176
176
LAQueryLogs
177
177
|summarize arg_max(StatsCPUTimeMs, *) by AADClientId
178
178
| extend User = AADEmail, QueryRunTime = StatsCPUTimeMs
@@ -184,7 +184,7 @@ LAQueryLogs
184
184
185
185
The following **LAQueryLogs** table query lists the users who ran the most queries in the last week.
186
186
187
-
```kql
187
+
```kusto
188
188
LAQueryLogs
189
189
| where TimeGenerated > ago(7d)
190
190
| summarize events_count=count() by AADEmail
@@ -203,7 +203,7 @@ You might want to use Microsoft Sentinel auditing resources to create proactive
203
203
204
204
For example, if you have sensitive tables in your Microsoft Sentinel workspace, use the following query to notify you each time those tables are queried:
205
205
206
-
```kql
206
+
```kusto
207
207
LAQueryLogs
208
208
| where QueryText contains "[Name of sensitive table]"
Copy file name to clipboardExpand all lines: articles/sentinel/mssp-protect-intellectual-property.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ To do this, you need a workspace in your own tenant with Microsoft Sentinel enab
69
69
70
70
To create an analytic rule or hunting query in the MSSP tenant that references data in the customer tenant, you must use the `workspace` statement as follows:
Copy file name to clipboardExpand all lines: articles/sentinel/normalization-develop-parsers.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ For example, Infoblox DNS events are sent as Syslog messages, and are hard to di
120
120
121
121
To use the ASimSourceType watchlist in your parsers, use the `_ASIM_GetSourceBySourceType` function in the parser filtering section. For example, the Infoblox DNS parser includes the following in the filtering section:
122
122
123
-
```KQL
123
+
```kusto
124
124
| where Computer in (_ASIM_GetSourceBySourceType('InfobloxNIOS'))
125
125
```
126
126
@@ -193,7 +193,7 @@ The KQL operators that perform parsing are listed below, ordered by their perfor
193
193
194
194
The simplest form of normalization is renaming an original field to its normalized name. Use the operator `project-rename` for that. Using project-rename ensures that the field is still managed as a physical field and handling the field is more performant. For example:
@@ -208,7 +208,7 @@ Also, ensuring that parser output fields matches type defined in the schema is c
208
208
209
209
For example, the original unique event ID may be sent as an integer, but ASIM requires the value to be a string, to ensure broad compatibility among data sources. Therefore, when assigning the source field use `extend` and `tostring` instead of `project-rename`:
210
210
211
-
```KQL
211
+
```kusto
212
212
| extend EventOriginalUid = tostring(ReportId),
213
213
```
214
214
@@ -218,13 +218,13 @@ The value of the source field, once extracted, may need to be mapped to the set
218
218
219
219
For example, the Microsoft DNS parser assigns the `EventResult` field based on the Event ID and Response Code using an `iff` statement, as follows:
220
220
221
-
```KQL
221
+
```kusto
222
222
extend EventResult = iff(EventId==257 and ResponseCode==0 ,'Success','Failure')
223
223
```
224
224
225
225
To map several values, define the mapping using the `datatable` operator and use `lookup` to perform the mapping. For example, some sources report numeric DNS response codes and the network protocol, while the schema mandates the more common text labels representation for both. The following example demonstrates how to derive the needed values using `datatable` and `lookup`:
226
226
227
-
```KQL
227
+
```kusto
228
228
let NetworkProtocolLookup = datatable(Proto:real, NetworkProtocol:string)[
229
229
6, 'TCP',
230
230
17, 'UDP'
@@ -245,7 +245,7 @@ Notice that lookup is useful and efficient also when the mapping has only two po
245
245
246
246
When the mapping conditions are more complex combine `iff`, `case`, and `lookup`. The example below shows how to combine `lookup` and `case`. The `lookup` example above returns an empty value in the field `DnsResponseCodeName` if the lookup value is not found. The `case` example below augments it by using the result of the `lookup` operation if available, and specifying additional conditions otherwise.
247
247
248
-
```KQL
248
+
```kusto
249
249
| extend DnsResponseCodeName =
250
250
case (
251
251
DnsResponseCodeName != "", DnsResponseCodeName,
@@ -257,7 +257,7 @@ When the mapping conditions are more complex combine `iff`, `case`, and `lookup`
257
257
258
258
Microsoft Sentinel provides handy functions for common lookup values. For example, the `DnsResponseCodeName` lookup above, can be implemented using one of the following functions:
@@ -273,7 +273,7 @@ For a full list of ASIM help functions, refer to [ASIM functions](normalization-
273
273
274
274
In addition to the fields available from the source, a resulting ASIM event includes enrichment fields that the parser should generate. In many cases, the parsers can assign a constant value to the fields, for example:
275
275
276
-
```KQL
276
+
```kusto
277
277
| extend
278
278
EventCount = int(1),
279
279
EventProduct = 'M365 Defender for Endpoint',
@@ -286,13 +286,13 @@ Another type of enrichment fields that your parsers should set are type fields,
286
286
287
287
In most cases, types are also assigned a constant value. However, in some cases the type has to be determined based on the actual value, for example:
<a name="resolvefqnd"></a>Microsoft Sentinel provides useful functions for handling enrichment. For example, use the following function to automatically assign the fields `SrcHostname`, `SrcDomain`, `SrcDomainType` and `SrcFQDN` based on the value in the field `Computer`.
294
294
295
-
```KQL
295
+
```kusto
296
296
| invoke _ASIM_ResolveSrcFQDN('Computer')
297
297
```
298
298
@@ -319,7 +319,7 @@ The following KQL operators are used to select fields in your results set:
319
319
320
320
For example, when parsing a custom log table, use the following to remove the remaining original fields that still have a type descriptor:
321
321
322
-
```KQL
322
+
```kusto
323
323
| project-away
324
324
*_d, *_s, *_b, *_g
325
325
```
@@ -392,7 +392,7 @@ To test ASIM, [deploy the ASIM testing tool](https://aka.ms/ASimTestingTools) to
392
392
393
393
To make sure that your parser produces a valid schema, use the ASIM schema tester by running the following query in the Microsoft Sentinel **Logs** page:
Copy file name to clipboardExpand all lines: articles/sentinel/normalization-functions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Enrichment lookup functions provide an easy method of looking up known values, b
21
21
22
22
The **lookup** version is a scalar function that accepts as input the numeric code and returns the textual form. Use the following KQL snippet with the **lookup** version:
let DisabledParsers=materialize(_GetWatchlist('ASimDisabledParsers') | where SearchKey in ('Any', 'imDns') | extend SourceSpecificParser=column_ifexists('SourceSpecificParser','') | distinct SourceSpecificParser);
143
143
let imDnsBuiltInDisabled=toscalar('imDnsBuiltIn' in (DisabledParsers) or 'Any' in (DisabledParsers));
@@ -159,7 +159,7 @@ Microsoft Sentinel users can directly modify workspace-deployed parsers. Create
159
159
160
160
For example, the following code shows a DNS filtering unifying parser, having replaced the `vimDnsAzureFirewall` parser with a modified version:
let DisabledParsers=materialize(_GetWatchlist('ASimDisabledParsers') | where SearchKey in ('Any', 'imDns') | extend SourceSpecificParser=column_ifexists('SourceSpecificParser','') | distinct SourceSpecificParser);
165
165
let imDnsBuiltInDisabled=toscalar('imDnsBuiltIn' in (DisabledParsers) or 'Any' in (DisabledParsers));
To filter only DNS queries for a specified list of domain names, use:
105
105
106
-
```kql
106
+
```kusto
107
107
let torProxies=dynamic(["tor2web.org", "tor2web.com", "torlink.co"]);
108
108
_Im_Dns (domain_has_any = torProxies)
109
109
```
@@ -350,7 +350,7 @@ In most cases, logged DNS events don't include response information, which may b
350
350
351
351
You can also provide an extra KQL function called `_imDNS<vendor>Response_`, which takes the unparsed response as input and returns dynamic value with the following structure:
0 commit comments