@@ -70,6 +70,23 @@ script:
70
70
}
71
71
],
72
72
},
73
+ 'fe-submit-url-status': {
74
+ url: 'submissions/status/%submission_Key%',
75
+ method: 'GET',
76
+ setContentType: true,
77
+ extended: true,
78
+ translator: [
79
+ {
80
+ contextPath: 'FireEyeAX.Submissions(val.Key==obj.Key)',
81
+ title: 'FireEye Submission',
82
+ data: [
83
+ {to: 'Key', from: 'submission_Key'},
84
+ {to: 'Status', from: 'status'},
85
+ {to: 'ID', from: 'response.id'},
86
+ ]
87
+ }
88
+ ],
89
+ },
73
90
'fe-alert': {
74
91
url: 'alerts',
75
92
method: 'GET',
@@ -121,6 +138,18 @@ script:
121
138
]
122
139
}
123
140
],
141
+ },
142
+ 'fe-submit-url': {
143
+ extended: true,
144
+ translator: [
145
+ {
146
+ contextPath: 'FireEyeAX.Submissions(val.Key==obj.Key)',
147
+ title: 'FireEye Submission',
148
+ data: [
149
+ {to: 'Key', from: 'id'},
150
+ ]
151
+ }
152
+ ],
124
153
}
125
154
};
126
155
@@ -269,6 +298,24 @@ script:
269
298
}
270
299
result = JSON.parse(res.Body);
271
300
break;
301
+ case 'fe-submit-url':
302
+ var profiles = args.profiles.split(',');
303
+ var urls = args.urls.split(',');
304
+ var res = http(
305
+ server + 'submissions/url',
306
+ {
307
+ Method: 'POST',
308
+ Headers: {'Content-Type': ['application/json'],'X-FeApi-Token': token},
309
+ Body: JSON.stringify({"timeout":args.timeout, "priority":args.priority, "profiles":profiles, "application":args.application, "force":args.force, "analysistype":args.analysistype, "prefetch":args.prefetch, "urls":urls})
310
+ },
311
+ params.insecure,
312
+ params.proxy
313
+ );
314
+ if (res.StatusCode < 200 || res.StatusCode >= 300 || res.success === false) {
315
+ throw 'FireEye URL Submission Request Failed.\nStatus code: ' + res.StatusCode + '.\nBody: ' + res.Body + '.';
316
+ }
317
+ result = JSON.parse(res.Body);
318
+ break;
272
319
default:
273
320
respoonse = sendRequest(replaceInTemplatesAndRemove(commandDictionary[command].url, args), commandDictionary[command].method, token, commandDictionary[command].setContentType, args);
274
321
result = respoonse.Body;
@@ -289,6 +336,9 @@ script:
289
336
currentCommand = commandDictionary[command];
290
337
var entries = [];
291
338
if (currentCommand.extended) {
339
+ if(command === 'fe-submit-url'){
340
+ result = result.response
341
+ }
292
342
for (var j in currentCommand.translator) {
293
343
var current = currentCommand.translator[j];
294
344
var entry = {
@@ -414,7 +464,7 @@ script:
414
464
description : Bad hash found
415
465
- contextPath : File.Malicious.Vendor
416
466
description : For malicious files, the vendor that made the decision
417
- description : commands.server.feSubmit.arguments.submissionKey.description
467
+ description : Results of the file submission
418
468
- name : fe-submit
419
469
arguments :
420
470
- name : upload
@@ -453,7 +503,6 @@ script:
453
503
description : commands.server.feSubmit.description
454
504
- name : fe-config
455
505
arguments : []
456
- description : commands.server.feConfig.description
457
506
outputs :
458
507
- contextPath : FireEyeAX.Sensors.Address
459
508
description : Sensor IP address
@@ -469,3 +518,80 @@ script:
469
518
description : FireEye application ID
470
519
- contextPath : FFireEyeAX.Sensors.Profiles.Applications.-name
471
520
description : FireEye application name
521
+ description : commands.server.feConfig.description
522
+ - name : fe-submit-url
523
+ arguments :
524
+ - name : analysistype
525
+ required : true
526
+ auto : PREDEFINED
527
+ predefined :
528
+ - " 1"
529
+ - " 2"
530
+ description : ' Specify live or sandbox analysis mode. 1—Live, analyze suspected
531
+ malware objects live within the MAS Multivector Virtual Execution (MVX) analysis
532
+ engine. 2—Sandbox, analyze suspected malware objects in a closed, protected
533
+ environment. Example: analysisType=1'
534
+ - name : profiles
535
+ required : true
536
+ description : Select the MAS profile to use for analysis. To determine the available
537
+ profiles, use the configuration command. To submit profiles, add them as
538
+ a parameter using a comma to separate them. For example, profiles="win7-sp1,winxp-sp3"
539
+ - name : application
540
+ required : true
541
+ description : ' Specifies the application to be used for the analysis. To determine
542
+ the available applications for a specific profile, use the configuration
543
+ command. Note: Setting the application value to 0, allows the MAS to determine
544
+ the file type for you'
545
+ - name : priority
546
+ required : true
547
+ auto : PREDEFINED
548
+ predefined :
549
+ - " 0"
550
+ - " 1"
551
+ description : ' Sets the analysis priority: 0—Normal, adds analysis to the bottom
552
+ of queue. 1—Urgent, places the analysis at the top of the queue'
553
+ - name : force
554
+ required : true
555
+ auto : PREDEFINED
556
+ predefined :
557
+ - " false"
558
+ - " true"
559
+ description : ' Specify whether to perform an analysis on the malware object even
560
+ if the object exactly matches an analysis that has already been performed.
561
+ In most cases, it is not necessary to reanalyze malware. (default: false)
562
+ False, Do not analyze duplicate objects. True, Force analysis'
563
+ - name : prefetch
564
+ required : true
565
+ auto : PREDEFINED
566
+ predefined :
567
+ - " 0"
568
+ - " 1"
569
+ description : Specifies whether to determine the file target based on an internal
570
+ determination rather than browsing to the target location. 0—No 1—Yes. If
571
+ analysistype is set to 0 for sandbox analysis, prefetch must be set to 1.
572
+ - name : timeout
573
+ required : true
574
+ description : Sets the analysis timeout (in seconds)
575
+ - name : urls
576
+ required : true
577
+ description : URLs to be analyzed. To submit URLs, add them as a parameter using
578
+ a comma to separate them. For example, urls="www.demisto.com,www.google.com"
579
+ outputs :
580
+ - contextPath : FireEyeAX.Submissions.Key
581
+ description : The file submission key
582
+ description : Submit a url for analysis by FireEye
583
+ - name : fe-submit-url-status
584
+ arguments :
585
+ - name : submission_Key
586
+ required : true
587
+ description : Submission key of the submission
588
+ outputs :
589
+ - contextPath : FireEyeAX.Submissions.Key
590
+ description : The url submission key
591
+ - contextPath : FireEyeAX.Submissions.Status
592
+ description : The url submission status
593
+ - contextPath : FireEyeAX.Submissions.ID
594
+ description : The ID of URL submission results
595
+ description : Get a status for a url submitted to FireEye analysis
596
+ runonce : false
597
+ releaseNotes : " Added functionality to submit URLs to FireEye and retrieve their status. Commands added are fe-submit-url and fe-submit-url-status"
0 commit comments