-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
playbook-Local_Analysis_alert_Investigation.yml
2345 lines (2328 loc) · 57.2 KB
/
playbook-Local_Analysis_alert_Investigation.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
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
id: Local Analysis alert Investigation
version: -1
name: Local Analysis alert Investigation
description: |-
When an unknown executable, DLL, or macro attempts to run on a Windows or Mac endpoint, the Cortex XDR agent uses local analysis to determine if it is likely to be malware. Local analysis uses a static set of pattern-matching rules that inspect multiple file features and attributes, and a statistical model that was developed with machine learning on WildFire threat intelligence.
**Investigative Actions:**
Investigate the executed process image and verify if it is malicious using:
* XDR trusted signers
* VT trusted signers
* VT detection rate
* NSRL DB
**Response Actions**
The playbook's first response action is a containment plan that is based on the initial data provided within the alert. In that phase, the playbook will execute:
* Auto block indicators
* Auto file quarantine
* Manual endpoint isolation
When the playbook executes, it checks for additional activity using the Endpoint Investigation Plan playbook, and another phase, which includes containment and eradication, is executed.
This phase will execute the following containment actions:
* Manual block indicators
* Manual file quarantine
* Auto endpoint isolation
And the following eradication actions:
* Manual process termination
* Manual file deletion
* Manual reset of the user’s password
External resources:
[Malware Protection Flow](https://docs-cortex.paloaltonetworks.com/r/Cortex-XSIAM/Cortex-XSIAM-Administrator-Guide/File-Analysis-and-Protection-Flow)
starttaskid: '0'
tasks:
'0':
id: '0'
taskid: b83fd3f5-7f61-43c0-88e8-6075d17650dc
type: start
task:
id: b83fd3f5-7f61-43c0-88e8-6075d17650dc
version: -1
name: ''
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '3'
separatecontext: false
view: |-
{
"position": {
"x": 430,
"y": -1800
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"2":
id: "2"
taskid: c91fc254-410b-425e-87b2-c69a28f65349
type: condition
task:
id: c91fc254-410b-425e-87b2-c69a28f65349
version: -1
name: Verdict by FileVerdict AND Prevalence
description: Checks the verdict returned by the 'Enrichment for Verdict' playbook.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- '33'
True Positive:
- "81"
separatecontext: false
conditions:
- label: True Positive
condition:
- - operator: isEqualString
left:
value:
simple: FileVerdict
iscontext: true
right:
value:
simple: Suspicious
ignorecase: true
- operator: isEqualString
left:
value:
simple: FileVerdict
iscontext: true
right:
value:
simple: Malicious
- - operator: isEqualString
left:
value:
complex:
root: Core.AnalyticsPrevalence.Hash
accessor: value
iscontext: true
right:
value:
simple: "false"
ignorecase: true
view: |-
{
"position": {
"x": 430,
"y": -1000
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'3':
id: '3'
taskid: b3b9a73a-24d7-4008-8646-07fa816ad9d5
type: title
task:
id: b3b9a73a-24d7-4008-8646-07fa816ad9d5
version: -1
name: Analysis
type: title
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '61'
separatecontext: false
view: |-
{
"position": {
"x": 430,
"y": -1660
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'6':
id: '6'
taskid: d6e52022-e411-45b0-8b80-a79e9e7afa71
type: condition
task:
id: d6e52022-e411-45b0-8b80-a79e9e7afa71
version: -1
name: 'Was the action prevented? '
description: Checks if the file execution was prevented.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- '57'
Blocked:
- '35'
separatecontext: false
conditions:
- label: Blocked
condition:
- - operator: isEqualString
left:
value:
complex:
root: alert
accessor: action
iscontext: true
right:
value:
simple: BLOCKED
ignorecase: true
view: |-
{
"position": {
"x": 900,
"y": -310
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'14':
id: '14'
taskid: c2495b22-ee9c-48c6-8f2f-6fc37c1bac1d
type: condition
task:
id: c2495b22-ee9c-48c6-8f2f-6fc37c1bac1d
version: -1
name: Check WF alert verdict
description: Checks the WildFire verdict.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- '39'
Benign:
- "77"
separatecontext: false
conditions:
- label: Benign
condition:
- - operator: isEqualString
left:
value:
complex:
root: WildFire.Verdicts
accessor: Verdict
iscontext: true
right:
value:
simple: '0'
- operator: isEqualString
left:
value:
complex:
root: inputs.GraywareAsMalware
iscontext: true
right:
value:
simple: 'False'
- - operator: isEqualString
left:
value:
complex:
root: inputs.ShouldRescanBenign
iscontext: true
right:
value:
simple: 'True'
ignorecase: true
view: |-
{
"position": {
"x": 900,
"y": 875
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'33':
id: '33'
taskid: 6b6f4826-2aa2-456a-8587-93f122f1c99e
type: title
task:
id: 6b6f4826-2aa2-456a-8587-93f122f1c99e
version: -1
name: Handle FP
type: title
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- "75"
separatecontext: false
view: |-
{
"position": {
"x": 430,
"y": 1640
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'34':
id: '34'
taskid: f74d27e4-3546-40ce-8aee-0c1c2047fc61
type: condition
task:
id: f74d27e4-3546-40ce-8aee-0c1c2047fc61
version: -1
name: Manual review - was it your security vendor?
description: |+
Was it your security vendor?
Script from your IT?
....
type: condition
iscommand: false
brand: ''
nexttasks:
No:
- '39'
"Yes":
- "67"
separatecontext: false
view: |-
{
"position": {
"x": 430,
"y": 2075
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'35':
id: '35'
taskid: 29c59ae5-63a9-494e-86a9-d98e85aeec7c
type: title
task:
id: 29c59ae5-63a9-494e-86a9-d98e85aeec7c
version: -1
name: WildFire Verdict
type: title
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '14'
separatecontext: false
view: |-
{
"position": {
"x": 900,
"y": 690
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'39':
id: '39'
taskid: 91b3c33e-25e4-42d5-83f9-b9cbe172e16d
type: title
task:
id: 91b3c33e-25e4-42d5-83f9-b9cbe172e16d
version: -1
name: Investigate
type: title
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '63'
separatecontext: false
view: |-
{
"position": {
"x": 900,
"y": 2370
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'41':
id: '41'
taskid: 076a0a10-7b8f-4584-859c-11b39ea83664
type: title
task:
id: 076a0a10-7b8f-4584-859c-11b39ea83664
version: -1
name: Remediation
type: title
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '64'
- '65'
separatecontext: false
view: |-
{
"position": {
"x": 900,
"y": 2910
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'44':
id: '44'
taskid: f9946ed1-7266-408f-8bde-147e9d09581d
type: condition
task:
id: f9946ed1-7266-408f-8bde-147e9d09581d
version: -1
name: Found relevant information?
description: Checks if other alerts were found on the endpoint.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- "47"
yes:
- '41'
- "76"
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isNotEmpty
left:
value:
simple: FoundIncidents
iscontext: true
right:
value: {}
view: |-
{
"position": {
"x": 900,
"y": 2670
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'45':
id: '45'
taskid: 767a19fc-c96e-4b33-8053-889e45256edf
type: regular
task:
id: 767a19fc-c96e-4b33-8053-889e45256edf
version: -1
name: Close alert
description: commands.local.cmd.close.inv
script: Builtin|||closeInvestigation
type: regular
iscommand: true
brand: Builtin
nexttasks:
'#none#':
- '51'
separatecontext: false
view: |-
{
"position": {
"x": 900,
"y": 4100
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'46':
id: '46'
taskid: d5a05362-eb31-403f-84b9-493f500d455f
type: condition
task:
id: d5a05362-eb31-403f-84b9-493f500d455f
version: -1
name: Restore affected endpoint?
description: Whether to execute the Recovery Plan playbook.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- '47'
yes:
- '66'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isEqualString
left:
value:
complex:
root: inputs.AutoRecovery
iscontext: true
right:
value:
simple: 'True'
ignorecase: true
view: |-
{
"position": {
"x": 900,
"y": 3410
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'47':
id: '47'
taskid: 858764a5-e107-4b04-894f-245053dd10a6
type: condition
task:
id: 858764a5-e107-4b04-894f-245053dd10a6
version: -1
name: Close alert automatically?
description: Whether to close the alert automatically.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- '48'
yes:
- '45'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isEqualString
left:
value:
complex:
root: inputs.AutoCloseAlert
iscontext: true
right:
value:
simple: 'True'
ignorecase: true
view: |-
{
"position": {
"x": 900,
"y": 3750
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'48':
id: '48'
taskid: da1d7739-25a2-416b-8c41-98d80f898913
type: regular
task:
id: da1d7739-25a2-416b-8c41-98d80f898913
version: -1
name: Continue with the incident investigation
description: Continue manually with the alert investigation.
type: regular
iscommand: false
brand: ''
nexttasks:
'#none#':
- '45'
separatecontext: false
view: |-
{
"position": {
"x": 1270,
"y": 3920
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'50':
id: '50'
taskid: 41e96b8f-fa0a-436e-8ca4-a1b526352653
type: title
task:
id: 41e96b8f-fa0a-436e-8ca4-a1b526352653
version: -1
name: Recovery
type: title
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '46'
separatecontext: false
view: |-
{
"position": {
"x": 900,
"y": 3255
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'51':
id: '51'
taskid: 909bbeff-e2db-4c81-81ac-90cb08c5a6e1
type: title
task:
id: 909bbeff-e2db-4c81-81ac-90cb08c5a6e1
version: -1
name: Done
type: title
iscommand: false
brand: ''
description: ''
separatecontext: false
view: |-
{
"position": {
"x": 430,
"y": 4290
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'54':
id: '54'
taskid: a5190e8c-7ec7-4605-8789-496a8195a02f
type: title
task:
id: a5190e8c-7ec7-4605-8789-496a8195a02f
version: -1
name: Pre-Investigation Containment
type: title
iscommand: false
brand: ''
description: ''
nexttasks:
'#none#':
- '58'
separatecontext: false
view: |-
{
"position": {
"x": 1410,
"y": 180
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'55':
id: '55'
taskid: 9e5a149b-b6f9-4aea-8305-61a13d898878
type: condition
task:
id: 9e5a149b-b6f9-4aea-8305-61a13d898878
version: -1
name: Check hash execution timestamp
description: Checks for the hash execution timestamp.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- '35'
24H:
- '54'
separatecontext: false
conditions:
- label: 24H
condition:
- - operator: greaterThanOrEqual
left:
value:
complex:
root: alert
accessor: autime
iscontext: true
right:
value:
complex:
root: LastDayTimeNowUnix
iscontext: true
view: |-
{
"position": {
"x": 1410,
"y": 20
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'57':
id: '57'
taskid: feccfedf-58d9-41c1-8810-f3a9187230de
type: regular
task:
id: feccfedf-58d9-41c1-8810-f3a9187230de
version: -1
name: Get time for the last day
description: |
Retrieves the current date and time.
scriptName: GetTime
type: regular
iscommand: false
brand: ''
nexttasks:
'#none#':
- '55'
scriptarguments:
contextKey:
simple: LastDay
daysAgo:
simple: '1'
separatecontext: false
view: |-
{
"position": {
"x": 1410,
"y": -140
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'58':
id: '58'
taskid: ce2f012d-f8f2-4125-8af7-04c1072ac4de
type: condition
task:
id: ce2f012d-f8f2-4125-8af7-04c1072ac4de
version: -1
name: Is auto-containment set to true?
description: Checks the AutoContainment input.
type: condition
iscommand: false
brand: ''
nexttasks:
'#default#':
- '35'
yes:
- '62'
separatecontext: false
conditions:
- label: yes
condition:
- - operator: isEqualString
left:
value:
complex:
root: inputs.AutoContainment
transformers:
- operator: toLowerCase
iscontext: true
right:
value:
simple: 'true'
view: |-
{
"position": {
"x": 1410,
"y": 320
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'59':
id: '59'
taskid: fbf6583d-dc19-4d34-84cd-2655d7e6aa29
type: regular
task:
id: fbf6583d-dc19-4d34-84cd-2655d7e6aa29
version: -1
name: Retrieve the suspected file
description: Retrieves files from selected endpoints. You can retrieve up to 20 files, from no more than 10 endpoints. At least one endpoint ID and one file path are necessary in order to run the command. After running this command, you can use the core-action-status-get command with returned action_id, to check the action status.
script: '|||core-retrieve-files'
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '60'
scriptarguments:
endpoint_ids:
complex:
root: alert
accessor: agentid
windows_file_paths:
complex:
root: inputs.Path
separatecontext: false
view: |-
{
"position": {
"x": 1280,
"y": 1720
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
'60':
id: '60'
taskid: 91d762cb-ae2c-42b9-817b-beba202a674c
type: regular
task:
id: 91d762cb-ae2c-42b9-817b-beba202a674c
version: -1
name: Get retrieved file
description: View the file retrieved by the core-retrieve-files command according to the action ID. Before running this command, you can use the core-action-status-get command to check if this action completed successfully.
script: '|||core-retrieve-file-details'
type: regular
iscommand: true
brand: ''
nexttasks:
'#none#':
- '68'
scriptarguments:
action_id:
complex:
root: Core.RetrievedFiles
accessor: action_id
separatecontext: false
view: |-
{
"position": {
"x": 1280,
"y": 1880
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"61":
id: "61"
taskid: 109f06df-2f1f-4c89-8b00-e84b143cf481
type: playbook
task:
id: 109f06df-2f1f-4c89-8b00-e84b143cf481
version: -1
name: Enrichment for Verdict
playbookName: Enrichment for Verdict
type: playbook
iscommand: false
brand: ''
description: 'This playbook checks prior alert closing reasons and performs enrichment and prevalence checks on different IOC types. It then returns the information needed to establish the alert''s verdict.'
nexttasks:
'#none#':
- "79"
scriptarguments:
CloseReason:
simple: Resolved - False Positive,Resolved - Duplicate Incident,Resolved - Known Issue
Domain:
complex:
root: alert
accessor: domainname
FileSHA256:
complex:
root: inputs.SHA256
IP:
complex:
root: alert
accessor: hostip
URL:
complex:
root: alert
accessor: url
User:
complex:
root: alert
accessor: username
query:
complex:
root: inputs.Query
threshold:
simple: "5"
separatecontext: true
continueonerrortype: ""
loop:
iscommand: false
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": 430,
"y": -1520
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false