The URL below is to upload a file/web URL for dynamic analysis by using the provided Analyzer Profile. Only single file/web URL can be submitted at a time.
Resource URL
POST https://<TIS_IP>/php/fileupload.php
The following HTTP headers should be specified in the resource URL request:
Accept: application/vnd.ve.v1.0+json
VE-SDK-API: Base64 encoded "session:user id" string
Note
You can specify an optional
Expect:parameter in the HTTP header.You can specify an optional
skipTaskId:(string - 1 or 0) in REST API. The performance of Intelligent Sandbox improves for version 1.5.0 and above, as REST client adds the new optional request parameter:'skipTaskId':'1'. If endpoint products use'skipTaskId':'1', API returns the JSON response withtaskId -1along with actual Job Id, without waiting for thetaskIdfrom AMAS.Endpoint products need to use 64-bit integer instead of 32-bit for taskId.
Input parameters
Input parameter | Description |
|---|---|
| The name of the sample file. This parameter is optional for URL submissions. |
| Contains the following parameters defined in a json string.
For Examples:
|
Output parameters
Output parameter | Description |
|---|---|
| Contains json data with following parameters.
Important
|
Important
All subID (JobID) and taskID are in 64-bit which Intelligent Sandbox automatically handles, then fetches the needed responses.
Example
submitType: 0
Input
An example of data and amas_filename JSON string:
{'data': '{"data":{"xMode":0,"overrideOS": 1,"messageId":"","vmProfileList":"11","submitType":"0","url":""}, "filePriorityQ":"run_now" }'}
{'amas_filename':open('/clean_pdf.pdf','r')}
Client sends the input stream of sample to the fileupload.php. An example in Python:
postdata = {'data': '{"data":{"xMode":0,"overrideOS": 1,"messageId":"","vmProfileList":"11","submitType":"0","url":""}, "filePriorityQ":"run_now" }'}
file_up = {'amas_filename':open('/clean_pdf.pdf','r')}
file_upload_req =requests.post(url,postdata,files=file_up,headers=headers,verify=False)
Output
{"success":true,"subId": 72057594037928306,"mimeType": " application/pdf", "fileId": "","filesWait": 0,"estimatedTime": 0,"results": [{"taskId":754 ,"messageId": "","file": " clean_pdf.pdf","submitType": "0","url": "","destIp": null,"srcIp": "","md5": " F0F9F5762565782F62FED035584537D0","sha1": " 7F53D6A3DC01D30567049B11B264E1B551F7D0B7","sha256": " BD3C5441961707875CE5BE7A1497D44EC5C63250B4FD7577085B134571CE0AF7","size": " 144779", "cache":0}]}
submitType:1
Input
An example of data json string:
{'data': '{"data":{"xMode":0,"overrideOS":
1,"messageId":"","vmProfileList":"11","submitType":"1","url":"http://www.yahoo.com"}}'}
Client sends the input stream of sample to the fileupload.php. An example in Python:
postdata = {'data': '{"data":{"xMode":0,"overrideOS":
1,"messageId":"","vmProfileList":"12","submitType":"1","url":"http://news.google.co.in/"}}'}
upload_rest_req = requests.post(url,postdata,headers=headers,verify=False)
Output
{"success": true,"subId": 17,"mimeType": "text\/plain","filesWait": 1,"estimatedTime":
0,"results": [{"taskId": 23,"messageId": "","file": "URL1419314922.url","submitType":
1,"url": "http: \/\/news.google.co.in\/","destIp": null,"srcIp": null,"md5":
"839f551f97e669dddb348bddb907d32c","sha1": "D9C1CB1FCD53530212317800CC1B935657042CDF","sha256": "9A33B63558EE78AFA9A4DFD063B6B118ADFC455E20C2752B7F7977F88C2361CD","size": 25}]}
submitType:2
Input
An example of data and amas_filename json string:
{'data': '{"data":{"vmProfileList":"1","messageId":"06488b1b-8dbe-a4c3-94cb-a129552af5dd","submitType":2,"url":"http://the.earth.li/~sgtatham/putty/latest/x86/"}’}{'amas_filename':open('/home/samples/vtest32.exe','r')}Client sends the input stream of sample to the fileupload.php. An example in Python:
postdata = {'data': '{"data":{"xMode":0,"overrideOS":
1,"messageId":"","vmProfileList":"12","submitType":"2","url":"http://the.earth.li/~sgtatham/
putty/latest/x86/"}}'}
file_up = {'amas_filename':open('/home/samples/vtest32.exe','r')}
upload_rest_req = requests.post(url,postdata,files=file_up,headers=headers,verify=False)
Output
{"success": true,"subId": 16,"mimeType": "application\/x-dosexec","filesWait":
1,"estimatedTime": 0,"results": [{"taskId": 22,"messageId": "","file":
"vtest32.exe","submitType": 2,"url": "http://the.earth.li/~sgtatham/putty/latest/
x86/","destIp": null,"srcIp": null,"md5": "e2cfe1c89703352c42763e4b458fc356","sha1": "D9C1CB1FCD53530212317800CC1B935657042CDF","sha256": "9A33B63558EE78AFA9A4DFD063B6B118ADFC455E20C2752B7F7977F88C2361CD","size":45056}]}
submitType:3
Input
An example of data json string:
{'data': '{"data":{"xMode":0,"overrideOS":1,"messageId":"","vmProfileList":"11","submitType":"3","url":"http://10.213.248.238/Automation/vtest32.exe"}}'}Output
{"success": true,"subId": 210,"mimeType": "text\/plain","filesWait": 1,"estimatedTime":
0,"results": [{"taskId": -1,"file": "URL1418981249.url","md5":
"67b32fa8adaa0ae9025920c775615b96","sha1": "D9C1CB1FCD53530212317800CC1B935657042CDF","sha256": "9A33B63558EE78AFA9A4DFD063B6B118ADFC455E20C2752B7F7977F88C2361CD","size": "44"}]}
Note
If skip analysis feature is enabled and a previously analyzed file has been submitted, then the API response is as follows.
{"success": true, "subId": 28, "mimeType": "application/x-dosexec", "filesWait": 0,
"estimatedTime": 0, "results": [ {"taskId": 28, "file": "File was previously analyzed -
(vtest32.exe )", "md5": "E2CFE1C89703352C42763E4B458FC356","sha1": "D9C1CB1FCD53530212317800CC1B935657042CDF","sha256": "9A33B63558EE78AFA9A4DFD063B6B118ADFC455E20C2752B7F7977F88C2361CD","size": 45056} ]}