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\,
}
| Sets the analysis priority. The default value is normal
NoteThis submission option is applicable for the version 10.0.1 and later. |
| Sets the analysis timeout (in seconds). |
| 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. |
| 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.
NoteThis submission option is applicable for the version 10.0.1 and later. |
| Specifies whether to determine the URL target based on an internal determination instead of navigating to the target location.
If you do not pass prefetch value in options field, this is set to true as a default value. NoteThis submission option is applicable for the version 10.0.1 and later. |
| 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". NoteThis submission option is applicable for the version 10.0.1 and later. |
| Specifies the OS profile to which the file will be submitted for analysis. NoteThis submission option is applicable for the version 11.0 and later. |
| Specifies the application or environment in which the file should be analyzed. NoteThis 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/submissionsb. 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/submissionsc. 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 thecurlrcconfig 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-soption, 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--headerswitch.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 theauth.txtfile. 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 thetest.txtfile 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 locationcygdrive/c/tmp/test.txtis 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 addressxxx.xxx.xxx.xxxwith the IP address of your appliance.
Results
The requested submission returns a submission key. This key is used to retrieve status and test results.