-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathiis.yaml
More file actions
418 lines (416 loc) · 14.3 KB
/
Copy pathiis.yaml
File metadata and controls
418 lines (416 loc) · 14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
id: iis
metric_id: iis
backend_only: false
facets:
- facetType: range
groups:
- Measure
name: Duration
path: duration
source: log
type: double
unit:
family: time
name: nanosecond
- groups:
- Web Access
name: Method
path: http.method
source: log
- groups:
- Web Access
name: Referer
path: http.referer
source: log
- groups:
- Web Access
name: Status Code
path: http.status_code
source: log
- groups:
- Web Access
name: URL Host
path: http.url_details.host
source: log
- groups:
- Web Access
name: URL Path
path: http.url_details.path
source: log
- groups:
- Web Access
name: URL Port
path: http.url_details.port
source: log
- groups:
- Web Access
name: URL scheme
path: http.url_details.scheme
source: log
- groups:
- Web Access
name: Browser
path: http.useragent_details.browser.family
source: log
- groups:
- Web Access
name: Device
path: http.useragent_details.device.family
source: log
- groups:
- Web Access
name: OS
path: http.useragent_details.os.family
source: log
- groups:
- Web Access
name: Client IP
path: network.client.ip
source: log
pipeline:
type: pipeline
name: IIS
enabled: true
filter:
query: source:iis
processors:
- type: grok-parser
name: ''
enabled: true
source: message
samples:
- 2002-05-02 17:42:15 172.22.255.255 GET /images/picture.jpg ?toto=tata 80 toto 123.123.123.123 Mozilla/4.0+(compatible;MSIE+5.5;+Windows+2000+Server) 200 211 322 1234
grok:
supportRules: |
_auth %{notSpace:http.auth:nullIf("-")}
_bytes_written %{integer:network.bytes_written}
_bytes_read %{integer:network.bytes_read}
_client_ip %{ipOrHost:network.client.ip}
_client_port %{integer:network.client.port}
_cookie %{notSpace:http.cookie:querystring}
_date_iis %{date("yyyy-MM-dd HH:mm:ss"):date_access}
_http_url %{notSpace:http.url}
_http_version HTTP\/%{regex("\\d+\\.\\d+"):http.version}
_http_query (?>\?|)%{notSpace:http.url_details.queryString:querystring}
_ident %{notSpace:http.ident:nullIf("-")}
_duration %{integer:duration:scale(1000000)}
_referer %{notSpace:http.referer}
_server_name %{ipOrHost:http.server_name}
_server_port %{integer:server.port}
_server_ip %{ip:server.ip}
_status_code %{integer:http.status_code}
_sub_status_code %{integer:http.sub_status_code}
_user_agent %{regex("[^\\\"]*"):http.useragent}
_username %{notSpace:user.name}
_method %{word:http.method}
_win32_status %{integer:iis.win32_status}
_x_forwarded_for %{notSpace:x_forwarded_for}
matchRules: |
iis.default %{_date_iis} %{_server_name} %{_method} %{_http_url} %{_http_query} %{_client_port} %{_auth} %{_client_ip} %{_user_agent} %{_status_code} %{_sub_status_code} %{_win32_status} %{_duration} ?{_x_forwarded_for}
iis.fully_expanded %{_date_iis} %{_ident} %{word:hostname} %{_server_ip} %{_method} %{_http_url} %{_http_query} %{_server_port} %{_username} %{_client_ip} %{_http_version} %{_user_agent} %{_cookie} %{_referer} %{_server_name} %{_status_code} %{_sub_status_code} %{_win32_status} %{_bytes_written} %{_bytes_read} %{_duration} ?{_x_forwarded_for}
- type: user-agent-parser
name: ''
enabled: true
sources:
- http.useragent
target: http.useragent_details
encoded: true
- type: url-parser
name: ''
enabled: true
sources:
- http.url
target: http.url_details
- type: date-remapper
name: Define `date_access` as the official date of the log
enabled: true
sources:
- date_access
- type: category-processor
name: Categorise status code
enabled: true
categories:
- filter:
query: '@http.status_code:[200 TO 299]'
name: OK
- filter:
query: '@http.status_code:[300 TO 399]'
name: notice
- filter:
query: '@http.status_code:[400 TO 499]'
name: warning
- filter:
query: '@http.status_code:[500 TO 599]'
name: error
target: http.status_category
- type: status-remapper
name: Define `http.status_category` as the official status of the log
enabled: true
sources:
- http.status_category
- type: pipeline
name: OCSF sub pipeline for HTTP Activity [4002]
enabled: true
ocsf:
isOcsf: true
filter:
query: "@http.method:*"
processors:
- type: string-builder-processor
name: Add ocsf.metadata.product.name
enabled: true
template: "iis"
target: ocsf.metadata.product.name
replaceMissing: false
- type: string-builder-processor
name: Add ocsf.metadata.product.vendor_name
enabled: true
template: "Microsoft"
target: ocsf.metadata.product.vendor_name
replaceMissing: false
- type: grok-parser
name: Parsing `ocsf.http_request.url.query_string` from `http.url`
enabled: true
source: http.url
samples:
- /datadoghq/company?test=var1%20Pl
grok:
supportRules: ""
matchRules: |
extract_query_string %{regex("[^?]+")}\?%{regex(".*"):ocsf.http_request.url.query_string}
- type: schema-processor
name: Apply OCSF schema for 4002
enabled: true
mappers:
- type: schema-category-mapper
name: ocsf.activity_id
categories:
- filter:
query: "@http.method:CONNECT"
name: Connect
id: 1
- filter:
query: "@http.method:DELETE"
name: Delete
id: 2
- filter:
query: "@http.method:GET"
name: Get
id: 3
- filter:
query: "@http.method:HEAD"
name: Head
id: 4
- filter:
query: "@http.method:OPTIONS"
name: Options
id: 5
- filter:
query: "@http.method:POST"
name: Post
id: 6
- filter:
query: "@http.method:PUT"
name: Put
id: 7
- filter:
query: "@http.method:TRACE"
name: Trace
id: 8
- filter:
query: "@http.method:PATCH"
name: Patch
id: 9
- filter:
query: "@http.method:*"
name: Other
id: 99
targets:
name: ocsf.activity_name
id: ocsf.activity_id
- type: schema-category-mapper
name: ocsf.severity_id
categories:
- filter:
query: "@http.method:*"
name: Informational
id: 1
targets:
name: ocsf.severity
id: ocsf.severity_id
- type: schema-category-mapper
name: ocsf.status_id
categories:
- filter:
query: "@http.status_code:[200 TO 399]"
name: Success
id: 1
- filter:
query: "@http.status_code:[400 TO 599]"
name: Failure
id: 2
- filter:
query: "*"
name: Unknown
id: 99
targets:
name: ocsf.status
id: ocsf.status_id
- type: schema-remapper
name: Map `http.server_name` to `ocsf.dst_endpoint.ip`
sources:
- http.server_name
target: ocsf.dst_endpoint.ip
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.method` to `ocsf.http_request.http_method`
sources:
- http.method
target: ocsf.http_request.http_method
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.referer` to `ocsf.http_request.referrer`
sources:
- http.referer
target: ocsf.http_request.referrer
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.url_details.path` to `ocsf.http_request.url.path`
sources:
- http.url_details.path
target: ocsf.http_request.url.path
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.url_details.port` to `ocsf.http_request.url.port`
sources:
- http.url_details.port
target: ocsf.http_request.url.port
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `ocsf.http_request.url.query_string` to `ocsf.http_request.url.query_string`
sources:
- ocsf.http_request.url.query_string
target: ocsf.http_request.url.query_string
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.useragent` to `ocsf.http_request.user_agent`
sources:
- http.useragent
target: ocsf.http_request.user_agent
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.status_code` to `ocsf.http_response.code`
sources:
- http.status_code
target: ocsf.http_response.code
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.status_category` to `ocsf.http_response.status`
sources:
- http.status_category
target: ocsf.http_response.status
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.method` to `ocsf.metadata.event_code`
sources:
- http.method
target: ocsf.metadata.event_code
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `network.client.ip` to `ocsf.src_endpoint.ip`
sources:
- network.client.ip
target: ocsf.src_endpoint.ip
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `http.useragent_details.os.family` to `ocsf.src_endpoint.os.name`
sources:
- http.useragent_details.os.family
target: ocsf.src_endpoint.os.name
preserveSource: true
overrideOnConflict: true
- type: schema-category-mapper
name: ocsf.src_endpoint.os.type_id
categories:
- filter:
query: "@http.useragent_details.os.family:Windows"
name: Windows
id: 100
- filter:
query: '@http.useragent_details.os.family:(Linux OR "Red Hat" OR Ubuntu OR Debian OR Fedora OR CentOS OR *BSD*)'
name: Linux
id: 200
- filter:
query: "@http.useragent_details.os.family:Android"
name: Android
id: 201
- filter:
query: '@http.useragent_details.os.family:("Mac OS X" OR macOS)'
name: macOS
id: 300
- filter:
query: "@http.useragent_details.os.family:iOS"
name: Ios
id: 301
- filter:
query: "@http.useragent_details.os.family:*"
name: Other
id: 99
targets:
name: ocsf.src_endpoint.os.type
id: ocsf.src_endpoint.os.type_id
- type: schema-remapper
name: Map `http.status_code` to `ocsf.status_code`
sources:
- http.status_code
target: ocsf.status_code
preserveSource: true
targetFormat: string
overrideOnConflict: true
- type: schema-remapper
name: Map `duration` to `ocsf.duration`
sources:
- duration
target: ocsf.duration
preserveSource: true
targetFormat: double
overrideOnConflict: true
- type: schema-remapper
name: Map `ocsf.metadata.product.name` to `ocsf.metadata.product.name`
sources:
- ocsf.metadata.product.name
target: ocsf.metadata.product.name
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `ocsf.metadata.product.vendor_name` to `ocsf.metadata.product.vendor_name`
sources:
- ocsf.metadata.product.vendor_name
target: ocsf.metadata.product.vendor_name
preserveSource: true
overrideOnConflict: true
- type: schema-remapper
name: Map `date_access` to `ocsf.time`
sources:
- date_access
target: ocsf.time
preserveSource: true
overrideOnConflict: true
schema:
schemaType: ocsf
version: 1.5.0
className: HTTP Activity
classUid: 4002
extensions: []
profiles: []