/
section_2.sp
430 lines (372 loc) · 16.2 KB
/
section_2.sp
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
419
420
421
422
423
424
425
426
427
428
429
430
locals {
cis_v150_2_common_tags = merge(local.cis_v150_common_tags, {
cis_section_id = "2"
})
}
locals {
cis_v150_2_1_common_tags = merge(local.cis_v150_2_common_tags, {
cis_section_id = "2.1"
})
cis_v150_2_2_common_tags = merge(local.cis_v150_2_common_tags, {
cis_section_id = "2.2"
})
cis_v150_2_3_common_tags = merge(local.cis_v150_2_common_tags, {
cis_section_id = "2.3"
})
cis_v150_2_4_common_tags = merge(local.cis_v150_2_common_tags, {
cis_section_id = "2.4"
})
}
benchmark "cis_v150_2" {
title = "2 Microsoft Defender for Cloud"
documentation = file("./cis_v150/docs/cis_v150_2.md")
children = [
benchmark.cis_v150_2_1,
benchmark.cis_v150_2_2,
benchmark.cis_v150_2_3,
benchmark.cis_v150_2_4,
control.cis_v150_2_5,
control.cis_v150_2_6
]
tags = merge(local.cis_v150_2_common_tags, {
type = "Benchmark"
service = "Azure/SecurityCenter"
})
}
benchmark "cis_v150_2_1" {
title = "2.1 Defender Plans"
documentation = file("./cis_v150/docs/cis_v150_2_1.md")
children = [
control.cis_v150_2_1_1,
control.cis_v150_2_1_2,
control.cis_v150_2_1_3,
control.cis_v150_2_1_4,
control.cis_v150_2_1_5,
control.cis_v150_2_1_6,
control.cis_v150_2_1_7,
control.cis_v150_2_1_8,
control.cis_v150_2_1_9,
control.cis_v150_2_1_10,
control.cis_v150_2_1_11,
control.cis_v150_2_1_12,
control.cis_v150_2_1_13
]
tags = merge(local.cis_v150_2_common_tags, {
type = "Benchmark"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_1" {
title = "2.1.1 Ensure That Microsoft Defender for Servers Is Set to 'On'"
description = "Turning on Microsoft Defender for Servers enables threat detection for Servers, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_server
documentation = file("./cis_v150/docs/cis_v150_2_1_1.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.1"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_2" {
title = "2.1.2 Ensure That Microsoft Defender for App Services Is Set To 'On'"
description = "Turning on Microsoft Defender for App Service enables threat detection for App Service, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_appservice
documentation = file("./cis_v150/docs/cis_v150_2_1_2.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.2"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_3" {
title = "2.1.3 Ensure That Microsoft Defender for Databases Is Set To 'On'"
description = "Turning on Microsoft Defender for Databases enables threat detection for the instances running your database software. This provides threat intelligence, anomaly detection, and behavior analytics in the Azure Microsoft Defender for Cloud. Instead of being enabled on services like Platform as a Service (PaaS), this implementation will run within your instances as Infrastructure as a Service (IaaS) on the Operating Systems hosting your databases."
query = query.securitycenter_azure_defender_on_for_database
documentation = file("./cis_v150/docs/cis_v150_2_1_3.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.3"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_4" {
title = "2.1.4 Ensure That Microsoft Defender for Azure SQL Databases Is Set To 'On'"
description = "Turning on Microsoft Defender for Azure SQL Databases enables threat detection for Azure SQL database servers, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_sqldb
documentation = file("./cis_v150/docs/cis_v150_2_1_4.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.4"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_5" {
title = "2.1.5 Ensure That Microsoft Defender for SQL Servers on Machines Is Set To 'On'"
description = "Turning on Microsoft Defender for SQL servers on machines enables threat detection for SQL servers on machines, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_sqlservervm
documentation = file("./cis_v150/docs/cis_v150_2_1_5.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.5"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_6" {
title = "2.1.6 Ensure That Microsoft Defender for Open-Source Relational Databases Is Set To 'On'"
description = "Turning on Microsoft Defender for Open-source relational databases enables threat detection for Open-source relational databases, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_opensource_relational_db
documentation = file("./cis_v150/docs/cis_v150_2_1_6.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.6"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_7" {
title = "2.1.7 Ensure That Microsoft Defender for Storage Is Set To 'On' "
description = "Turning on Microsoft Defender for Storage enables threat detection for Storage, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_storage
documentation = file("./cis_v150/docs/cis_v150_2_1_7.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.7"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_8" {
title = "2.1.8 Ensure That Microsoft Defender for Containers Is Set To 'On'"
description = "Turning on Microsoft Defender for Containers enables threat detection for Container Registries including Kubernetes, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_containerregistry
documentation = file("./cis_v150/docs/cis_v150_2_1_8.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.8"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_9" {
title = "2.1.9 Ensure That Microsoft Defender for Cosmos DB Is Set To 'On' "
description = "Microsoft Defender for Cosmos DB scans all incoming network requests for changes to your virtual machine."
query = query.securitycenter_azure_defender_on_for_cosmosdb
documentation = file("./cis_v150/docs/cis_v150_2_1_9.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.9"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_10" {
title = "2.1.10 Ensure That Microsoft Defender for Key Vault Is Set To 'On'"
description = "Turning on Microsoft Defender for Key Vault enables threat detection for Key Vault, providing threat intelligence, anomaly detection, and behavior analytics in the Microsoft Defender for Cloud."
query = query.securitycenter_azure_defender_on_for_keyvault
documentation = file("./cis_v150/docs/cis_v150_2_1_10.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.10"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_11" {
title = "2.1.11 Ensure That Microsoft Defender for DNS Is Set To 'On'"
description = "Microsoft Defender for DNS scans all network traffic exiting from within a subscription."
query = query.securitycenter_azure_defender_on_for_dns
documentation = file("./cis_v150/docs/cis_v150_2_1_11.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.11"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_12" {
title = "2.1.12 Ensure That Microsoft Defender for IoT Is Set To 'On'"
description = "Microsoft Defender for IoT acts as a central security hub for IoT devices within your organization."
query = query.manual_control
documentation = file("./cis_v150/docs/cis_v150_2_1_12.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.12"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_1_13" {
title = "2.1.13 Ensure That Microsoft Defender for Resource Manager Is Set To 'On'"
description = "Microsoft Defender for Resource Manager scans incoming administrative requests to change your infrastructure from both CLI and the Azure portal."
query = query.securitycenter_azure_defender_on_for_resource_manager
documentation = file("./cis_v150/docs/cis_v150_2_1_13.md")
tags = merge(local.cis_v150_2_1_common_tags, {
cis_item_id = "2.1.13"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
benchmark "cis_v150_2_2" {
title = "2.2 Auto Provisioning"
documentation = file("./cis_v150/docs/cis_v150_2_2.md")
children = [
control.cis_v150_2_2_1,
control.cis_v150_2_2_2,
control.cis_v150_2_2_3
]
tags = merge(local.cis_v150_2_common_tags, {
type = "Benchmark"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_2_1" {
title = "2.2.1 Ensure that Auto provisioning of 'Log Analytics agent for Azure VMs' is Set to 'On'"
description = "Enable automatic provisioning of the monitoring agent to collect security data."
query = query.securitycenter_automatic_provisioning_monitoring_agent_on
documentation = file("./cis_v150/docs/cis_v150_2_2_1.md")
tags = merge(local.cis_v150_2_2_common_tags, {
cis_item_id = "2.2.1"
cis_type = "automated"
cis_level = "1"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_2_2" {
title = "2.2.2 Ensure that Auto provisioning of 'Vulnerability assessment for machines' is Set to 'On'"
description = "Enable automatic provisioning of vulnerability assessment for machines on both Azure and hybrid (Arc enabled) machines."
query = query.manual_control
documentation = file("./cis_v150/docs/cis_v150_2_2_2.md")
tags = merge(local.cis_v150_2_2_common_tags, {
cis_item_id = "2.2.2"
cis_type = "automated"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_2_3" {
title = "2.2.3 Ensure that Auto provisioning of 'Microsoft Defender for Containers components' is Set to 'On'"
description = "Enable automatic provisioning of the Microsoft Defender for Containers components."
query = query.manual_control
documentation = file("./cis_v150/docs/cis_v150_2_2_3.md")
tags = merge(local.cis_v150_2_2_common_tags, {
cis_item_id = "2.2.3"
cis_type = "automated"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
benchmark "cis_v150_2_3" {
title = "2.3 Email notifications"
documentation = file("./cis_v150/docs/cis_v150_2_3.md")
children = [
control.cis_v150_2_3_1,
control.cis_v150_2_3_2,
control.cis_v150_2_3_3
]
tags = merge(local.cis_v150_2_common_tags, {
type = "Benchmark"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_3_1" {
title = "2.3.1 Ensure That 'All users with the following roles' is set to 'Owner'"
description = "Enable security alert emails to subscription owners."
query = query.securitycenter_security_alerts_to_owner_enabled
documentation = file("./cis_v150/docs/cis_v150_2_3_1.md")
tags = merge(local.cis_v150_2_2_common_tags, {
cis_item_id = "2.3.1"
cis_type = "automated"
cis_level = "1"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_3_2" {
title = "2.3.2 Ensure 'Additional email addresses' is Configured with a Security Contact Email"
description = "Microsoft Defender for Cloud emails the subscription owners whenever a high-severity alert is triggered for their subscription. You should provide a security contact email address as an additional email address."
query = query.securitycenter_additional_email_configured
documentation = file("./cis_v150/docs/cis_v150_2_3_2.md")
tags = merge(local.cis_v150_2_2_common_tags, {
cis_item_id = "2.3.2"
cis_type = "automated"
cis_level = "1"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_3_3" {
title = "2.3.3 Ensure That 'Notify about alerts with the following severity' is Set to 'High'"
description = "Enables emailing security alerts to the subscription owner or other designated security contact."
query = query.securitycenter_notify_alerts_configured
documentation = file("./cis_v150/docs/cis_v150_2_3_3.md")
tags = merge(local.cis_v150_2_2_common_tags, {
cis_item_id = "2.3.3"
cis_type = "Automated"
cis_level = "1"
service = "Azure/SecurityCenter"
})
}
benchmark "cis_v150_2_4" {
title = "2.4 Integrations"
documentation = file("./cis_v150/docs/cis_v150_2_4.md")
children = [
control.cis_v150_2_4_1,
control.cis_v150_2_4_2
]
tags = merge(local.cis_v150_2_common_tags, {
type = "Benchmark"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_4_1" {
title = "2.4.1 Ensure that Microsoft Defender for Cloud Apps integration with Microsoft Defender for Cloud is Selected"
description = "This integration setting enables Microsoft Defender for Cloud Apps (formerly 'Microsoft Cloud App Security' or 'MCAS' - see additional info) to communicate with Microsoft Defender for Cloud."
query = query.securitycenter_mcas_integration
documentation = file("./cis_v150/docs/cis_v150_2_4_1.md")
tags = merge(local.cis_v150_2_4_common_tags, {
cis_item_id = "2.4.1"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_4_2" {
title = "2.4.2 Ensure that Microsoft Defender for Endpoint integration with Microsoft Defender for Cloud is selected"
description = "This integration setting enables Microsoft Defender for Endpoint (formerly 'Advanced Threat Protection' or 'ATP' or 'WDATP' - see additional info) to communicate with Microsoft Defender for Cloud."
query = query.securitycenter_wdatp_integration
documentation = file("./cis_v150/docs/cis_v150_2_4_2.md")
tags = merge(local.cis_v150_2_4_common_tags, {
cis_item_id = "2.4.2"
cis_type = "manual"
cis_level = "2"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_5" {
title = "2.5 Ensure that Microsoft Defender Recommendation for 'Apply system updates' status is 'Completed'"
description = "Ensure that the latest OS patches for all virtual machines are applied."
query = query.manual_control
documentation = file("./cis_v150/docs/cis_v150_2_5.md")
tags = merge(local.cis_v150_2_common_tags, {
cis_item_id = "2.5"
cis_type = "manual"
cis_level = "1"
service = "Azure/SecurityCenter"
})
}
control "cis_v150_2_6" {
title = "2.6 Ensure Any of the ASC Default Policy Settings are Not Set to 'Disabled'"
description = "None of the settings offered by ASC Default policy should be set to effect Disabled."
query = query.securitycenter_asc_default_setting_not_disabled
documentation = file("./cis_v150/docs/cis_v150_2_6.md")
tags = merge(local.cis_v150_2_common_tags, {
cis_item_id = "2.6"
cis_type = "manual"
cis_level = "1"
service = "Azure/SecurityCenter"
})
}