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
@@ -52,7 +52,7 @@ The process described in this section includes the following steps:
52
52
53
53
The following image shows the **Watchlists-InformSubowner-IncidentTrigger** playbook in the Logic App designer.
54
54
55
-

55
+

56
56
57
57
The playbook runs the following steps:
58
58
@@ -66,7 +66,7 @@ The playbook runs the following steps:
66
66
67
67
1.**Run query and list results - Get Watchlist**. The Azure Monitor Log Analytics connector gets the watchlist items, including the **Subscription**, **Resource Group**, and **Resource Name** for the Microsoft Sentinel workspace details where the watchlist is located. Use the `project` argument to specify which fields are relevant for your use.
68
68
69
-

69
+

70
70
71
71
1.**Filter array to get relevant subscription owners**. This step keeps the watchlist results only for the subscription you're looking for. The Logic Apps expression argument on the right is:
72
72
@@ -98,7 +98,7 @@ Use the following steps to create and upload the watchlist, deploy the playbook,
98
98
99
99
1. Upload the table to the Microsoft Sentinel **Watchlist** area. Make a note of the value you use as the **Watchlist Alias**, as you'll use it to query this watchlist from the playbook.
100
100
101
-
For more information, see [Use Microsoft Sentinel watchlists](watchlists.md).
101
+
For more information, see [Use Microsoft Sentinel watchlists](watchlists.md).
102
102
103
103
**To deploy the playbook**:
104
104
@@ -148,160 +148,61 @@ The process described in this article includes the following steps:
148
148
149
149
The following image shows the **Watchlists-CloseIncidentKnownIPs** playbook in the Logic App designer.
150
150
151
-

151
+

152
152
153
153
The playbook runs the following steps:
154
154
155
-
1.When a response to an Azure Sentinel alert is triggered
155
+
1.**When a response to a Microsoft Sentinel alert is triggered**, the playbook receives the alert as input.
156
156
157
-
Azure Sentinel alert was created. The playbook receives the alert as the input.
157
+
1.**Initialize variables** to store the values that will be used in the playbook, including:
158
158
159
-
159
+
-**Watchlist name**: Variable string, used for the Log Analytics query
160
+
-**Safe / not safe IPs**: Variable arrays, used to store the IP addresses found
161
+
162
+
1.**Entities - Get IPs** takes all entities found in the alert and parses only the IP addresses, getting them ready to be used as dynamic values for later actions.
163
+
164
+
1.**For each IP**, the playbook iterates on each IP address found in the alert, checking to see if the IP address is found in one of the watchlists, and taking the relevant action.
165
+
166
+
In this step, the playbook gets the items in the watchlist from Log Analytics. You'll need to enter the subscription, resource group, and resource name for the Microsoft Sentinel workspace where the watchlist is located.
167
+
168
+
:::image type="content" source="media/automate-playbook-watchlist/known-ip-run-query.png" alt-text="Screenshot of the run query and list results step.":::
169
+
170
+
If the playbook finds an IP address in the watchlist, the IP address is added to the *Safe* array. If it's not found in the allow list watchlist, the IP address is added to the *Not safe* array.
171
+
172
+
1.**A comment is added to the incident**, listing any safe IP addresses found in the watchlist.
173
+
174
+
1.**Conditions**. The playbook checks for whether there are any IP addresses in the *Not safe* list. If the *Not safe* list is empty, the playbook closes the incident, with a classification reason of *Benign Positive*.
175
+
176
+
### Set up your watchlist and deploy the playbook
177
+
178
+
Use the following steps to create and upload the watchlist and deploy the playbook.
179
+
180
+
**To create and upload the watchlist:**
181
+
182
+
1. Create an input comma-separated (CSV) file, where each row represents an IP address.
183
+
184
+
1. Upload the table to the Microsoft Sentinel **Watchlist** area. Make a note of the value you use as the **Watchlist Alias**, as you'll use it to query this watchlist from the playbook.
185
+
186
+
For more information, see [Use Microsoft Sentinel watchlists](watchlists.md).
187
+
188
+
**To deploy the playbook**:
189
+
190
+
1. In the Microsoft Sentinel **Automation** page, on the **Playbook templates (Preview)** tab, search for and locate the **Watchlists-CloseIncidentKnownIPs** playbook.
191
+
192
+
1. On the bottom right, select **Create playbook**, and then use the wizard to deploy the playbook in your workspace.
193
+
194
+
Make sure to enter a meaningful name for your playbook, and a **User name** to determine the names of the API connection resources.
195
+
196
+
1. After the deployment is complete, select your new playbook to open it in the Logic Apps Designer.
197
+
198
+
1. In your logic app, on the left under **Development Tools**, select **API connections**, and select the connection for each product in the playbook. In this case, the only connection to verify is to Microsoft Sentinel.
199
+
200
+
For any unconnected products, select **Authorize**, sign in, and then save the logic app.
160
201
161
-
Initialize variables
162
-
163
-
This actions stores values to be used later in the playbook:
164
-
165
-
Watchlist name is a variable of type string, will be used for the Log Analytics query
166
-
Safe/not safe IPs are variables of type array, will be used to store the found IPs
167
-
168
-
169
-
Entities - Get IPs
170
-
171
-
This action takes all the entities found in the alert and parses only the IPs with their special fields ready to be used as dynamic values in later actions.
172
-
173
-
174
-
175
-
For Each IP
176
-
177
-
Iterates on the IPs found in this alert and performs the following:
178
-
179
-
thumbnail image 2 of blog post titled
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
Playbooks & Watchlists Part 2: Automate incident response for Deny-list/Allow-list
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
Run query and list results - Get Watchlist
207
-
In this step we ask Log Analytics (Azure Monitor Logs connector) to get the items of the Watchlist. Subscription, Resource Group and Resource Name are the Azure Sentinel workspace details where the watchlist is located.
| where IpAddress == ''@{items('For_each')?['Address']}"
212
-
Condition
213
-
In this step I check the length of the response array from the query, using the Logic apps expression length(collection). If it is greater then 0, we have found the IP in the watchlist.
214
-
Therefor, we will add this IP to the Safe array; otherwise, to the not safe.
215
-
216
-
217
-
Add a comment to the incident
218
-
In this step we audit the information collected so far: a list of safe IPs found in the Watchlist, a side to a list of unknown IPs.
219
-
220
-
221
-
222
-
Condition
223
-
224
-
Finally, we want to check if there is any IP which found as not safe. This step checks if our "not safe" array is empty. If so, we will close the incident.
225
-
226
-
227
-
228
-
Change Incident Status
229
-
Closes the incident with Benign Positive classification reason.
230
-
231
-
Setup instructions
232
-
233
-
234
-
Create and Upload your watchlist
235
-
236
-
237
-
238
-
Create your input CSV table
239
-
In this use case I have created a simple table, where each row represents an ip address.
240
-
I created the table using Office 365 Excel, and then saved it as a CSV file (save as).
241
-
242
-
Upload your table
243
-
244
-
In Azure Sentinel, go to Watchlists.
245
-
246
-
Click on Add new
247
-
thumbnail image 3 of blog post titled
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
Playbooks & Watchlists Part 2: Automate incident response for Deny-list/Allow-list
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
Fill in the required details.
275
-
Note that the Alias will be used to query this watchlist in the playbook query step.
276
-
277
-
Add the CSV file
278
-
279
-
Review and create.
280
-
281
-
Playbook deployment instructions
282
-
283
-
284
-
Open the link to the playbook. Scroll down on the page and Click on “Deploy to Azure” or "Deploy to Azure Gov" button depending on your need.
285
-
286
-
Fill the parameters:
287
-
288
-
Basics
289
-
Fill the subscription, resource group and location Sentinel workspace is under.
290
-
Settings
291
-
Playbook name - this is how you'll find the playbook in your subscription
292
-
User name (will affect the names of the API connections resources)
293
-
Check the terms and conditions and click purchase.
294
-
The ARM template, contains the Logic App workflow (playbook) and API connections is now deploying to Azure. When finished, you will be taken to the Azure ARM Template summary page.
295
-
Click on the Logic Apps name. you will be taken to the Logic Apps resource of this playbook.
296
-
Confirm API connections
297
-
On the left menu, click on API connections.
298
-
For each product being used in this playbook, click on the connection name - in our case, it is only the Azure Sentinel connection.
299
-
Click on Authorize to log in with your user, and don't forget to save.
-[Microsoft Teams Logic Apps connector](/connectors/teams/)
304
206
-[Office 365 Outlook Logic Apps connector](/connectors/office365)
305
207
-[Create incidents from alerts in Microsoft Sentinel](create-incidents-from-alerts.md)
306
-
-[Watchlists-InformSubowner-IncidentTrigger playbook](https://github.com/Azure/Azure-Sentinel/tree/master/Playbooks/Watchlist-InformSubowner-IncidentTrigger) in the Microsoft Sentinel Playbooks repository
0 commit comments