-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAWS_Compromised_EC2_Response.yml
610 lines (610 loc) · 14.2 KB
/
AWS_Compromised_EC2_Response.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
id: 7e60a535-28c0-4a75-8f7e-5f42db056270
version: 41
vcShouldKeepItemLegacyProdMachine: false
name: AWS Compromised EC2 Response
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: 479732b7-e7b5-4772-8752-f6c5dd5ca1f5
type: start
task:
id: 479732b7-e7b5-4772-8752-f6c5dd5ca1f5
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "4"
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": -120
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"1":
id: "1"
taskid: 57dc5073-89ec-42fd-8d66-b335f36c7a6a
type: regular
task:
id: 57dc5073-89ec-42fd-8d66-b335f36c7a6a
version: -1
name: Attach Volume from Offending Instance to Forensic Instance
description: Attaches an EBS volume to a running or stopped instance and exposes
it to the instance with the specified device name.
script: AWS - EC2|||aws-ec2-attach-volume
type: regular
iscommand: true
brand: AWS - EC2
scriptarguments:
device:
simple: xvdh
instanceId:
complex:
root: AWS.EC2.Instances.[1]
accessor: InstanceId
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
volumeId:
complex:
root: AWS.EC2.Volumes
accessor: VolumeId
separatecontext: false
view: |-
{
"position": {
"x": -230,
"y": 1420
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"3":
id: "3"
taskid: 7c19e42f-f35f-498d-86c7-1058dd7d28cd
type: regular
task:
id: 7c19e42f-f35f-498d-86c7-1058dd7d28cd
version: -1
name: Create Snapshot of Offending Instance
description: Creates a snapshot of an EBS volume and stores it in Amazon S3.
You can use snapshots for backups, to make copies of EBS volumes, and to save
data before shutting down an instance.
script: AWS - EC2|||aws-ec2-create-snapshot
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "8"
scriptarguments:
description: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
tags: {}
volumeId:
complex:
root: AWS.EC2.Instances.BlockDeviceMappings.[0].Ebs
accessor: VolumeId
separatecontext: false
view: |-
{
"position": {
"x": -230,
"y": 545
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"4":
id: "4"
taskid: 23cceaf7-3c13-4338-8393-063317ce3012
type: regular
task:
id: 23cceaf7-3c13-4338-8393-063317ce3012
version: -1
name: Get Offending Instance Details
description: Describes one or more of your instances.
script: AWS - EC2|||aws-ec2-describe-instances
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "5"
scriptarguments:
filters: {}
instanceIds:
complex:
root: incident.resource.instanceDetails
accessor: instanceId
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 25
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"5":
id: "5"
taskid: a3da60ad-27a3-4780-839c-eee9f1ebb97b
type: regular
task:
id: a3da60ad-27a3-4780-839c-eee9f1ebb97b
version: -1
name: Describe Subnets
description: Describes one or more of your subnets.
script: AWS - EC2|||aws-ec2-describe-subnets
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "18"
scriptarguments:
filters: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
subnetIds: {}
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 195
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"8":
id: "8"
taskid: 52ee11b6-09f8-4a51-8cb9-517a970756d1
type: regular
task:
id: 52ee11b6-09f8-4a51-8cb9-517a970756d1
version: -1
name: Wait for Snapshot to Complete
description: A waiter function that waits until the snapshot is complate
script: AWS - EC2|||aws-ec2-waiter-snapshot_completed
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "11"
scriptarguments:
filters: {}
ownerIds: {}
region: {}
restorableByUserIds: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
snapshotIds:
complex:
root: AWS.EC2.Snapshots
accessor: SnapshotId
waiterDelay: {}
waiterMaxAttempts: {}
separatecontext: false
view: |-
{
"position": {
"x": -230,
"y": 720
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"10":
id: "10"
taskid: 7e3aedc7-86e1-4343-8fa4-1bf525959187
type: regular
task:
id: 7e3aedc7-86e1-4343-8fa4-1bf525959187
version: -1
name: Run Forensic Instance
description: Launches the specified number of instances using an AMI for which
you have permissions. You can create a launch template , which is a resource
that contains the parameters to launch an instance. When you launch an instance
using RunInstances , you can specify the launch template instead of specifying
the launch parameters. An instance is ready for you to use when its in the
running state. You can check the state of your instance using DescribeInstances.
script: AWS - EC2|||aws-ec2-run-instances
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "12"
scriptarguments:
count:
simple: "1"
deviceName: {}
disableApiTermination: {}
ebsDeleteOnTermination: {}
ebsEncrypted: {}
ebsIops: {}
ebsKmsKeyId: {}
ebsOptimized: {}
ebsSnapshotId: {}
ebsVolumeSize: {}
ebsVolumeType: {}
iamInstanceProfileArn: {}
iamInstanceProfileName: {}
imageId: {}
instanceType: {}
keyName: {}
launchTemplateId:
simple: lt-07795554a551a20cf
launchTemplateName: {}
launchTemplateVersion: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
securityGroupIds: {}
securityGroups: {}
subnetId:
simple: subnet-034040456c85bd40b
tags: {}
userData: {}
separatecontext: false
view: |-
{
"position": {
"x": -230,
"y": 1070
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"11":
id: "11"
taskid: 71935b73-4ac5-4d7d-8009-46286417668f
type: regular
task:
id: 71935b73-4ac5-4d7d-8009-46286417668f
version: -1
name: Convert Snapshot to Volume
description: Creates an EBS volume that can be attached to an instance in the
same Availability Zone.
script: AWS - EC2|||aws-ec2-create-volume
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "10"
scriptarguments:
availabilityZone:
complex:
root: AWS.EC2.Instances.Placement
accessor: AvailabilityZone
encrypted: {}
iops: {}
kmsKeyId: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
size: {}
snapshotId:
complex:
root: AWS.EC2.Snapshots
accessor: SnapshotId
tags: {}
volumeType: {}
separatecontext: false
view: |-
{
"position": {
"x": -230,
"y": 895
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"12":
id: "12"
taskid: 4d78360c-4262-4a90-8d5c-fd30993cfea6
type: regular
task:
id: 4d78360c-4262-4a90-8d5c-fd30993cfea6
version: -1
name: Wait for Forensic Instance Initialization
description: A waiter function that runs every 15 seconds until a successful
state is reached.
script: AWS - EC2|||aws-ec2-waiter-instance-running
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "1"
scriptarguments:
filter: {}
instanceIds:
complex:
root: AWS.EC2.Instances.[1]
accessor: InstanceId
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
waiterDelay: {}
waiterMaxAttempts: {}
separatecontext: false
view: |-
{
"position": {
"x": -230,
"y": 1245
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"15":
id: "15"
taskid: 4e646bda-4203-4c68-8118-9195f1e66be0
type: regular
task:
id: 4e646bda-4203-4c68-8118-9195f1e66be0
version: -1
name: Create Block ACL Entry for Offending IP (Outbound)
description: Creates an entry (a rule) in a network ACL with the specified rule
number.
script: AWS - EC2|||aws-ec2-create-network-acl-entry
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "16"
scriptarguments:
CidrBlock:
complex:
root: incident.service.action.networkConnectionAction.remoteIpDetails
accessor: ipAddressV4
transformers:
- operator: concat
args:
prefix: {}
suffix:
value:
simple: /32
Code: {}
DryRun: {}
Egress:
simple: "True"
From:
simple: "0"
Ipv6CidrBlock: {}
NetworkAclId:
simple: acl-0780ee09f0dbd6f7c
Protocol:
simple: "-1"
RuleAction:
simple: deny
RuleNumber:
simple: "1"
To:
simple: "65535"
Type: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
separatecontext: false
view: |-
{
"position": {
"x": 300,
"y": 720
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"16":
id: "16"
taskid: f8d05e1d-1365-46ac-8255-1a90db970bbb
type: regular
task:
id: f8d05e1d-1365-46ac-8255-1a90db970bbb
version: -1
name: Create Block ACL Entry for Offending IP (Inbound)
description: Creates an entry (a rule) in a network ACL with the specified rule
number.
script: AWS - EC2|||aws-ec2-create-network-acl-entry
type: regular
iscommand: true
brand: AWS - EC2
scriptarguments:
CidrBlock:
complex:
root: incident.service.action.networkConnectionAction.remoteIpDetails
accessor: ipAddressV4
transformers:
- operator: concat
args:
prefix: {}
suffix:
value:
simple: /32
Code: {}
DryRun: {}
Egress:
simple: "False"
From:
simple: "0"
Ipv6CidrBlock: {}
NetworkAclId:
simple: acl-0780ee09f0dbd6f7c
Protocol:
simple: "-1"
RuleAction:
simple: deny
RuleNumber:
simple: "1"
To:
simple: "65535"
Type: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
separatecontext: false
view: |-
{
"position": {
"x": 300,
"y": 895
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"17":
id: "17"
taskid: e88eb14f-adc6-4b7c-8a9d-8da57ff33a54
type: condition
task:
id: e88eb14f-adc6-4b7c-8a9d-8da57ff33a54
version: -1
name: Confirm Action is "Network Connection"
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "15"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualString
left:
value:
complex:
root: incident.service.action
accessor: actionType
iscontext: true
right:
value:
simple: NETWORK_CONNECTION
view: |-
{
"position": {
"x": 300,
"y": 545
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
"18":
id: "18"
taskid: 9b040be1-23a6-4846-862e-c7edbd093534
type: regular
task:
id: 9b040be1-23a6-4846-862e-c7edbd093534
version: -1
name: Describe VPC
description: Describes one or more of your VPCs.
script: AWS - EC2|||aws-ec2-describe-vpcs
type: regular
iscommand: true
brand: AWS - EC2
nexttasks:
'#none#':
- "17"
- "3"
scriptarguments:
filters: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
vpcIds:
complex:
root: AWS.EC2.Instances.NetworkInterfaces.[0]
accessor: VpcId
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 360
}
}
note: false
timertriggers: []
ignoreworker: false
skipunavailable: false
quietmode: 0
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 1635,
"width": 910,
"x": -230,
"y": -120
}
}
}
inputs: []
outputs: []