Skip to content

Commit eba1d56

Browse files
hirshbergshachardeanarbel
authored andcommitted
FireEye URL submissions (#1743) (#1820)
* FireEye URL submissions (#1743) * FireEye URL submissions Added functionality to submit URLs to FireEye and retrieve their status. Functions created are fe-submit-url and fe-submit-url-status * Modify integration description Modified integration description to aligh with naming standards and help user understand how certain parameters should be passed. * Reverted fe-submit and fe-submit-status back to original name Reverted fe-submit and fe-submit-status back to original name from fe-submit-file and fe-submit-status * deleting file that is not part of integration * Update integration-fireeye.yml * added predefined parameters for commands added predefined parameters for commands * Added release notes
1 parent e14d8ae commit eba1d56

File tree

1 file changed

+128
-2
lines changed

1 file changed

+128
-2
lines changed

Integrations/integration-fireeye.yml

Lines changed: 128 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,23 @@ script:
7070
}
7171
],
7272
},
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+
},
7390
'fe-alert': {
7491
url: 'alerts',
7592
method: 'GET',
@@ -121,6 +138,18 @@ script:
121138
]
122139
}
123140
],
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+
],
124153
}
125154
};
126155
@@ -269,6 +298,24 @@ script:
269298
}
270299
result = JSON.parse(res.Body);
271300
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;
272319
default:
273320
respoonse = sendRequest(replaceInTemplatesAndRemove(commandDictionary[command].url, args), commandDictionary[command].method, token, commandDictionary[command].setContentType, args);
274321
result = respoonse.Body;
@@ -289,6 +336,9 @@ script:
289336
currentCommand = commandDictionary[command];
290337
var entries = [];
291338
if (currentCommand.extended) {
339+
if(command === 'fe-submit-url'){
340+
result = result.response
341+
}
292342
for (var j in currentCommand.translator) {
293343
var current = currentCommand.translator[j];
294344
var entry = {
@@ -414,7 +464,7 @@ script:
414464
description: Bad hash found
415465
- contextPath: File.Malicious.Vendor
416466
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
418468
- name: fe-submit
419469
arguments:
420470
- name: upload
@@ -453,7 +503,6 @@ script:
453503
description: commands.server.feSubmit.description
454504
- name: fe-config
455505
arguments: []
456-
description: commands.server.feConfig.description
457506
outputs:
458507
- contextPath: FireEyeAX.Sensors.Address
459508
description: Sensor IP address
@@ -469,3 +518,80 @@ script:
469518
description: FireEye application ID
470519
- contextPath: FFireEyeAX.Sensors.Profiles.Applications.-name
471520
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

Comments
 (0)