-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
playbook-Cloud_Token_Theft_-_Set_Verdict.yml
611 lines (602 loc) · 14.7 KB
/
playbook-Cloud_Token_Theft_-_Set_Verdict.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
id: Cloud Token Theft - Set Verdict
version: -1
name: Cloud Token Theft - Set Verdict
description: |-
---
## Cloud Token Theft - Set Verdict Playbook
The playbook is built from a decision tree whose ultimate goal is to decide whether the observed activity is malicious.
### Event Search
The playbook searches for events based on the attacker's IP address within the last two hours.
### Tests Performed
The following tests are performed on the observed activity:
1. **Malicious IP Check**: Determines if the IP address is malicious.
2. **CSP ASN Check**: Checks if the activity was performed from an Autonomous System Number (ASN) belonging to one of the Cloud Service Providers (CSPs).
3. **IP and ASN History Check**: Verifies if the IP address and ASN have been previously observed.
4. **Region Check**: Determines if the API call was made from outside the recognized region.
5. **Anomalous State Check**: Checks if the API call was made from an anomalous state.
6. **Alert Check**: Looks for any related alerts around the event, including:
- Possible cloud instance metadata service (IMDS) abuse.
- Impossible Traveler by cloud identity.
---
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: 8edcb308-c0b8-46f2-8858-38f2fb3a5e58
type: start
task:
id: 8edcb308-c0b8-46f2-8858-38f2fb3a5e58
version: -1
name: ""
iscommand: false
brand: ""
description: ''
nexttasks:
'#none#':
- "3"
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 100,
"y": 570
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"2":
id: "2"
taskid: 9e581115-9afa-473a-81e8-23b0a8268515
type: condition
task:
id: 9e581115-9afa-473a-81e8-23b0a8268515
version: -1
name: Check caller IP reputation
description: Checks the verdict logic. Refer to the playbook description for detailed information.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "6"
Malicious:
- "4"
separatecontext: false
conditions:
- label: Malicious
condition:
- - operator: greaterThanOrEqual
left:
value:
complex:
root: DBotScore
filters:
- - operator: isEqualString
left:
value:
simple: DBotScore.Indicator
iscontext: true
right:
value:
simple: inputs.sourceIP
iscontext: true
accessor: Score
iscontext: true
right:
value:
simple: "2"
continueonerrortype: ""
view: |-
{
"position": {
"x": 100,
"y": 860
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"3":
id: "3"
taskid: 759d168e-6a6f-470b-83da-af9a108070a0
type: regular
task:
id: 759d168e-6a6f-470b-83da-af9a108070a0
version: -1
name: Get additional alerts
description: commands.local.cmd.get.incs
script: Builtin|||getAlerts
type: regular
iscommand: true
brand: Builtin
nexttasks:
'#none#':
- "2"
scriptarguments:
fromdate:
complex:
root: inputs.fromDate
query:
simple: hostip:${inputs.sourceIP}
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 100,
"y": 700
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"4":
id: "4"
taskid: 81f407f2-b2e4-4a82-8a59-171e1d156546
type: regular
task:
id: 81f407f2-b2e4-4a82-8a59-171e1d156546
version: -1
name: Set verdict - Malicious
description: Set a value in context under the key you entered.
scriptName: Set
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "16"
scriptarguments:
key:
simple: alertVerdict
value:
simple: Malicious
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": 100,
"y": 2110
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"5":
id: "5"
taskid: d3428dc0-7a40-4d18-8f60-91fc15d5856c
type: regular
task:
id: d3428dc0-7a40-4d18-8f60-91fc15d5856c
version: -1
name: Set verdict - User verification
description: Set a value in context under the key you entered.
scriptName: Set
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "16"
scriptarguments:
key:
simple: alertVerdict
value:
simple: userVerification
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": -780,
"y": 2110
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"6":
id: "6"
taskid: 992685e9-199f-4467-8e95-7aa0bec6d1aa
type: condition
task:
id: 992685e9-199f-4467-8e95-7aa0bec6d1aa
version: -1
name: Check source ASN
description: Detailed explanation available in the playbook description.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "11"
Cloud ASN:
- "5"
separatecontext: false
conditions:
- label: Cloud ASN
condition:
- - operator: containsGeneral
left:
value:
complex:
root: Core.OriginalAlert.[0].event
accessor: caller_ip_asn_org
iscontext: true
right:
value:
simple: GOOGLE
ignorecase: true
- operator: containsGeneral
left:
value:
complex:
root: Core.OriginalAlert.[0].event
accessor: caller_ip_asn_org
iscontext: true
right:
value:
simple: MICROSOFT
- operator: containsGeneral
left:
value:
complex:
root: Core.OriginalAlert.[0].event
accessor: caller_ip_asn_org
iscontext: true
right:
value:
simple: AMAZON
ignorecase: true
continueonerrortype: ""
view: |-
{
"position": {
"x": -780,
"y": 1030
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"11":
id: "11"
taskid: b14d1b34-a5d1-40c5-8055-27b3eb16a0e5
type: condition
task:
id: b14d1b34-a5d1-40c5-8055-27b3eb16a0e5
version: -1
name: Check ASN & Agent IP popularity
description: Checks the verdict logic. Refer to the playbook description for detailed information.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "12"
Malicious:
- "4"
separatecontext: false
conditions:
- label: Malicious
condition:
- - operator: isEqualNumber
left:
value:
complex:
root: alertJson.raw_abioc.event
accessor: cloud_agent_external_ip_days_seen_count
iscontext: true
right:
value:
simple: "0"
- - operator: isEqualNumber
left:
value:
complex:
root: alertJson.raw_abioc.event
accessor: cloud_caller_ip_asn_count_distinct_cloud_best_identity
iscontext: true
right:
value:
simple: "0"
continueonerrortype: ""
view: |-
{
"position": {
"x": -390,
"y": 1200
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"12":
id: "12"
taskid: eae9a464-1de4-4c8d-8cc5-b7689233d15d
type: condition
task:
id: eae9a464-1de4-4c8d-8cc5-b7689233d15d
version: -1
name: Check for API call executed outside the instance region
description: Detailed explanation available in the playbook description.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "13"
Malicious:
- "4"
separatecontext: false
conditions:
- label: Malicious
condition:
- - operator: containsGeneral
left:
value:
simple: foundIncidents.name
iscontext: true
right:
value:
simple: A compute-attached identity executed API calls outside the instance's region
ignorecase: true
continueonerrortype: ""
view: |-
{
"position": {
"x": -390,
"y": 1380
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"13":
id: "13"
taskid: 5983c9cf-dc47-4e55-889d-3c5fb3a5ef38
type: condition
task:
id: 5983c9cf-dc47-4e55-889d-3c5fb3a5ef38
version: -1
name: Check for API call from unusual country
description: Detailed explanation available in the playbook description.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "14"
Malicious:
- "4"
separatecontext: false
conditions:
- label: Malicious
condition:
- - operator: containsGeneral
left:
value:
simple: foundIncidents.name
iscontext: true
right:
value:
simple: A cloud identity executed an API call from an unusual country
ignorecase: true
continueonerrortype: ""
view: |-
{
"position": {
"x": -390,
"y": 1560
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"14":
id: "14"
taskid: 8cccf35c-4e55-4b0f-8a41-1e467d990fad
type: condition
task:
id: 8cccf35c-4e55-4b0f-8a41-1e467d990fad
version: -1
name: Check for IMDS Access alert
description: Detailed explanation available in the playbook description.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "15"
Malicious:
- "4"
separatecontext: false
conditions:
- label: Malicious
condition:
- - operator: containsGeneral
left:
value:
simple: foundIncidents.name
iscontext: true
right:
value:
simple: Possible Cloud Instance Metadata Service (IMDS) Abuse
ignorecase: true
continueonerrortype: ""
view: |-
{
"position": {
"x": -390,
"y": 1740
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"15":
id: "15"
taskid: 4ee22698-d941-42a5-8add-87640f6d13e5
type: condition
task:
id: 4ee22698-d941-42a5-8add-87640f6d13e5
version: -1
name: Check for Impossible Traveler alert
description: Detailed explanation available in the playbook description.
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "5"
Malicious:
- "4"
separatecontext: false
conditions:
- label: Malicious
condition:
- - operator: containsGeneral
left:
value:
simple: foundIncidents.name
iscontext: true
right:
value:
simple: Impossible travel by cloud identity
continueonerrortype: ""
view: |-
{
"position": {
"x": -390,
"y": 1925
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
"16":
id: "16"
taskid: 78982aba-a0ea-4afa-848b-23338d4f91ad
type: title
task:
id: 78982aba-a0ea-4afa-848b-23338d4f91ad
version: -1
name: Done
type: title
iscommand: false
brand: ""
description: ''
separatecontext: false
continueonerrortype: ""
view: |-
{
"position": {
"x": -780,
"y": 2290
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
isoversize: false
isautoswitchedtoquietmode: false
view: |-
{
"linkLabelsPosition": {
"11_12_#default#": 0.39,
"11_4_Malicious": 0.22,
"12_13_#default#": 0.4,
"12_4_Malicious": 0.26,
"13_14_#default#": 0.42,
"13_4_Malicious": 0.31,
"14_15_#default#": 0.41,
"14_4_Malicious": 0.41,
"15_4_Malicious": 0.51,
"15_5_#default#": 0.13,
"2_4_Malicious": 0.1,
"2_6_#default#": 0.1,
"6_5_Cloud ASN": 0.11
},
"paper": {
"dimensions": {
"height": 1785,
"width": 1260,
"x": -780,
"y": 570
}
}
}
inputs:
- key: sourceIP
value: {}
required: false
description: The source IP to search by additional alerts.
playbookInputQuery:
- key: fromDate
value: {}
required: false
description: |-
The start date for the search additional alerts task.
Filter by from date (e.g., "3 days ago" or 2006-01-02T15:04:05+07:00 or 2006-01-02T15:04:05Z)
playbookInputQuery:
outputs:
- contextPath: alertVerdict
description: The alert verdict.
type: unknown
- contextPath: foundIncidents
description: The additional alerts found.
type: unknown
quiet: false
tests:
- No tests (auto formatted)
marketplaces: ["marketplacev2"]
fromversion: 6.8.0