Submit malware object for analysis request

Prev Next

Uploads a single file for scanning.

POST https://<address>/wsapis/mvx/[v2.0.0]/submissions 

Required headers:

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

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.

The JSON-formatted attachment should include the following values:

{
  \"priority\":\"value\",  
  \"timeout\":\"value\",
  \"analysistype\":\"value\",
  \"force\":\"value\",
  \"prefetch\":\"value\",
  \"params\":\"value\,
  \"profile\":\"value\,
  \"application\":\"value\,
}

priority

Sets the analysis priority. The default value is normal

  • low

  • normal

  • high

  • urgent

Note

This submission option is applicable for the version 10.0.1 and later.

timeout

Sets the analysis timeout (in seconds).

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 URL even if the URL exactly matches an analysis that has already been performed. In most cases, it is not necessary to reanalyze malware. The default value is set to false.

  • false — Do not analyze duplicate URL.

  • true — Force analysis.

Note

This submission option is applicable for the version 10.0.1 and later.

prefetch

Specifies whether to determine the URL target based on an internal determination instead of navigating to the target location.

  • false — No.

  • true — Yes. If analysistype is set to 2 for sandbox analysis, prefetch must be set to true.

If you do not pass prefetch value in options field, this is set to true as a default value.

Note

This submission option is applicable for the version 10.0.1 and later.

params

Command line parameter(s) to be used by detection engine when running the file.

Mainly applicable to exe files. For example, setting param to "start -h localhost -p 5555" will make the detection engine run a file med "malicious.exe" as "malicious.exe start- h localhost -p 5555".

Note

This submission option is applicable for the version 10.0.1 and later.

profile

Specifies the OS profile to which the file will be submitted for analysis.

Note

This submission option is applicable for the version 11.0 and later.

application

Specifies the application or environment in which the file should be analyzed.

Note

This submission option is applicable for the version 11.0 and later.

Example request for a single file

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

Request headers:

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

Request Body:

MIME Type application/json

{"timeout":"500", "analysistype":"1"}

Submission response

After the Central Management System appliance receives the submission request, it forwards the submission request to the managed appliance. The managed 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 format.

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:

{"uuid":"57ee22a2-0ae2-44df-a8a4-a5fef41881cc","brokerId":"0CC47A39D7D0"}

cURL code sample: malware object 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.

a. cURL code sample

curl -qgsSkH "Content-Type: multipart/form-data"
--no-progress-bar
--header "X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-F "filename=@cygdrive/c/tmp/test.txt"
-F "options={\"timeout\":\"500\", "analysistype\":\"1\"}"
https://xxx.xxx.xxx.xxx:443/wsapis/mvx/v2.0.0/submissions

b. cURL code sample applicable for the version 10.0.1 and later

curl -qgsSkH 
--no-progress-bar 
--header 'X-FeApi-Token: IIf+fpkpS+Z8yuRfHsgpHIipTOKrbT3YiZPkKFHJ922EABE=' 
-H 'Accept: application/json' -H 'Content-Type: multipart/form-data' 
-F "options={\"analysistype\":\"2\",\"force\":\"true\",\"prefetch\":\"true\",\"priority\":\"low\",\"timeout\":\"500\",\"params\":\"malicious.exe start -h localhost -p 5555\"}" -F filename=@rules.yara 
https://10.128.36.179/wsapis/mvx/v2.0.0/submissions

c. cURL code sample applicable for the version 11.0 and later

curl -qgsSkH 
--no-progress-bar 
--header 'X-FeApi-Token: IAP9ADneMsrHKszRodHzu1GXhgS+ikzhxHoM/WosFqWkANM=' \> 
-H 'Accept: application/json' \> -H 'Content-Type: multipart/form-data' \> 
-F "options={\"timeout\":\"100\",\"profile_details\":[{\"profile\":\"win7-sp1m\",\"application\":\"2\"}],\"analysistype\":\"2\",\"force\":\"true\",\"prefetch\":\"0\",\"password\":\"test\"}" \> -F filename=@yara.sh 
https://172.16.177.113/wsapis/mvx/v2.0.0/submissions{"uuid":"67544767-ec79-47c6-9c6d-39012bea8e4a","brokerId":"0CC47AC04D32"}

The 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=@cygdrive/c/tmp/test.txt—This option includes the test.txt file as an attachment to the message body.

    Note

    This example assumes you are using a Windows PC and referencing the following file name and location: C:/tmp/test.txt. The file location cygdrive/c/tmp/test.txt is the Cygwin-defined POSIX-equivalent location and file.

  • -F "options={\"timeout\":\"500\", "analysistype\":\"1\"}"—This option defines the submission timeout value and analysis type for the file. For more information, see Submission options.

  • https://xxx.xxx.xxx.xxx:443/wsapis/mvx/v2.0.0/submissions—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.