forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-Carbon_Black_Live_Response_Test.yml
711 lines (710 loc) · 14.8 KB
/
playbook-Carbon_Black_Live_Response_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
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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
id: CarbonBlackLiveResponseTest
version: -1
name: Carbon Black Live Response Test
description: Tests carbon black enterprise response selected use cases and commands
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: 8df055a8-fd75-410f-8828-61f7950a64f0
type: start
task:
id: 8df055a8-fd75-410f-8828-61f7950a64f0
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "39"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 50
}
}
note: false
timertriggers: []
"30":
id: "30"
taskid: ca3603da-0da2-4dec-8dbb-e263f1084c2b
type: regular
task:
id: ca3603da-0da2-4dec-8dbb-e263f1084c2b
version: -1
name: Close session
script: carbonblackliveresponse|||cb-session-close
type: regular
iscommand: true
brand: carbonblackliveresponse
scriptarguments:
session:
complex:
root: CbLiveResponse
filters:
- - operator: isEqualString
left:
value:
simple: CbLiveResponse.Sessions.CbSensorID
iscontext: true
right:
value:
simple: "17"
accessor: Sessions.CbSessionID
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 1360
}
}
note: false
timertriggers: []
"39":
id: "39"
taskid: 16d8de88-9129-4daf-8dcf-715cd0bbc6c2
type: regular
task:
id: 16d8de88-9129-4daf-8dcf-715cd0bbc6c2
version: -1
name: DeleteContext
scriptName: DeleteContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "76"
scriptarguments:
all:
simple: "yes"
key: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 195
}
}
note: false
timertriggers: []
"41":
id: "41"
taskid: c2d7d938-88d4-43d1-854c-b282fee1c463
type: regular
task:
id: c2d7d938-88d4-43d1-854c-b282fee1c463
version: -1
name: 'Create a session for sensor #17'
script: '|||cb-session-create-and-wait'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "70"
scriptarguments:
command-timeout:
simple: "200"
keepalive-timeout:
simple: "300"
sensor:
simple: "17"
wait-timeout:
simple: "300"
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 1000
}
}
note: false
timertriggers: []
"47":
id: "47"
taskid: 6d880cb1-571a-4424-86ee-51a44d6928ae
type: regular
task:
id: 6d880cb1-571a-4424-86ee-51a44d6928ae
version: -1
name: 'List open sessions for sensor #17'
script: '|||cb-list-sessions'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "56"
scriptarguments:
sensor:
simple: "17"
status:
simple: active
separatecontext: false
view: |-
{
"position": {
"x": 807.5,
"y": 660
}
}
note: false
timertriggers: []
"56":
id: "56"
taskid: 17d718ef-f980-4657-8bf7-f43a14b608cb
type: condition
task:
id: 17d718ef-f980-4657-8bf7-f43a14b608cb
version: -1
name: Check if there's an active session
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "41"
"yes":
- "71"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isNotEmpty
left:
value:
simple: CbLiveResponse.Sessions
iscontext: true
- - operator: isNotEqualString
left:
value:
simple: CbLiveResponse.Sessions
iscontext: true
right:
value:
simple: "null"
- - operator: isNotEqualString
left:
value:
simple: CbResponse.Sessions.CbSessionID
iscontext: true
right:
value:
simple: None
- - operator: isEqualString
left:
value:
simple: CbLiveResponse.Sessions.CbSensorID
iscontext: true
right:
value:
simple: "17"
view: |-
{
"position": {
"x": 797.5,
"y": 835
}
}
note: false
timertriggers: []
"57":
id: "57"
taskid: a61b2c94-8f91-4bdd-8304-96e16bd87fb9
type: regular
task:
id: a61b2c94-8f91-4bdd-8304-96e16bd87fb9
version: -1
name: Create test file
scriptName: TestCreateWordFile
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "58"
scriptarguments:
name:
simple: test.docx
text:
simple: Test
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 1535
}
}
note: false
timertriggers: []
"58":
id: "58"
taskid: b1f86001-250d-41ed-8afc-d00b38d4eea9
type: regular
task:
id: b1f86001-250d-41ed-8afc-d00b38d4eea9
version: -1
name: 'Upload test file to sensor #15'
script: '|||cb-push-file-to-endpoint'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "60"
scriptarguments:
entry-id:
simple: ${File.EntryID}
path:
simple: c:\Users\All Users\Desktop\test.docx
sensor:
simple: "15"
session: {}
wait-timeout:
simple: "300"
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 1710
}
}
note: false
timertriggers: []
"60":
id: "60"
taskid: eeee6767-965b-4592-829b-e98a916bc079
type: regular
task:
id: eeee6767-965b-4592-829b-e98a916bc079
version: -1
name: Download uploaded file from the sensor
script: '|||cb-get-file-from-endpoint'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "61"
scriptarguments:
path:
simple: c:\Users\All Users\Desktop\test.docx
sensor:
simple: "15"
session: {}
wait-timeout:
simple: "300"
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 1885
}
}
note: false
timertriggers: []
"61":
id: "61"
taskid: 10bcf518-ef60-4e5d-8146-2fd113e7ba5e
type: regular
task:
id: 10bcf518-ef60-4e5d-8146-2fd113e7ba5e
version: -1
name: Delete uploaded file from the endpoint
script: '|||cb-file-delete-from-endpoint'
type: regular
iscommand: true
brand: ""
scriptarguments:
cancel-on-timeout: {}
path:
simple: c:\Users\All Users\Desktop\test.docx
sensor:
simple: "15"
session: {}
wait-timeout:
simple: "60"
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 2060
}
}
note: false
timertriggers: []
"64":
id: "64"
taskid: 37e3d2da-4afc-4c1b-85aa-ab6965961090
type: title
task:
id: 37e3d2da-4afc-4c1b-85aa-ab6965961090
version: -1
name: Test Uploading Files
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "67"
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 675
}
}
note: false
timertriggers: []
"65":
id: "65"
taskid: 89f66401-328e-4e25-8b3b-483e7d68dfe9
type: title
task:
id: 89f66401-328e-4e25-8b3b-483e7d68dfe9
version: -1
name: 'Open a new Session and Execute Command '
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "47"
separatecontext: false
view: |-
{
"position": {
"x": 807.5,
"y": 515
}
}
note: false
timertriggers: []
"66":
id: "66"
taskid: 1a7ecd94-091c-4c31-8d2d-b5081a4e0615
type: title
task:
id: 1a7ecd94-091c-4c31-8d2d-b5081a4e0615
version: -1
name: Execute Commands Without Session Managment
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "64"
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 515
}
}
note: false
timertriggers: []
"67":
id: "67"
taskid: 0d4f807b-f25e-4c67-8763-dfa53d7a6dab
type: regular
task:
id: 0d4f807b-f25e-4c67-8763-dfa53d7a6dab
version: -1
name: 'List active sessions for sensor #15 '
script: '|||cb-list-sessions'
type: regular
iscommand: true
brand: ""
nexttasks:
'#none#':
- "74"
scriptarguments:
sensor:
simple: "15"
status:
simple: active
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 835
}
}
note: false
timertriggers: []
"70":
id: "70"
taskid: 6cd22d17-c364-4c37-8091-e799618ef392
type: regular
task:
id: 6cd22d17-c364-4c37-8091-e799618ef392
version: -1
name: 'List ''c:\Users'' Directory '
script: carbonblackliveresponse|||cb-command-create-and-wait
type: regular
iscommand: true
brand: carbonblackliveresponse
nexttasks:
'#none#':
- "30"
scriptarguments:
compress: {}
get-count: {}
name:
simple: directory-list
object:
simple: c:\Users\
offset: {}
output-file: {}
overwrite: {}
session:
simple: ${CbResponse.Sessions.CbSessionID}
timeout: {}
value-data: {}
value-type: {}
wait-timeout:
simple: "100"
working-dir: {}
separatecontext: false
view: |-
{
"position": {
"x": 592.5,
"y": 1185
}
}
note: false
timertriggers: []
"71":
id: "71"
taskid: 79b374d7-ee1d-4c71-8212-ad1831a3aec2
type: regular
task:
id: 79b374d7-ee1d-4c71-8212-ad1831a3aec2
version: -1
name: Keep Session Alive
script: carbonblackliveresponse|||cb-keepalive
type: regular
iscommand: true
brand: carbonblackliveresponse
nexttasks:
'#none#':
- "73"
scriptarguments:
session:
complex:
root: CbLiveResponse
filters:
- - operator: isEqualString
left:
value:
simple: CbLiveResponse.Sessions.CbSensorID
iscontext: true
right:
value:
simple: "17"
accessor: Sessions.CbSessionID
separatecontext: false
view: |-
{
"position": {
"x": 1022.5,
"y": 1010
}
}
note: false
timertriggers: []
"72":
id: "72"
taskid: b69503c9-3f21-4505-800d-2609feaf3464
type: regular
task:
id: b69503c9-3f21-4505-800d-2609feaf3464
version: -1
name: Wait
scriptName: Sleep
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "75"
scriptarguments:
seconds:
simple: "120"
separatecontext: false
view: |-
{
"position": {
"x": 162.5,
"y": 1185
}
}
note: false
timertriggers: []
"73":
id: "73"
taskid: 9481ade1-ed60-48ed-8231-5e15fe24eabf
type: regular
task:
id: 9481ade1-ed60-48ed-8231-5e15fe24eabf
version: -1
name: 'List ''c:\Users'' Directory '
script: carbonblackliveresponse|||cb-command-create-and-wait
type: regular
iscommand: true
brand: carbonblackliveresponse
scriptarguments:
compress: {}
get-count: {}
name:
simple: directory-list
object:
simple: c:\Users\
offset: {}
output-file: {}
overwrite: {}
session:
simple: ${CbLiveResponse.Sessions.CbSessionID}
timeout: {}
value-data: {}
value-type: {}
wait-timeout:
simple: "100"
working-dir: {}
separatecontext: false
view: |-
{
"position": {
"x": 1022.5,
"y": 1185
}
}
note: false
timertriggers: []
"74":
id: "74"
taskid: 592d3ddc-409a-420d-89be-80346a70e4a7
type: condition
task:
id: 592d3ddc-409a-420d-89be-80346a70e4a7
version: -1
name: Check if there's an active session
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "57"
"yes":
- "72"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isNotEmpty
left:
value:
simple: CbLiveResponse.Sessions
iscontext: true
- - operator: isNotEqualString
left:
value:
simple: CbLiveResponse.Sessions
iscontext: true
right:
value:
simple: "null"
- - operator: isEqualString
left:
value:
simple: CbLiveResponse.Sessions.CbSensorID
iscontext: true
right:
value:
simple: "15"
view: |-
{
"position": {
"x": 50,
"y": 1010
}
}
note: false
timertriggers: []
"75":
id: "75"
taskid: 58794193-5f40-40ee-8927-c87bffe266c9
type: title
task:
id: 58794193-5f40-40ee-8927-c87bffe266c9
version: -1
name: Try Executing Commands
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "57"
separatecontext: false
view: |-
{
"position": {
"x": 162.5,
"y": 1375
}
}
note: false
timertriggers: []
"76":
id: "76"
taskid: 97cd8a88-05a7-4200-8e08-0b92e9e26d7c
type: title
task:
id: 97cd8a88-05a7-4200-8e08-0b92e9e26d7c
version: -1
name: Test Using CB Response Instance
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "66"
- "65"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 370
}
}
note: false
timertriggers: []
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 2105,
"width": 1352.5,
"x": 50,
"y": 50
}
}
}
inputs: []
outputs: []