-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathplaybook-AWS-CloudTrail_Test_.yml
More file actions
445 lines (445 loc) · 11.2 KB
/
playbook-AWS-CloudTrail_Test_.yml
File metadata and controls
445 lines (445 loc) · 11.2 KB
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
id: 3da2e31b-f114-4d7f-8702-117f3b498de9
version: -1
fromversion: 5.0.0
name: AWS - CloudTrail Test Playbook
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: 5ed045bb-7326-46e4-86fd-836a6c494c1b
type: start
task:
id: 5ed045bb-7326-46e4-86fd-836a6c494c1b
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "24"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 50
}
}
note: false
"8":
id: "8"
taskid: 1f86bb1a-58e8-408a-8e11-0c936266b75a
type: regular
task:
id: 1f86bb1a-58e8-408a-8e11-0c936266b75a
version: -1
name: VerifyContext
description: |-
Verifies path in context:
- Verifies path existence
- If matching object is an array: verify fields exists in each of the objects in the array
- If matching object is not an array: verify fields exists in matching object
- if 'expectedValue' is given: ensure that the given value is equal to the context path
scriptName: VerifyContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "18"
scriptarguments:
expectedValue: {}
fields: {}
path:
simple: AWS.CloudTrail.Trails.Name
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 545
}
}
note: false
"14":
id: "14"
taskid: 703acec3-7b36-4c50-8d1e-be784528f0d2
type: regular
task:
id: 703acec3-7b36-4c50-8d1e-be784528f0d2
version: -1
name: VerifyContext
description: |-
Verifies path in context:
- Verifies path existence
- If matching object is an array: verify fields exists in each of the objects in the array
- If matching object is not an array: verify fields exists in matching object
- if 'expectedValue' is given: ensure that the given value is equal to the context path
scriptName: VerifyContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "18"
scriptarguments:
expectedValue: {}
fields: {}
path:
simple: AWS.CloudTrail.Trails.TrailARN
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 545
}
}
note: false
"15":
id: "15"
taskid: fb01caa9-419c-437d-863a-8757cb8c5991
type: regular
task:
id: fb01caa9-419c-437d-863a-8757cb8c5991
version: -1
name: VerifyContext
description: |-
Verifies path in context:
- Verifies path existence
- If matching object is an array: verify fields exists in each of the objects in the array
- If matching object is not an array: verify fields exists in matching object
- if 'expectedValue' is given: ensure that the given value is equal to the context path
scriptName: VerifyContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "18"
scriptarguments:
expectedValue: {}
fields: {}
path:
simple: AWS.CloudTrail.Trails.S3BucketName
separatecontext: false
view: |-
{
"position": {
"x": 910,
"y": 545
}
}
note: false
"17":
id: "17"
taskid: e09ba119-5e3a-42ba-81ad-a21a5ded9a94
type: regular
task:
id: e09ba119-5e3a-42ba-81ad-a21a5ded9a94
version: -1
name: aws-cloudtrail-create-trail
description: Creates a trail that specifies the settings for delivery of log
data to an Amazon S3 bucket. A maximum of five trails can exist in a region,
irrespective of the region in which they were created.
script: AWS - CloudTrail|||aws-cloudtrail-create-trail
type: regular
iscommand: true
brand: AWS - CloudTrail
nexttasks:
'#none#':
- "15"
- "8"
- "14"
scriptarguments:
cloudWatchLogsLogGroupArn: {}
cloudWatchLogsRoleArn: {}
enableLogFileValidation: {}
includeGlobalServiceEvents: {}
isMultiRegionTrail: {}
kmsKeyId: {}
name:
simple: test
s3BucketName:
simple: demisto-ct-test
s3KeyPrefix: {}
snsTopicName: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 370
}
}
note: false
"18":
id: "18"
taskid: 491ab5f9-1c4a-4207-81b0-e51c45a6a1c7
type: regular
task:
id: 491ab5f9-1c4a-4207-81b0-e51c45a6a1c7
version: -1
name: aws-cloudtrail-start-logging
description: Starts the recording of AWS API calls and log file delivery for
a trail. For a trail that is enabled in all regions, this operation must be
called from the region in which the trail was created. This operation cannot
be called on the shadow trails (replicated trails in other regions) of a trail
that is enabled in all regions.
script: AWS - CloudTrail|||aws-cloudtrail-start-logging
type: regular
iscommand: true
brand: AWS - CloudTrail
nexttasks:
'#none#':
- "19"
scriptarguments:
name:
simple: test
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 720
}
}
note: false
"19":
id: "19"
taskid: 440034d7-fb12-4fa8-86d7-8badb49eb2ce
type: regular
task:
id: 440034d7-fb12-4fa8-86d7-8badb49eb2ce
version: -1
name: aws-cloudtrail-update-trail
description: Updates the settings that specify delivery of log files. Changes
to a trail do not require stopping the CloudTrail service.
script: AWS - CloudTrail|||aws-cloudtrail-update-trail
type: regular
iscommand: true
brand: AWS - CloudTrail
nexttasks:
'#none#':
- "20"
scriptarguments:
cloudWatchLogsLogGroupArn: {}
cloudWatchLogsRoleArn: {}
enableLogFileValidation: {}
includeGlobalServiceEvents: {}
isMultiRegionTrail:
simple: "true"
kmsKeyId: {}
name:
simple: test
s3BucketName: {}
s3KeyPrefix: {}
snsTopicName: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 895
}
}
note: false
"20":
id: "20"
taskid: d88ee670-7619-4de6-83f3-ad7a73f06741
type: regular
task:
id: d88ee670-7619-4de6-83f3-ad7a73f06741
version: -1
name: aws-cloudgtrail-lookup-events
description: Looks up API activity events captured by CloudTrail that create,
update, or delete resources in your account. Events for a region can be looked
up for the times in which you had CloudTrail turned on in that region during
the last seven days.
script: AWS - CloudTrail|||aws-cloudtrail-lookup-events
type: regular
iscommand: true
brand: AWS - CloudTrail
nexttasks:
'#none#':
- "21"
scriptarguments:
attributeKey:
simple: EventName
attributeValue:
simple: StartLogging
endTime: {}
region: {}
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
startTime: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 1070
}
}
note: false
"21":
id: "21"
taskid: f2d99626-5357-4dda-8f21-0cd86f5716a6
type: regular
task:
id: f2d99626-5357-4dda-8f21-0cd86f5716a6
version: -1
name: aws-cloudtrail-stop-logging
description: Suspends the recording of AWS API calls and log file delivery for
the specified trail. Under most circumstances, there is no need to use this
action. You can update a trail without stopping it first. This action is the
only way to stop recording. For a trail enabled in all regions, this operation
must be called from the region in which the trail was created, or an InvalidHomeRegionException
will occur. This operation cannot be called on the shadow trails (replicated
trails in other regions) of a trail enabled in all regions.
script: AWS - CloudTrail|||aws-cloudtrail-stop-logging
type: regular
iscommand: true
brand: AWS - CloudTrail
nexttasks:
'#none#':
- "22"
scriptarguments:
name:
simple: test
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 1245
}
}
note: false
"22":
id: "22"
taskid: 12515034-0279-4f9d-8ca0-84374c665bd1
type: regular
task:
id: 12515034-0279-4f9d-8ca0-84374c665bd1
version: -1
name: aws-cloudtrail-describe-trails
description: Retrieves settings for the trail associated with the current region
for your account.
script: AWS - CloudTrail|||aws-cloudtrail-describe-trails
type: regular
iscommand: true
brand: AWS - CloudTrail
nexttasks:
'#none#':
- "23"
scriptarguments:
includeShadowTrails: {}
trailNameList: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 1420
}
}
note: false
"23":
id: "23"
taskid: 8a162cef-77c3-46bd-85df-d856938b1aaf
type: regular
task:
id: 8a162cef-77c3-46bd-85df-d856938b1aaf
version: -1
name: aws-cloudtrail-delete-trail
description: Deletes a trail. This operation must be called from the region
in which the trail was created. DeleteTrail cannot be called on the shadow
trails (replicated trails in other regions) of a trail that is enabled in
all regions.
script: AWS - CloudTrail|||aws-cloudtrail-delete-trail
type: regular
iscommand: true
brand: AWS - CloudTrail
nexttasks:
'#none#':
- "25"
scriptarguments:
name:
simple: test
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 1595
}
}
note: false
"24":
id: "24"
taskid: 2c968e3b-22ef-4789-8692-9e9ba779f98b
type: regular
task:
id: 2c968e3b-22ef-4789-8692-9e9ba779f98b
version: -1
name: DeleteContext
description: Delete field from context
scriptName: DeleteContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "17"
scriptarguments:
all:
simple: "yes"
index: {}
key: {}
keysToKeep: {}
subplaybook: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 195
}
}
note: false
"25":
id: "25"
taskid: 303b78bc-2e29-4600-8618-f984f1d00a2d
type: title
task:
id: 303b78bc-2e29-4600-8618-f984f1d00a2d
version: -1
name: End of Playbook
type: title
iscommand: false
brand: ""
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 1770
}
}
note: false
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 1785,
"width": 1240,
"x": 50,
"y": 50
}
}
}
inputs: []
outputs: []