-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
playbook-Cloud_Response_-_Generic.yml
858 lines (842 loc) · 20.3 KB
/
playbook-Cloud_Response_-_Generic.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
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
id: Cloud Response - Generic
version: -1
name: Cloud Response - Generic
description: |-
This playbook provides response playbooks for:
- AWS
- Azure
- GCP
The response actions available are:
- Terminate/Shut down/Power off an instance
- Delete/Disable a user
- Delete/Revoke/Disable credentials
- Block indicators
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: f73af578-0487-4572-8c79-7645e59b2dd0
type: start
task:
id: f73af578-0487-4572-8c79-7645e59b2dd0
version: -1
name: ""
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "2"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 220,
"y": -300
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"2":
id: "2"
taskid: a13921ba-40b3-489c-88b5-329c60394f8b
type: condition
task:
id: a13921ba-40b3-489c-88b5-329c60394f8b
version: -1
name: Select cloud provider
description: Checks the cloud provider.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "25"
AWS:
- "15"
Azure:
- "16"
GCP:
- "21"
separatecontext: false
conditions:
- label: AWS
condition:
- - operator: isEqualString
left:
value:
complex:
root: inputs.cloudProvider
iscontext: true
right:
value:
simple: AWS
ignorecase: true
- label: Azure
condition:
- - operator: isEqualString
left:
value:
complex:
root: inputs.cloudProvider
iscontext: true
right:
value:
simple: Azure
ignorecase: true
- label: GCP
condition:
- - operator: isEqualString
left:
value:
complex:
root: inputs.cloudProvider
iscontext: true
right:
value:
simple: GCP
continueonerrortype: ""
view: |-
{
"position": {
"x": 220,
"y": -170
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"15":
id: "15"
taskid: 70d956d1-eef8-4a5e-8619-1954322fe6f5
type: title
task:
id: 70d956d1-eef8-4a5e-8619-1954322fe6f5
version: -1
name: AWS
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "17"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 220,
"y": 410
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"16":
id: "16"
taskid: 583984bc-19d6-43cd-8529-c1c01d32bf55
type: title
task:
id: 583984bc-19d6-43cd-8529-c1c01d32bf55
version: -1
name: Azure
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "18"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 680,
"y": 410
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"17":
id: "17"
taskid: bfd028c8-874a-4700-82e6-2e55a7038880
type: playbook
task:
id: bfd028c8-874a-4700-82e6-2e55a7038880
version: -1
name: Cloud Response - AWS
description: |-
This playbook provides response actions to Azure, the following are available for execution automatically/manually:
- Resource remediation:
- Terminate the instance
- Stop the instance
- Identity remediation:
- Delete the user
- Revoke the user's credentials
- Access key remediation:
- Disable the access key
- Delete the access key
- Block indicators
playbookName: Cloud Response - AWS
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "20"
scriptarguments:
accessKeyId:
complex:
root: inputs.accessKeyId
accessKeyRemediationType:
complex:
root: inputs.AWS-accessKeyRemediationType
autoAccessKeyRemediation:
complex:
root: inputs.autoAccessKeyRemediation
autoBlockIndicators:
complex:
root: inputs.autoBlockIndicators
autoResourceRemediation:
complex:
root: inputs.autoResourceRemediation
autoUserRemediation:
complex:
root: inputs.autoUserRemediation
region:
complex:
root: inputs.region
resourceName:
complex:
root: inputs.resourceName
resourceRemediationType:
complex:
root: inputs.AWS-resourceRemediationType
userRemediationType:
complex:
root: inputs.AWS-userRemediationType
username:
complex:
root: inputs.username
sourceIP:
complex:
root: inputs.sourceIP
separatecontext: false
continueonerrortype: ""
loop:
iscommand: false
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": 220,
"y": 540
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: true
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"18":
id: "18"
taskid: 2bde4ff2-2d22-4a58-8a80-923e6b253f52
type: playbook
task:
id: 2bde4ff2-2d22-4a58-8a80-923e6b253f52
version: -1
name: Cloud Response - Azure
description: "This playbook provides response actions to Azure. The following are available for execution automatically/manually:\n - Resource remediation \n - Delete the instance\n - Power off the instance\n - Identity remediation:\n - Disable the user\n - Change the user's password (Default password should be set in the playbook's inputs)\n - Block indicators"
playbookName: Cloud Response - Azure
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "20"
scriptarguments:
autoBlockIndicators:
complex:
root: inputs.autoBlockIndicators
autoResourceRemediation:
complex:
root: inputs.autoResourceRemediation
autoUserRemediation:
complex:
root: inputs.autoUserRemediation
resourceGroup:
complex:
root: inputs.resourceGroup
resourceName:
complex:
root: inputs.resourceName
resourceRemediationType:
complex:
root: inputs.Azure-resourceRemediationType
userRemediationType:
complex:
root: inputs.Azure-userRemediationType
username:
complex:
root: inputs.username
sourceIP:
complex:
root: inputs.sourceIP
separatecontext: false
continueonerrortype: ""
loop:
iscommand: false
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": 680,
"y": 540
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: true
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"20":
id: "20"
taskid: a6297810-76e2-479e-8ded-e644a7480cf8
type: title
task:
id: a6297810-76e2-479e-8ded-e644a7480cf8
version: -1
name: Done
type: title
iscommand: false
brand: ""
description: ''
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 220,
"y": 720
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"21":
id: "21"
taskid: 807c2785-80c1-4d45-8e95-b41a0a06a692
type: title
task:
id: 807c2785-80c1-4d45-8e95-b41a0a06a692
version: -1
name: GCP
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "22"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": -240,
"y": 410
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"22":
id: "22"
taskid: dfbdc384-d698-46a4-89eb-8dacc0300422
type: playbook
task:
id: dfbdc384-d698-46a4-89eb-8dacc0300422
version: -1
name: Cloud Response - GCP
description: |-
This playbook provides response actions to Azure, the following are available for execution automatically/manually:
- Resource remediation:
- Delete the instance
- Stop the instance
- Identity remediation:
- Disable the user
- Delete the user
- Access key remediation:
- Disable the access key
- Delete the access key
- Block indicators
playbookName: Cloud Response - GCP
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "20"
scriptarguments:
accessKeyName:
complex:
root: inputs.accessKeyName
accessKeyRemediationType:
complex:
root: inputs.GCP-accessKeyRemediationType
autoAccessKeyRemediation:
complex:
root: inputs.autoAccessKeyRemediation
autoBlockIndicators:
complex:
root: inputs.autoBlockIndicators
autoResourceRemediation:
complex:
root: inputs.autoResourceRemediation
autoUserRemediation:
complex:
root: inputs.GCP-accessKeyRemediationType
resourceName:
complex:
root: inputs.resourceName
resourceRemediationType:
complex:
root: inputs.GCP-resourceRemediationType
resourceZone:
complex:
root: inputs.resourceZone
userRemediationType:
complex:
root: inputs.GCP-userRemediationType
username:
complex:
root: inputs.username
GCPprojectID:
complex:
root: inputs.GCPprojectID
accountType:
complex:
root: inputs.accountType
sourceIP:
complex:
root: inputs.sourceIP
separatecontext: false
continueonerrortype: ""
loop:
iscommand: false
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": -240,
"y": 540
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: true
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"25":
id: "25"
taskid: d22ac09b-779f-424b-8a75-44095a40c450
type: collection
task:
id: d22ac09b-779f-424b-8a75-44095a40c450
version: -1
name: Choose manually the cloud provider
description: Select which cloud provider XSOAR should handle this incident.
type: collection
iscommand: false
brand: ""
nexttasks:
'#none#':
- "26"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 1110,
"y": 0
}
}
note: false
timertriggers: []
ignoreworker: false
message:
to:
simple: ${incident.assigneduser}
subject:
simple: Choose the Cloud Provider to react upon - ${incident.name} / ${incident.id}
body:
simple: |-
No Cloud Provider was specified to handle Cloud Response - Generic. Please Choose from the following list.
Note that only GCP / Azure / AWS is supported in this flow.
methods:
- email
format: html
bcc:
cc:
timings:
retriescount: 2
retriesinterval: 360
completeafterreplies: 1
completeafterv2: true
completeaftersla: false
form:
questions:
- id: "0"
label: ""
labelarg:
simple: 'Choose a cloud provider from the list below:'
required: true
gridcolumns: []
defaultrows: []
type: singleSelect
options: []
optionsarg:
- {}
- simple: GCP
- simple: AWS
- simple: Azure
fieldassociated: ""
placeholder: ""
tooltip: ""
readonly: false
title: 'Choose the Cloud Provider to react upon:'
description: Select which cloud provider XSOAR should handle this incident.
sender: ""
expired: false
totalanswers: 0
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"26":
id: "26"
taskid: 12e4a818-0377-4886-8f78-9462202ede0a
type: condition
task:
id: 12e4a818-0377-4886-8f78-9462202ede0a
version: -1
name: Which Cloud provider was selected
description: Which Cloud provider was selected
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "27"
AWS:
- "15"
Azure:
- "16"
GCP:
- "21"
separatecontext: false
conditions:
- label: GCP
condition:
- - operator: containsGeneral
left:
value:
simple: Choose the Cloud Provider to react upon:.Answers.0
iscontext: true
right:
value:
simple: GCP
ignorecase: true
- label: AWS
condition:
- - operator: containsGeneral
left:
value:
simple: Choose the Cloud Provider to react upon:.Answers.0
iscontext: true
right:
value:
simple: AWS
ignorecase: true
- label: Azure
condition:
- - operator: containsGeneral
left:
value:
simple: Choose the Cloud Provider to react upon:.Answers.0
iscontext: true
right:
value:
simple: Azure
ignorecase: true
continueonerrortype: ""
view: |-
{
"position": {
"x": 1110,
"y": 200
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"27":
id: "27"
taskid: 1906fc40-41a9-42e6-8315-5ce64fd2a493
type: title
task:
id: 1906fc40-41a9-42e6-8315-5ce64fd2a493
version: -1
name: No cloud provider was selected
description: No cloud provider was selected
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "20"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 1110,
"y": 555
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
view: |-
{
"linkLabelsPosition": {
"2_15_AWS": 0.7,
"2_16_Azure": 0.67
},
"paper": {
"dimensions": {
"height": 1085,
"width": 1730,
"x": -240,
"y": -300
}
}
}
inputs:
- key: cloudProvider
value: {}
required: false
description: The cloud service provider involved.
playbookInputQuery:
- key: autoResourceRemediation
value: {}
required: false
description: Whether to execute the resource remediation flow automatically.
playbookInputQuery:
- key: AWS-resourceRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the instances created.
AWS available types:
Stop - for stopping the instances.
Terminate - for terminating the instances.
playbookInputQuery:
- key: Azure-resourceRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the instances created.
Azure available types:
Poweroff - for shutting down the instances.
Delete - for deleting the instances.
playbookInputQuery:
- key: GCP-resourceRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the instances created.
GCP available types:
Stop - For stopping the instances.
Delete - For deleting the instances.
playbookInputQuery:
- key: autoAccessKeyRemediation
value: {}
required: false
description: Whether to execute the access key remediation flow automatically.
playbookInputQuery:
- key: AWS-accessKeyRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the user's access key.
AWS available types:
Disable - for disabling the user's access key.
Delete - for the user's access key deletion.
playbookInputQuery:
- key: GCP-accessKeyRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the user's access key.
GCP available types:
Disable - For disabling the user's access key.
Delete - For the deleting user's access key.
playbookInputQuery:
- key: autoUserRemediation
value: {}
required: false
description: Whether to execute the user remediation flow automatically.
playbookInputQuery:
- key: AWS-userRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the user involved.
AWS available types:
Delete - for the user deletion.
Revoke - for revoking the user's credentials.
playbookInputQuery:
- key: Azure-userRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the user involved.
Azure available types:
Disable - for disabling the user.
Delete - for deleting the user.
playbookInputQuery:
- key: GCP-userRemediationType
value: {}
required: false
description: |-
Choose the remediation type for the user involved.
GCP available types:
Delete - For deleting the user.
Disable - For disabling the user.
playbookInputQuery:
- key: autoBlockIndicators
value: {}
required: false
description: Whether to block the indicators automatically.
playbookInputQuery:
- key: resourceName
value: {}
required: false
description: |-
The resource name to take action on.
Supports: AWS, GCP and Azure
playbookInputQuery:
- key: resourceZone
value: {}
required: false
description: |-
The resource's zone to take action on.
Supports: GCP
playbookInputQuery:
- key: resourceGroup
value: {}
required: false
description: |-
Supports: Azure
The resource group to take action on.
playbookInputQuery:
- key: accessKeyName
value: {}
required: false
description: |-
The access key name in the following format:
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}.
Supports: GCP
playbookInputQuery:
- key: accessKeyId
value: {}
required: false
description: |-
The user's access key ID.
Supports: AWS
playbookInputQuery:
- key: region
value: {}
required: false
description: |-
The resource's region.
Supports: AWS
playbookInputQuery:
- key: username
value: {}
required: false
description: |-
The username to take action on.
Supports: AWS, GCP and Azure
playbookInputQuery:
- description: The source IP address of the attacker.
key: sourceIP
playbookInputQuery:
required: false
value: {}
- description: The GCP Project ID for the event scope.
key: GCPprojectID
playbookInputQuery:
required: false
value: {}
- description: |-
The account type
GCP - "user" / "service_account"
key: accountType
playbookInputQuery:
required: false
value: {}
outputs: []
tests:
- No tests (auto formatted)
fromversion: 6.5.0