-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
ASC_SuppressionRulesForAlerts_DINE.json
317 lines (317 loc) · 12.9 KB
/
ASC_SuppressionRulesForAlerts_DINE.json
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
{
"properties": {
"displayName": "Deploy - Configure suppression rules for Azure Security Center alerts",
"policyType": "BuiltIn",
"mode": "All",
"description": "Suppress Azure Security Center alerts to reduce alerts fatigue by deploying suppression rules on your management group or subscription.",
"metadata": {
"category": "Security Center",
"version": "1.0.0"
},
"version": "1.0.0",
"parameters": {
"alertType": {
"type": "String",
"metadata": {
"displayName": "Alert Type",
"description": "Enter the alert type field of the alert you would like to suppress. Alert type could be queried via alerts api or PowerShell, learn more at https://aka.ms/asc-alertsPwoershell"
}
},
"suppressionRuleName": {
"type": "String",
"metadata": {
"displayName": "Rule name",
"description": "Rule names must begin with a letter or a number, be between 2 and 50 characters, and contain no symbols other than dashes ( - ) or underscores ( _ )"
}
},
"state": {
"type": "String",
"metadata": {
"displayName": "State"
},
"allowedValues": [
"Enabled",
"Disabled"
],
"defaultValue": "Enabled"
},
"reason": {
"type": "String",
"metadata": {
"displayName": "Reason"
},
"allowedValues": [
"The severity of the alert should be lower",
"The alert detecting too many normal activities",
"The alert is too noisy - hitting on the same resources too many times",
"The resource isn't relevant for me to monitor",
"The alert detecting normal activity on specific entity",
"The alert isn't actionable - not clear how to investigate the threat",
"Other"
]
},
"comment": {
"type": "String",
"metadata": {
"displayName": "Comment"
},
"defaultValue": ""
},
"expirationDate": {
"type": "DateTime",
"metadata": {
"displayName": "Expiration date"
}
},
"entityOneType": {
"type": "String",
"metadata": {
"displayName": "First entity type",
"description": "To refine the suppression rules to suppress alerts only for specific entities, enter the type of the entity you would like to suppress. Only alerts containing all of the entities defined in the rule will be suppressed (alerts without entities will be suppressed entirely)."
},
"allowedValues": [
"User account - name",
"User account - AAD user ID",
"User account - UPN suffix",
"Azure resource ID",
"File - name",
"File - directory",
"File hash",
"Host - name",
"Host - Azure ID",
"Host - DNS Domain",
"Host - OMS agent ID",
"IP address",
"Malware - name",
"Malware - category",
"Process - command line",
""
],
"defaultValue": ""
},
"entityOneOp": {
"type": "String",
"metadata": {
"displayName": "First entity operation"
},
"allowedValues": [
"Equals",
"Contains",
""
],
"defaultValue": ""
},
"entityOneValue": {
"type": "String",
"metadata": {
"displayName": "First entity value",
"description": "The value of the entity. Only alerts containing all of the entities defined in the rule will be suppressed (alerts without entities will be suppressed entirely)."
},
"defaultValue": ""
},
"entitySecondType": {
"type": "String",
"metadata": {
"displayName": "Second entity type",
"description": "To refine the suppression rules to suppress alerts only for specific entities, enter the type of the entity you would like to suppress. Only alerts containing all of the entities defined in the rule will be suppressed (alerts without entities will be suppressed entirely)."
},
"allowedValues": [
"User account - name",
"User account - AAD user ID",
"User account - UPN suffix",
"Azure resource ID",
"File - name",
"File - directory",
"File hash",
"Host - name",
"Host - Azure ID",
"Host - DNS Domain",
"Host - OMS agent ID",
"IP address",
"Malware - name",
"Malware - category",
"Process - command line",
""
],
"defaultValue": ""
},
"entitySecondOp": {
"type": "String",
"metadata": {
"displayName": "Second entity operation"
},
"allowedValues": [
"Equals",
"Contains",
""
],
"defaultValue": ""
},
"entitySecondValue": {
"type": "String",
"metadata": {
"displayName": "Second entity value",
"description": "The value of the entity. Only alerts containing all of the entities defined in the rule will be suppressed (alerts without entities will be suppressed entirely)."
},
"defaultValue": ""
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "deployIfNotExists",
"details": {
"type": "Microsoft.Security/alertsSuppressionRules",
"name": "[parameters('suppressionRuleName')]",
"existenceScope": "subscription",
"deploymentScope": "subscription",
"roleDefinitionIds": [
"/providers/microsoft.authorization/roleDefinitions/fb1c8493-542b-48eb-b624-b4c8fea62acd"
],
"deployment": {
"location": "centralus",
"properties": {
"mode": "incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"alertType": {
"type": "String"
},
"suppressionRuleName": {
"type": "String"
},
"state": {
"type": "String"
},
"reason": {
"type": "String"
},
"comment": {
"type": "String"
},
"expirationDate": {
"type": "String"
},
"entityOneType": {
"type": "String"
},
"entityOneOp": {
"type": "String"
},
"entityOneValue": {
"type": "String"
},
"entitySecondType": {
"type": "String"
},
"entitySecondOp": {
"type": "String"
},
"entitySecondValue": {
"type": "String"
}
},
"variables": {
"reasonToEnum": {
"The severity of the alert should be lower": "AlertSeverityTooHigh",
"The alert detecting too many normal activities": "FalsePositive",
"The alert is too noisy - hitting on the same resources too many times": "Noise",
"The resource isn't relevant for me to monitor": "NotRelevant",
"The alert detecting normal activity on specific entity": "SpecificEntityFalsePositive",
"The alert isn't actionable - not clear how to investigate the threat": "Unclear",
"Other": "Other"
},
"entityNameToType": {
"User account - name": "entities.account.name",
"User account - AAD user ID": "entities.account.aaduserid",
"User account - UPN suffix": "entities.account.upnsuffix",
"Azure resource ID": "entities.azureresource.resourceid",
"File - name": "entities.file.name",
"File - directory": "entities.file.directory",
"File hash": "entities.filehash.value",
"Host - name": "entities.host.hostname",
"Host - Azure ID": "entities.host.azureid",
"Host - DNS Domain": "entities.host.dnsdomain",
"Host - OMS agent ID": "entities.host.omsagentid",
"IP address": "entities.ip.address",
"Malware - name": "entities.malware.name",
"Malware - category": "entities.malware.category",
"Process - command line: ": "entities.process.commandline"
},
"entityOperationNameToOperation": {
"Equals": "in",
"Contains": "contains"
}
},
"resources": [
{
"type": "Microsoft.Security/alertsSuppressionRules",
"apiVersion": "2019-01-01-preview",
"name": "[parameters('suppressionRuleName')]",
"location": "centralus",
"properties": {
"alertType": "[parameters('alertType')]",
"state": "[parameters('state')]",
"reason": "[variables('reasonToEnum')[parameters('reason')]]",
"comment": "[parameters('comment')]",
"expirationDateUtc": "[parameters('expirationDate')]",
"suppressionAlertsScope": "[if(and(or(empty(parameters('entityOneType')), empty(parameters('entityOneOp')), empty(parameters('entityOneValue'))), or(empty(parameters('entitySecondType')), empty(parameters('entitySecondOp')), empty(parameters('entitySecondValue')))), null(), json(concat('{ \"allOf\": [', if(or(empty(parameters('entityOneType')), empty(parameters('entityOneOp')), empty(parameters('entityOneValue'))), '', concat(' { \"field\": \"', variables('entityNameToType')[parameters('entityOneType')], '\", \"', variables('entityOperationNameToOperation')[parameters('entityOneOp')], '\":', if(equals(parameters('entityOneOp'), 'Equals'), '[', ''), ' \"', parameters('entityOneValue'), '\"', if(equals(parameters('entityOneOp'), 'Equals'), ']', ''), ' }', if(or(empty(parameters('entitySecondType')), empty(parameters('entitySecondOp')), empty(parameters('entitySecondValue'))), '', ', '))), if(or(empty(parameters('entitySecondType')), empty(parameters('entitySecondOp')), empty(parameters('entitySecondValue'))), '', concat(' { \"field\": \"', variables('entityNameToType')[parameters('entitySecondType')], '\", \"', variables('entityOperationNameToOperation')[parameters('entitySecondOp')], '\":', if(equals(parameters('entitySecondOp'), 'Equals'), '[', ''), ' \"', parameters('entitySecondValue'), '\"', if(equals(parameters('entitySecondOp'), 'Equals'), ']', ''), ' } ')), '] }')))]"
}
}
]
},
"parameters": {
"alertType": {
"value": "[parameters('alertType')]"
},
"suppressionRuleName": {
"value": "[parameters('suppressionRuleName')]"
},
"state": {
"value": "[parameters('state')]"
},
"reason": {
"value": "[parameters('reason')]"
},
"comment": {
"value": "[parameters('comment')]"
},
"expirationDate": {
"value": "[parameters('expirationDate')]"
},
"entityOneType": {
"value": "[parameters('entityOneType')]"
},
"entityOneOp": {
"value": "[parameters('entityOneOp')]"
},
"entityOneValue": {
"value": "[parameters('entityOneValue')]"
},
"entitySecondType": {
"value": "[parameters('entitySecondType')]"
},
"entitySecondOp": {
"value": "[parameters('entitySecondOp')]"
},
"entitySecondValue": {
"value": "[parameters('entitySecondValue')]"
}
}
}
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/80e94a21-c6cd-4c95-a2c7-beb5704e61c0",
"name": "80e94a21-c6cd-4c95-a2c7-beb5704e61c0"
}