-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
playbook-T1036_-_Masquerading.yml
1690 lines (1669 loc) · 41.4 KB
/
playbook-T1036_-_Masquerading.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: T1036 - Masquerading
version: -1
name: T1036 - Masquerading
description: |-
This playbook handles masquerading alerts based on the MITRE T1036 technique.
An attacker might leverage Microsoft Windows well-known image names to run malicious processes without being caught.
**Attacker's Goals:**
An attacker is attempting to masquerade as standard windows images by using a trusted name to execute malicious code.
**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 which 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:
[MITRE Technique T1036](https://attack.mitre.org/techniques/T1036/)
[Possible Microsoft process masquerading](https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR-Analytics-Alert-Reference/Possible-Microsoft-process-masquerading)
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: 71c58368-f81a-4c7c-8dc8-30515abf9379
type: start
task:
id: 71c58368-f81a-4c7c-8dc8-30515abf9379
version: -1
name: ""
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "82"
separatecontext: false
view: |-
{
"position": {
"x": 70,
"y": 1280
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"7":
id: "7"
taskid: a7b815bf-2633-458f-83e9-5c3a29ba790a
type: title
task:
id: a7b815bf-2633-458f-83e9-5c3a29ba790a
version: -1
name: Handle False Positive
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "86"
separatecontext: false
view: |-
{
"position": {
"x": -330,
"y": 2240
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"14":
id: "14"
taskid: 7d91e62b-9a20-41c3-80ed-a7a284c567d1
type: title
task:
id: 7d91e62b-9a20-41c3-80ed-a7a284c567d1
version: -1
name: Investigation
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "94"
separatecontext: false
view: |-
{
"position": {
"x": 490,
"y": 2895
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"26":
id: "26"
taskid: f0cd4a3c-3ad9-432f-80f1-f836f59a1949
type: title
task:
id: f0cd4a3c-3ad9-432f-80f1-f836f59a1949
version: -1
name: 'Findings '
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "37"
separatecontext: false
view: |-
{
"position": {
"x": 490,
"y": 3210
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"28":
id: "28"
taskid: 35d35d70-6bb9-4932-84e9-33955870fe0b
type: condition
task:
id: 35d35d70-6bb9-4932-84e9-33955870fe0b
version: -1
name: Manuel Review - Should continue to investigate?
description: Whether to continue the investigation in case the verdict is a possible false positive.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "7"
"Yes":
- "14"
separatecontext: false
view: |-
{
"position": {
"x": 70,
"y": 2040
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"33":
id: "33"
taskid: 0723776b-3e10-42c6-8792-1e06d5eaf59a
type: title
task:
id: 0723776b-3e10-42c6-8792-1e06d5eaf59a
version: -1
name: Containment
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "83"
separatecontext: false
view: |-
{
"position": {
"x": 490,
"y": 2550
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"37":
id: "37"
taskid: 912ebd4d-99b4-4959-8308-475233cfd60b
type: condition
task:
id: 912ebd4d-99b4-4959-8308-475233cfd60b
version: -1
name: Are there investigation findings?
description: Checks if there are results for the Endpoint Investigation Plan.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "93"
"yes":
- "96"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isNotEmpty
left:
value:
complex:
root: foundIncidents
iscontext: true
right:
value: {}
view: |-
{
"position": {
"x": 490,
"y": 3350
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"41":
id: "41"
taskid: db863fa1-d2cc-46bc-8ed7-53adaa19714d
type: title
task:
id: db863fa1-d2cc-46bc-8ed7-53adaa19714d
version: -1
name: Done
type: title
iscommand: false
brand: ""
description: ''
separatecontext: false
view: |-
{
"position": {
"x": -330,
"y": 5000
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"42":
id: "42"
taskid: d28118db-63f1-46ba-8490-63a8ddf9bd61
type: title
task:
id: d28118db-63f1-46ba-8490-63a8ddf9bd61
version: -1
name: Remediation
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "67"
- "68"
separatecontext: false
view: |-
{
"position": {
"x": 920,
"y": 3710
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"67":
id: "67"
taskid: 424947cb-b0a5-49da-813c-b5b9368090ed
type: playbook
task:
id: 424947cb-b0a5-49da-813c-b5b9368090ed
version: -1
name: Containment Plan
description: |-
This playbook handles all the containment actions available with Cortex XSIAM.
The playbook enables you to contain the incident with one of the following tasks:
* Isolate endpoint
* Disable account
* Quarantine file
* Block indicators
* Clear user session (currently, the playbook supports only Okta)
The playbook inputs enable you to manipulate the execution flow. Review the inputs description.
playbookName: Containment Plan
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "93"
scriptarguments:
AutoContainment:
complex:
root: inputs.AutoContainment
transformers:
- operator: SetIfEmpty
args:
applyIfEmpty: {}
defaultValue:
value:
simple: "false"
BlockIndicators:
simple: "True"
ClearUserSessions:
simple: "False"
EndpointID:
complex:
root: alert
accessor: agentid
FileContainment:
simple: "True"
FileHash:
complex:
root: foundIncidents.CustomFields
filters:
- - operator: isNotEqualString
left:
value:
simple: foundIncidents.CustomFields.initiatorpath
iscontext: true
right:
value:
simple: c:\windows\explorer.exe
ignorecase: true
accessor: initiatorsha256
FilePath:
complex:
root: foundIncidents.CustomFields.initiatorpath
filters:
- - operator: isNotEqualString
left:
value:
simple: foundIncidents.CustomFields.initiatorpath
iscontext: true
right:
value:
simple: c:\windows\explorer.exe
ignorecase: true
transformers:
- operator: uniq
FileRemediation:
complex:
root: inputs.FileRemediation
UserContainment:
simple: "False"
Username:
complex:
root: foundIncidents.CustomFields
accessor: username
separatecontext: true
loop:
iscommand: false
scriptArguments:
BlockIndicators:
simple: "True"
ContainmentType:
simple: Auto
EndpointContainment:
simple: "False"
FileContainment:
simple: "True"
ScheduledTaskConatinment:
simple: "True"
UserContainment:
simple: "True"
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": 700,
"y": 3850
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"68":
id: "68"
taskid: ea8d4b0e-9f11-4f4b-8c2f-5de458310029
type: playbook
task:
id: ea8d4b0e-9f11-4f4b-8c2f-5de458310029
version: -1
name: Eradication Plan
description: |-
This playbook handles all the eradication actions available with Cortex XSIAM.
The playbook enables you to eradicate the incident with one of the following tasks:
* Reset user password
* Delete file
* Kill process (currently, the playbook supports terminating a process by name)
The playbook inputs enable you to manipulate the execution flow. Review the inputs description.
playbookName: Eradication Plan
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "93"
scriptarguments:
AutoEradicate:
complex:
root: inputs.AutoEradication
EndpointID:
complex:
root: alert
accessor: agentid
FilePath:
complex:
root: foundIncidents.CustomFields
accessor: initiatorpath
transformers:
- operator: uniq
FileRemediation:
complex:
root: inputs.FileRemediation
Username:
complex:
root: foundIncidents.CustomFields
accessor: username
transformers:
- operator: uniq
separatecontext: true
loop:
iscommand: false
scriptArguments:
DeleteFile:
simple: "True"
EradicationType:
simple: Auto
KillProcess:
simple: "True"
RemoveTasks:
simple: "True"
ResetPassword:
simple: "True"
RevertRegistry:
simple: "True"
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": 1140,
"y": 3850
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"71":
id: "71"
taskid: 08a821d2-8fc5-49bb-8bbc-97df50c37d8a
type: playbook
task:
id: 08a821d2-8fc5-49bb-8bbc-97df50c37d8a
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#':
- "72"
scriptarguments:
CloseReason:
simple: Resolved - False Positive,Resolved - Duplicate Incident,Resolved - Known Issue
Domain:
complex:
root: alert
accessor: domainname
FileSHA256:
complex:
root: inputs.FileSHA256
IP:
complex:
root: inputs.IP
URL:
complex:
root: alert
accessor: url
User:
complex:
root: alert
accessor: username
query:
simple: (initiatorsha256:${inputs.FileSHA256} or hostip:${inputs.IP}) and sourceBrand:"${alert.sourceBrand}" and name:"${alert.name}"
threshold:
simple: "5"
separatecontext: false
loop:
iscommand: false
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": 70,
"y": 1555
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"72":
id: "72"
taskid: 59fea646-7ac7-49d2-8d99-97f0313d895a
type: condition
task:
id: 59fea646-7ac7-49d2-8d99-97f0313d895a
version: -1
name: Got possible verdict?
description: Checks the verdict received from the Enrichment for Verdict sub-playbook.
type: condition
iscommand: false
brand: ""
nexttasks:
False Positive:
- "7"
Possible False Positive:
- "28"
True Positive:
- "95"
separatecontext: false
conditions:
- label: True Positive
condition:
- - operator: isEqualString
left:
value:
complex:
root: VTFileVerdict
iscontext: true
right:
value:
simple: malicious
ignorecase: true
- operator: isEqualString
left:
value:
complex:
root: FileVerdict
iscontext: true
right:
value:
simple: suspicious
ignorecase: true
- label: Possible False Positive
condition:
- - operator: isEqualString
left:
value:
complex:
root: VTFileVerdict
iscontext: true
right:
value:
simple: benign
ignorecase: true
- - operator: isEqualString
left:
value:
complex:
root: NSRLFileVerdict
iscontext: true
right:
value:
simple: isNotNSRL
ignorecase: true
- operator: containsGeneral
left:
value:
complex:
root: VTFileSigners
transformers:
- operator: append
args:
item:
value:
simple: XDRFileSigners
iscontext: true
- operator: uniq
iscontext: true
right:
value:
simple: unTrusted
ignorecase: true
- - operator: containsGeneral
left:
value:
complex:
root: Core.AnalyticsPrevalence.Hash
accessor: value
iscontext: true
right:
value:
simple: "true"
ignorecase: true
- label: False Positive
condition:
- - operator: isEqualString
left:
value:
complex:
root: VTFileVerdict
iscontext: true
right:
value:
simple: benign
ignorecase: true
- - operator: isEqualString
left:
value:
complex:
root: NSRLFileVerdict
iscontext: true
right:
value:
simple: isNSRL
ignorecase: true
- operator: notContainsGeneral
left:
value:
complex:
root: VTFileSigners
transformers:
- operator: append
args:
item:
value:
simple: XDRFileSigners
iscontext: true
- operator: uniq
iscontext: true
right:
value:
simple: unTrusted
ignorecase: true
view: |-
{
"position": {
"x": 70,
"y": 1720
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"82":
id: "82"
taskid: 49cd1abf-45e6-49bf-8974-c7be41d8a8f6
type: title
task:
id: 49cd1abf-45e6-49bf-8974-c7be41d8a8f6
version: -1
name: Analysis
type: title
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "71"
separatecontext: false
view: |-
{
"position": {
"x": 70,
"y": 1420
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"83":
id: "83"
taskid: 42bdace5-daa8-4c32-8d51-7ab46b210345
type: playbook
task:
id: 42bdace5-daa8-4c32-8d51-7ab46b210345
version: -1
name: Containment Plan
description: |-
This playbook handles all the containment actions available with Cortex XSIAM.
The playbook enables you to contain the incident with one of the following tasks:
* Isolate endpoint
* Disable account
* Quarantine file
* Block indicators
* Clear user session (currently, the playbook supports only Okta)
The playbook inputs enable you to manipulate the execution flow. Review the inputs description.
playbookName: Containment Plan
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "14"
scriptarguments:
AutoContainment:
complex:
root: inputs.AutoContainment
transformers:
- operator: SetIfEmpty
args:
applyIfEmpty: {}
defaultValue:
value:
simple: "true"
BlockIndicators:
simple: "True"
ClearUserSessions:
simple: "False"
EndpointID:
complex:
root: alert
accessor: agentid
FileContainment:
simple: "True"
FileHash:
complex:
root: inputs
filters:
- - operator: isNotEqualString
left:
value:
simple: inputs.FilePath
iscontext: true
right:
value:
simple: c:\windows\explorer.exe
ignorecase: true
accessor: FileSHA256
transformers:
- operator: SetIfEmpty
args:
applyIfEmpty: {}
defaultValue:
value:
simple: alert.targetprocesssha256
iscontext: true
FilePath:
complex:
root: inputs
filters:
- - operator: isNotEqualString
left:
value:
simple: inputs.FilePath
iscontext: true
right:
value:
simple: c:\windows\explorer.exe
ignorecase: true
accessor: FilePath
transformers:
- operator: SetIfEmpty
args:
applyIfEmpty: {}
defaultValue:
value:
simple: alert.targetprocesscmd
iscontext: true
- operator: replaceMatch
args:
regex:
value:
simple: \"
replaceWith: {}
- operator: uniq
FileRemediation:
simple: Quarantine
HostContainment:
simple: "True"
UserContainment:
simple: "False"
UserVerification:
simple: "False"
Username:
complex:
root: alert
accessor: username
separatecontext: true
loop:
iscommand: false
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": 490,
"y": 2705
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"86":
id: "86"
taskid: 8dbb433f-6540-4a14-8ae4-69b27894189a
type: playbook
task:
id: 8dbb433f-6540-4a14-8ae4-69b27894189a
version: -1
name: Handle False Positive Alerts
description: |
This playbook handles false positive alerts.
playbookName: Handle False Positive Alerts
type: playbook
iscommand: false
brand: ""
nexttasks:
'#none#':
- "41"
scriptarguments:
FileSHA256:
complex:
root: inputs.FileSHA256
ShouldCloseAutomatically:
complex:
root: inputs.AutoCloseAlert
alertName:
complex:
root: alert
accessor: name
sourceIP:
complex:
root: inputs.IP
username:
complex:
root: alert
accessor: username
separatecontext: true
loop:
iscommand: false
exitCondition: ""
wait: 1
max: 100
view: |-
{
"position": {
"x": -330,
"y": 2395
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
continueonerrortype: ""
"88":
id: "88"
taskid: 75ff8953-ad02-4356-8215-1c564ddef450
type: regular
task:
id: 75ff8953-ad02-4356-8215-1c564ddef450
version: -1
name: Close alert
description: commands.local.cmd.close.inv
script: Builtin|||closeInvestigation
type: regular
iscommand: true
brand: Builtin
nexttasks:
'#none#':
- "41"
scriptarguments:
closeReason:
simple: Resolved - Threat Handled
separatecontext: false
view: |-
{
"position": {
"x": 490,
"y": 4830
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false