Submit file request

Prev Next
POST https://<address>/wsapis/[v1.2.0|v2.0.0]/submissions/file

Availability

This command is available on the following appliances:

  • Central Management System

  • Malware Analysis

Required headers:

X-FeApi-Token: [API-Token]
X-FeClient-Token: [Client-Token]

Body:

<!--Submission File Set-->
<!--Submit Options Attachment-->
MIME Type application/json
<!--Submit File Attachment-->
MalwareFile1.zip

Parameters

  • address—The IP address of the appliance running the Web Services API.

  • API-Token—This token authenticates the session. By default, the session times out after 15 minutes of inactivity.

  • Client-Token—(Optional) This client token is provided by Trellix. For more information about the client token, contact your sales representative.

Submission options

These options are added as the first part of a multipart MIME attachment to the body of the document. The options should be encoded as a JSON attachment.

Format

The JSON-formatted attachment should include the following values:

{\"enable_vnc\":\"[value]\", \"application\":\"[value]\", \"timeout\":\"[value]\", 
\"priority\":\"[value]\", \"profiles\":[\"value\"], 
\"analysistype\":\"[value]\", \"force\":\"[value]\",
\"prefetch\":\"[value]\", \"note\":\"[value]\", \"params\":\"[value]]\"}

enable_vnc

(applicable only for Malware Analysis appliance in v2.0.0 only)

Specifies whether to enable VNC to the VM during the analysis.

  • false—Disables VNC.

  • true—Enables VNC.

application

Specifies the ID of the application to be used for the analysis. To determine the available applications for a specific profile, use the Malware Analysis configuration request. For more information, see Configuration Request.

Note

Setting the application value to 0 allows the Malware Analysis appliance to choose the application for you.

timeout

Sets the analysis timeout (in seconds).

priority

Sets the analysis priority: (default: Normal)

  • 0—Normal: adds analysis to the bottom of queue.

  • 1—Urgent: places the analysis at the top of the queue.

profiles

Selects the Malware Analysis profile to use for analysis. To determine the available profiles, use the Malware Analysis configuration request. For more information, see AX Series Configuration information request.

analysistype

Specifies the analysis mode.

  • 1—Live: analyze suspected files live within the Malware Analysis Multi-Vector Virtual Execution (MVX) analysis engine.

  • 2—Sandbox: analyze suspected files in a closed, protected environment.

force

Specifies whether to perform an analysis on the file even if the file exactly matches an analysis that has already been performed. In most cases, it is not necessary to reanalyze malware. (default: false)

  • false—Do not analyze duplicate files.

  • true—Force analysis

prefetch

Specifies whether to determine the file target based on an internal determination rather than browsing to the target location.

  • 0—No

  • 1—Yes

notes

(applicable only for Malware Analysis appliance in v2.0.0 only)

Text description about the malware analysis submission. Notes are shared with the Dynamic Threat Intelligence (DTI) Cloud.

params

(applicable only for Malware Analysis appliance in v2.0.0 only)

File type of malware that is analyzed by the appliance. The Malware Analysis appliance analyzes DLLs or other file types that might be a malware dropper. DLL file types are the default. Prefetch must be enabled when submitting DLLs or other files with parameters for analysis. You can specify a function name (such as an entry point) and the file to be opened as part of the DLL parameter definition. For example, you can enter mshtml.dll, OpenAs_RunDLL htmlfile.html.

Example request for a single file

POST https://xxx.xxx.xxx.xxx:443/wsapis/v2.0.0/submissions/file

Request headers:

X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-FeClient-Token: BigDataInc

Request Body:

MIME Type application/json
{"enable_vnc":"true", "analysistype":"1", "priority":"0", "profiles":["win7-sp1"],
"force":"true", "application":"69", "prefetch":"0", "timeout":"500", "note":"note", 
"params":"mshtml.dll"}
MalwareFile1.exe

Example request for multiple files using a zip file

POST https://xxx.xxx.xxx.xxx:443/wsapis/v2.0.0/submissions/file

Request headers:

X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-FeClient-Token: BigDataInc

Request Body:

<!-- Request File Set 1 -->
MIME Type application/json
{"enable_vnc":"true", "analysisType":"1", "priority":"0", "profiles":["win7-sp1"], "force":"true",
       "application":"69", "prefetch":"0", "timeout":"500", "note":"note", "params":"mshtml.dll"}
MalwareFile1.zip

Submission response

After the submission request is received, the Central Management System appliance forwards the submission request to the Malware Analysis appliance. The Malware Analysis appliance acknowledges the request and supplies the submission key. The submission key identifies the unique file submitted for analysis.

The submission key is in JSON.

HTTP/1.1 [Response Code] [Response Message]
Date: [Date]

Body:

[Submission_Key]
Response fields
  • Response Code—A standard HTML response code.

    • 200—Request successful.

    • 400—Request unsuccessful because the filter value was invalid.

  • Response Message—A standard HTML response message.

    • OK—Request successful.

    • Bad Request—Request unsuccessful because the filter value was invalid.

  • Date—Standard HTML date format.

  • Submission_Key—A JSON-formatted unique submission key that identifies the submitted file for subsequent status and retrieval requests.

Example
HTTP/1.1 200 OK
Date: Fri, 17 Nov 2017 08:00:00 GMT

Body—Central Management System:

[{"ID"."3831_5"}]

Body—other appliances:

[{"ID"."7709"}]

cURL code sample: file submission

The following code sample can be copied and executed from any command-line interface that includes the cURL library. This sample builds on the authentication cURL code sample.

Note

In this sample, line breaks are added for readability. Remove these line breaks before you paste the code sample into your command-line tool.

curl -qgsSkH "Content-Type: multipart/form-data"
--no-progress-bar
--header "X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-F "filename=@test.txt"
-F "options={\"enable_vnc\":\"true\", \"application\":\"2\",\"timeout\":\"500\",
\"priority\":\"0\",\"profiles\":[\"win7-sp1\"],\"analysistype\":\"1\",
\"force\":\"true\",\"prefetch\":\"0\", \"note\":\"note1234\", \"params\":\"param1234\"}
https://xxx.xxx.xxx.xxx:443/wsapis/v2.0.0/submissions/file

This cURL sample includes the following options:

  • -q—This option specifies that the curlrc config file is not read or used. Although this is an optional setting, Trellix recommends that you include this option.

  • -g—This option turns off the URL globbing parser. Although this is an optional setting, Trellix recommends that you include this option.

  • -s—This option turns off the progress meter and error message. Although this is an optional setting, Trellix recommends that you include this option.

  • -S—When used with the -s option, this option shows error messages if your cURL switch fails. Although this is an optional setting, Trellix recommends that you include this option.

  • -k—This option explicitly allows cURL to perform insecure SSL connections and transfers. This allows you to test your SSL connection without installing a CA certificate.

  • -H—This option allows you to specify a custom header with the --header switch.

  • Content-Type: multipart/form-data—This option encodes the data as a multipart form.

  • --no-progress-bar—This option suppresses the cURL download progress bar, which can interfere with the request.

  • --header "X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This custom header includes the API-Token that was returned by your appliance during the authentication request. In the authentication cURL code sample, this token was included in the auth.txt file. Replace the token in the sample with the token received in the response to your authentication request.

  • -F "filename=@test.txt—This option includes the test.txt file as an attachment to the message body.

  • -F "options={\"enable_vnc\":\"true\", \"application\":\"2\",\"timeout\":\"500\",\"priority\":\"0\", \"profiles\":[\"win7-sp1\"],\"analysistype\":\"1\",\"force\":\"true\", \"prefetch\":\"0\", \"note\":\"note1234\", \"params\":\"param1234\"}—This set of options defines the submission parameters for the first file. For more information, see Submission options.

  • https://xxx.xxx.xxx.xxx:443/wsapis/v2.0.0/submissions/file—The submission request URL. Replace the IP address xxx.xxx.xxx.xxx with the IP address of your appliance.

Results

The requested submission returns a submission key. This key is used to retrieve status and test results. For example:

[{"ID":"3831_5"}]