forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-IP_Enrichment_-_Generic_v2_-_Test.yml
378 lines (377 loc) · 8.42 KB
/
playbook-IP_Enrichment_-_Generic_v2_-_Test.yml
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
id: IP Enrichment - Generic v2 - Test
version: -1
fromversion: 4.1.0
name: IP Enrichment - Generic v2 - Test
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: e80130b8-9f8e-4704-87d8-2c6919d7b7c0
type: start
task:
id: e80130b8-9f8e-4704-87d8-2c6919d7b7c0
version: -1
name: ""
description: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "1"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 10
}
}
note: false
timertriggers: []
ignoreworker: false
"1":
id: "1"
taskid: 48651a1d-b6fd-4816-80d9-a8e5a45899e9
type: regular
task:
id: 48651a1d-b6fd-4816-80d9-a8e5a45899e9
version: -1
name: Delete Context
description: Deletes the context of the incident to start the test with no unnecessary
data.
scriptName: DeleteContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "3"
scriptarguments:
all:
simple: "yes"
index: {}
key: {}
keysToKeep: {}
subplaybook: {}
reputationcalc: 1
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 150
}
}
note: false
timertriggers: []
ignoreworker: false
"2":
id: "2"
taskid: 7ffe5bea-a7af-4437-806d-34ec70eabbf9
type: playbook
task:
id: 7ffe5bea-a7af-4437-806d-34ec70eabbf9
version: -1
name: IP Enrichment - Generic v2
description: |-
Enrich IP using one or more integrations.
IP enrichment includes:
* Resolve IP to Hostname (DNS)
* Threat information
* Separate internal and external addresses
* IP reputation
* For internal addresses, get host information
playbookName: IP Enrichment - Generic v2
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "5"
- "6"
- "7"
scriptarguments:
IP:
complex:
root: IP
accessor: Address
transformers:
- operator: uniq
InternalRange: {}
ResolveIP:
complex:
root: inputs.ResolveIP
separatecontext: true
loop:
iscommand: false
exitCondition: ""
wait: 1
view: |-
{
"position": {
"x": 480,
"y": 500
}
}
note: false
timertriggers: []
ignoreworker: false
"3":
id: "3"
taskid: 29addbb6-e385-4720-8d4a-0b8ba7cdebd7
type: regular
task:
id: 29addbb6-e385-4720-8d4a-0b8ba7cdebd7
version: -1
name: Set IPs in context
description: |-
Sets IPs in context for testing purposes.
3 IPs are set: 1 internal, and 2 external.
scriptName: SetIPsTest
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "2"
reputationcalc: 1
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 330
}
}
note: false
timertriggers: []
ignoreworker: false
"4":
id: "4"
taskid: 221f8221-ddd6-4b7a-831d-f426a5928495
type: title
task:
id: 221f8221-ddd6-4b7a-831d-f426a5928495
version: -1
name: Done
description: ""
type: title
iscommand: false
brand: ""
separatecontext: false
view: |-
{
"position": {
"x": 490,
"y": 1170
}
}
note: false
timertriggers: []
ignoreworker: false
"5":
id: "5"
taskid: 54fa1e23-dcbb-4b7f-8bb6-d928f2a9fd5b
type: condition
task:
id: 54fa1e23-dcbb-4b7f-8bb6-d928f2a9fd5b
version: -1
name: Was external IP resolved?
description: Checks whether one of the external IPs was resolved to the yahoo.com
domain.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "8"
"yes":
- "4"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isExists
left:
value:
complex:
root: Endpoint
filters:
- - operator: endWith
left:
value:
simple: Endpoint.Hostname
iscontext: true
right:
value:
simple: yahoo.com
accessor: Hostname
iscontext: true
ignorecase: true
view: |-
{
"position": {
"x": 30,
"y": 670
}
}
note: false
timertriggers: []
ignoreworker: false
"6":
id: "6"
taskid: 0d739831-24ca-4043-8f30-7e46348550ad
type: condition
task:
id: 0d739831-24ca-4043-8f30-7e46348550ad
version: -1
name: Was internal IP resolved?
description: Checks whether the internal IP specified in this test, has been
resolved.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "8"
"yes":
- "4"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isExists
left:
value:
complex:
root: Endpoint
filters:
- - operator: notEndWith
left:
value:
simple: Endpoint.Hostname
iscontext: true
right:
value:
simple: yahoo.com
ignorecase: true
- - operator: notEndWith
left:
value:
simple: Endpoint.Hostname
iscontext: true
right:
value:
simple: akamaitechnologies.com
ignorecase: true
accessor: Hostname
iscontext: true
ignorecase: true
view: |-
{
"position": {
"x": 940,
"y": 670
}
}
note: false
timertriggers: []
ignoreworker: false
"7":
id: "7"
taskid: 19720a66-9eba-4cee-8af8-4befd464aa37
type: condition
task:
id: 19720a66-9eba-4cee-8af8-4befd464aa37
version: -1
name: Was IP enriched using Threat Crowd?
description: Checks whether Yahoo's IP was enriched using Threat Crowd.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "8"
"yes":
- "4"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: containsGeneral
left:
value:
complex:
root: IP
accessor: ThreatCrowd.Resolutions.domain
iscontext: true
right:
value:
simple: ca.yahoo.com
ignorecase: true
view: |-
{
"position": {
"x": 480,
"y": 670
}
}
note: false
timertriggers: []
ignoreworker: false
"8":
id: "8"
taskid: da14e18a-fb55-49ae-8f1d-8076c37dd8ed
type: regular
task:
id: da14e18a-fb55-49ae-8f1d-8076c37dd8ed
version: -1
name: Make the test fail
scriptName: PrintErrorEntry
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "4"
scriptarguments:
message:
simple: IP Enrichment has failed. Please check the conditions and see which
one was not met, or if another error has occurred during the enrichment
process.
separatecontext: false
view: |-
{
"position": {
"x": 1350,
"y": 970
}
}
note: false
timertriggers: []
ignoreworker: false
view: |-
{
"linkLabelsPosition": {
"5_8_#default#": 0.1,
"6_8_#default#": 0.26,
"7_8_#default#": 0.14
},
"paper": {
"dimensions": {
"height": 1225,
"width": 1700,
"x": 30,
"y": 10
}
}
}
inputs:
- key: ResolveIP
value:
simple: "True"
required: false
description: Determines whether the IP Enrichment - Generic playbook should convert
IP addresses to hostnames using a DNS query. You can set this to either True or
False.
outputs: []