FortiSandbox-3.2.2-JSON API Reference
FortiSandbox-3.2.2-JSON API Reference
Version 3.2.2
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
NSE INSTITUTE
https://training.fortinet.com
FORTIGUARD CENTER
https://fortiguard.com/
FEEDBACK
Email: [email protected]
JSON API 5
API Messages 5
1. Login 5
2. Logout 6
3. Get system information 6
4. Get configurations of sniffer 8
5. General options, including cloud upload and VM network access settings 8
6. Set configurations of sniffer 9
7. Set general options, including cloud upload and vm network access settings 10
8. Get scanning statistics for last 7 days 11
9. Get a copy of backed up config file, in base64 format 12
10. Query file verdict through its SHA256 checksum 13
11-1. Upload file (on-demand submit for filesize < 20MB) 15
11-2. Upload large file (on-demand submit for filesize > 20MB) 16
12. Upload URL file (on-demand submit) 17
13. Query file rating through its SHA256 checksum—a simple version 18
14. Query URL rating 19
15. Query job verdict detail through its job ID 20
16. Cancel a job submission 22
17. Get job ID list for one submission 23
18. Get job behavior details for a file 23
19. Register (login) a FGT/FML/(others) device to FortiSandbox 24
20. Delete (actually hide) a device from FortiSandbox 25
21. Get malware package, malicious URL package, or botnet package 26
22. Download list of SHA256, SHA1, MD5, or URL from malware package or URL
package 27
23. Get AV-Rescan results 28
24. Return all installed VM name and their clone number 30
25. Allow user to add/delete checksums to allow/block (white/black) list 31
26. Mark a sample as false negative/false positive 32
27. Configure system hostname 33
28. Configure system timezone 33
29. Configure system time and NTP server 36
30. Configure system interface 36
31. Configure system DNS 37
32. Configure system routing 38
33. Configure system administrator 39
34. Configure system LDAP 40
35. Configure system RADIUS 41
36. Configure system FortiGuard 42
37. Configure system mail 43
38. Configure system log server 45
39. Configure scan profile 46
40. Configure scan benign URLs 47
41. Configure scan job archive 48
42. Configure YARA rule 49
FortiSandbox provides customers the ability to automate some key features and processes using a simple API. This
section will provide some basic examples that will allow you to submit a file or URL, as well as query the FortiSandbox
for the results of a scan.
Using this API can allow you to extend the functionality of your FortiSandbox in many ways. Some potential scenarios
you may wish to use the API for include:
l Submitting files using a simple script: you may have a large number of files you want to scan outside of regular
operating hours. These could be previously-quarantined files captured through your endpoint clients. By writing a
simple submission script, you eliminate the need to have someone physically submit these through the GUI.
l Submitting files from third-party tools: you may have other infrastructure in place (threat feeds, etc.) that you want
to integrate with your FortiSandbox. The API would allow you to submit files and query results in near real-time.
API Messages
In the following API, the "message" field value can be "INVALID_JSON_DATA", "MISSING_PARAM", "INVALID_
REQUEST", or "UNSUPPORTED_VER"
1. Login
log in request.
{
"method": "exec",
"params": [
{
"url": "/sys/login/user",
"data": [
{
"user": "admin",
"passwd": "123456"
}
]
}
],
"id": 1,
"ver": "2.0"
},
log in response.
{
"id": 1,
"ver": "2.0",
"result": {
"url": "/sys/login/user",
"status": {
"code": 0,
"message": "OK"
},
},
"session":"gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI="
}
2. Logout
{
"url": "/sys/status",
}
],
"session":"gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 3,
"ver": "2.0"
}
"ver": "2.0",
"result": {
"url": "/config/scan/options",
"status": {
"code": 0,
"message": "OK"
},
"data": {...}
}
}
data "cloud_upload" : 1,
/*1- enabled, 0-disabled */
"vm_network_access" : 1 ,
/*1- enabled, 0-disabled */
"log_device_submission" : 1 ,
/*1- enabled, 0-disabled */
"rej_dup_device_submission" : 1 ,
/*1- enabled, 0-disabled */
"del_clean_file" : 10 ,
/*-1- disabled, >0 delete after x minutes */
"del_job_info" : 10,
/*-1- disabled, >0 delete after x minutes */
"archive_job" : 1
/*0- disabled, 1- enabled */
"ver": "2.3.1"
}
{
"id": 6,
"ver": "2.3.1",
"result": {
"url": "/config/scan/devsniffer",
"status": {
"code": 0,
"message": "OK"
}
}
}
7. Set general options, including cloud upload and vm network access settings
{
"method": "set",
"params": [
{
"url": "/config/scan/options",
"cloud_upload" : 1,
"fdn_stats_upload" : 1,
"vm_network_access" : 1,
"vm_gateway": "172.17.58.3",
"vm_dns": "8.8.8.8",
"vm_proxy_enable": 1,
"vm_proxy_server": "172.17.17.17",
"vm_proxy_port": "8080",
"vm_proxy_type": "0",
/* "0":HTTP Connect, "1":HTTP Relay, "2":Sockv4, "3":Sockv5 */
"vm_proxy_uname": "admin",
"vm_proxy_password": "admin123",
"vm_proxy_debug": 0,
/* all vm_* options are not configurable for AWS model */
"url_callback_detection" : 1,
/* url_callback_detection is not configurable for AWS model */
"url_submit_webfilter" : 1,
"log_device_submission" : 1,
"rej_dup_device_submission" : 1,
"/* 1-yes, 0-no */
"del_clean_file" : 10 ,
"del_bad_file" : 10 ,
"del_job_info" : 10,
"del_bad_job_info" : 10
"default_password" : ["mypassword1", "mypassword2"]
"default_pdf_office_password" : "mypassword1"
"disable_cloud_query" : 1
"disable_av_rescan" : 1
"log_adapter_submission" : 1
"log_netshare_submission" : 1
"log_icap_submission" : 1
"log_bcc_submission" : 1
}
],
"session":"gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 7,
"ver": "2.4.1"
}
{
"id": 7,
"ver": "3.0.2"
"result": {
"url": "/config/scan/options",
"status": {
"code": 0,
"message": "OK"
}
}
}
data "malicious" : 1,
/* total # of malicious files detected in last 7 days, or -1, which means n/a
*/
/*If 'period' is provided, the data is from 'period' ago to now. Otherwise,
the data is for last 7 days. */
"suspicious_high" : 2,
/* total # of high-risk suspicious files detected in last 7 days, or -1, which
means n/a */
/*If 'period' is provided, the data is from 'period' ago to now. Otherwise,
the data is for last 7 days. */
"suspicious_medium" : 3,
/* total # of medium-risk suspicious files detected in last 7 days, or -1,
which means n/a */
/*If 'period' is provided, the data is from 'period' ago to now. Otherwise,
the data is for last 7 days. */
"suspicious_low" : 4,
/* total # of low-risk suspicious files detected in last 7 days, or -1, which
means n/a */
/*If 'period' is provided, the data is from 'period' ago to now. Otherwise,
the data is for last 7 days. */
"pending" : 5,
/* total # of pending jobs, or -1, which means n/a */
"processing" : 6,
/* total # of currently processing jobs, or -1, which means n/a */
data "file":"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBv
bmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz
IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBh
bmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhl
IG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ug
b2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFu
ZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yg
a25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9ydCB2
ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3Vy
ZS4="
/*backup config file content, in base64 encoding. Client side should
decode it then save to a file
"untrusted": 1,
"now":1377618931
"ftype": "[file_type1, file_type2]"
}
}
}
jid For a zip file, the result is an array of children's job ids. If jid is [] and rating is ["Clean"], it means the
file is not a supported file type and the file is dropped. In this case, start_ts and finish_ts will be the
UTC time the file is dropped.
rating For a zip file, the result is an array of of the following, which denotes types of ratings of its children:
l Unknown,
l Clean,
l Malicious,
l High Risk,
l Medium Risk,
l Low Risk,
score For a zip file, the result is the bitwise combination of the following:
l RISK_CLEAN=0
l RISK_MALICIOUS=1
l RISK_HIGH=2
l RISK_MEDIUM=3
l RISK_LOW=4
false_ 0: not false positive or false negative, 1: false positive, 2: false negative, order is corresponding
positive_ order of JID
negative
file Encoded (base64) file contents (binary). Max. allowed file size is 200M
filename Encoded (base64) filename in which 'file' field's content will be saved on FSA
skip_steps Do not use this parameter if no step to skip. 1 = Skip AV, 2= Skip Cloud, 4= Skip sandboxing,
8= Skip Static Scan.
overwrite_vm_list All VM name can be available by another JSON API /alert/ondemand/hcmvminfo. The clone
number of those VMs should be bigger than zero, the JSON API /alert/ondemand/hcmvminfo
handles it. If this field is not set, default ones will be used.
archive_password (Optional) Provide password(s) if it is needed for extracting archived file. Otherwise, ignore
this field, or leave it as empty string. Multiple passwords are seperated by "\n". Non-ASCII
passwords are invalid.
malpkg (Optional) set the value as "1" to require to add the sample to malware package if it satisfy
the malware critia. By default, the value is "0".
meta (Optional) meta_filename (base64_encoded) is file name from FGTs. meta_url (base64_
encoded) is URL sending from FGTs.
sid The id for this submission that user can use to cancel pending jobs from it
11-2. Upload large file (on-demand submit for filesize > 20MB)
{
"file": filepath 'application/octet-stream'
"data" : {
"url": "/alert/ondemand/submit-file",
"type": "file",
"skip_steps": "",
"overwrite_vm_list": "",
"malpkg": 0,
"vrecord": "0",
"forcedvm": 0,
"enable_ai": 0,
"archive_password": "",
"timeout": "3600",
"meta_url": "",
"meta_filename": "",
"session": ""
}
{
"id": 0,
"result": {
"data": {
"error": "",
"msg": "File was submitted successfully",
"sid": [the_submission_id]
},
"status": {
"code": 0,
"message": "OK"
},
"url": "/alert/ondemand/submit-file"
},
"ver": "3.0"
}
file Encoded (base64) file contents (binary). The file should contain a list of URL, one per line.
Each URL should have lenth less of 1.5K Bytes
filename Encoded (base64) filename into which 'file' field's content will be saved on FSA
timeout How long the scan will be, in seconds. This is a subjective number. For example,if the web
site has many pages, or the the network bandwidth to the web site is slow, timeout value
should be bigger
depth The depth of web links to scan. 0 is the origianl URL, 1 is to crawl into links in the orignal URL
also
overwrite_vm_list All VM name can be available by another RPC JSON API /alert/ondemand/hcmvminfo. The
clone number of those VMs should be bigger than zero, the RPC JSON API
/alert/ondemand/hcmvminfo handles it. If this field is not set, default ones will be used
malpkg (Optional) set the value as "1" to require to add the sample to malware package if it satisfy
the malware critia. By default, the value is "0".
sid The id for this submission that user can use to cancel pending jobs from it
13. Query file rating through its SHA256 checksum—a simple version
{
"method": "get",
"params": [
{
"url": "/scan/result/filerating",
"checksum":"the_files_checksum",
"ctype":"sha1"
}
],
"session":"gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 13,
"ver": "2.1"
}
{
"id": 13,
"ver": "2.1",
"result": {
"url": "/scan/result/filerating",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"rating" : ["Malicious","High Risk"],
"start_ts": 1377618931,
"finish_ts":1377618961
"untrusted": 1,
"now":1377618931
}
}
}
rating For a zip file, the result is an array of of the following, which denotes types of ratings of its
children:
l Unknown,
l Clean,
l Malicious,
l High Risk,
l Medium Risk,
l Low Risk,
For a single file, array size is 1. If rating is ["Clean"] and start_ts =0 and finish_ts =0, it means
the file is not a supported file type and the file is dropped
"behavior_info":0
},
{
"url" : "http://www.abc.com",
},]
}
}
address Need to be an exact match. It's fine to leave out the http(s):// prefix
rating Unknown,
Clean,
Malicious,
High Risk,
Medium Risk,
Low Risk,
For a single file, array size is 1
"result": {
"url": "/scan/result/job",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"rating" : "Malicious"
"score" : 1,
"sha256": "the_files_sha256_checksum",
"sha1": "the_files_sha1_checksum",
"start_ts": 1377618931,
"finish_ts":1377618961
"malware_name": "virus name",
"vid": virus_id,
"detection_os": "[os_name1, os_name2]",,
"rating_source":
"catetory": "Backdoor",
"untrusted": 1,,
"now":1377618931,,
"detail_url": "the_job_detail_page_link",
"download_url": "eNrLKCkpsNLXN7Q00jM0s9AzN9AztDDRT0ss1",
"false_positive_negative": 0
"ftype": "[file_type1, file_type2]"
}
}
}
l Clean,
l Malicious,
l High Risk,
l Medium Risk,
l Low Risk,
l RISK_MALICIOUS=1
l RISK_HIGH=2
l RISK_MEDIUM=3
l RISK_LOW=4
rating_source One of "AV Scan", "Cloud Query", "Sandboxing", "Static Scan", "Other"
catetory One of: 'Clean', 'Unknown', 'Infector', 'Worm', 'Botnet', 'Hijack', 'Stealer', 'Backdoor', 'Injector',
'Rootkit', 'Adware', 'Dropper', 'Downloader', 'Trojan', 'Riskware', 'Grayware', or 'Attacker'.
false_positive_ Not false positive or false negative, 1: false positive, 2: false negative
negative
sid The submission id got from submit-file. The command is useful if a file containing a big
number of urls takes long time to scan and needs to be cancelled
sid The submission ID got from submit-file. The command is get all job ids associated with one
submission
total_jids Total number of jobs for the submission. The maximum number of subfiles in the archive is
1000.
}
{
"id": 18,
"ver": "3.1"
"result": {
"url": "/scan/result/get-job-behavior",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"behavior_files" : "TWFuIGlzIGRpc3Rpbmd1aXxxxx"
}
}
}
behavior_files Behavior files in JSON format, archived in gz format and base64 encoded. If the queried file
is an archive file, the children's job behaviors will be combined to one file, then zipped.
}
{
"id": 19,
"ver": "2.0"
"result": {
"url": "/scan/device/device-login",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"device_id" : 1,
"serial" : "Device_SN"
}
}
}
vdom root is default vdom, other vdom name will inherit this device.
authorize data = 1 authorized directly without FSA admin to authorize manually, 0 otherwise
},
"data": {
"delete_name" : "Device_Name",
}
}
}
remove_scan_ data = 1, delete this device and all related scan results in DB, 0 otherwise.
results
}
}
}
}
type 0:FSA_FILE_MALWARE_PKG;
1:FSA_FILE_URL_PKG;
2:FSA_FILE_BOTNET_PKG;
4:Malware Package. Pure maliciuos level;
5:Malware Package. Mliciuos + High level;
6:Malware Package. Mliciuos + High + Medium level;
7:URL Package. Pure maliciuos level;
8:URL Package. Mliciuos + High level;
9:URL Package. Mliciuos + High + Medium level;
100:All malware Packages at once;
101:All malware URL Packages at once
all_pkgs If type is 100 all_pkgs contains content for type 0,4,5,6; if type is 101, all_pkgs contains
content for type 1,7,8,9
22. Download list of SHA256, SHA1, MD5, or URL from malware package or URL
package
{
"method": "post",
"params": [
{
"url": "/scan/device/download-malpkg-text",
"type":0,
"lazy":0,
"major":2,
"minor":100
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 22,
"ver": "2.4.1"
}
{
"id": 22,
"ver": "2.4.1"
"result": {
"url": "/scan/device/download-malpkg-text",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"download_file" : "TWFuIGlzIGRpc3Rpbmd1aXxxxx",
"md5sum" : "b0ed36a4b6282b566328a...",
"major":2,
"minor":101
}
}
}
type 0:SHA256;
1:SHA1;
2:MD5;
3:URL;
4:FILE HASH STIX; (ignore version number)
5:URL STIX; (ignore version number)
lazy 0: use specified major and minor number; 1: get the latest version.
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 23,
"ver": "2.1"
}
{
"id": 23,
"ver": "2.1"
"result": {
"url": "/scan/result/get-avrescan",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"avadb_ver" : "00028.00854",
"rescan_list" : [
{"rating" : "Malicious",
"score" : 1,
"sha256": "the_files_sha256_checksum",
"sha1": "the_files_sha1_checksum",
"start_ts": 1377618931,
"finish_ts":1377618961
"malware_name": "virus name",
"vid": virus_id,
"detection_os": "[os_name1, os_name2]",
"rating_source": "AV Scan",
"catetory": "Backdoor",
"untrusted": 1,
"now":1377618931,
"detail_url": "the_job_detail_page_link",
"download_url": "eNrLKCkpsNLXN7Q00jM0s9AzN9AztDDRT0ss1",
"false_positive_negative": 0
"ftype": "[file_type1, file_type2]"
},
]
}
}
}
l 'Clean',
l 'Malicious',
l 'High Risk',
l 'Medium Risk',
l 'Low Risk'
l RISK_MALICIOUS=1
l RISK_HIGH=2
l RISK_MEDIUM=3
l RISK_LOW=4
rating_source One of
l "AV Scan",
l "Cloud Query",
l "Sandboxing",
l "Static Scan",
l "Other"
category One of: 'Clean', 'Unknown', 'Infector', 'Worm', 'Botnet', 'Hijack', 'Stealer', 'Backdoor', 'Injector',
'Rootkit', 'Adware', 'Dropper', 'Downloader', 'Trojan', 'Riskware', 'Grayware', or 'Attacker'.
false_positive_ 0: not false positive or false negative, 1: false positive, 2: false negative
negative
"ver": "2.2"
}
{
"id": 24,
"ver": "2.2"
"result": {
"url": "/alert/ondemand/hcmvminfo",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"vm-list":[
{"id": 4,
"name": "WINXPVM1",
"version": 6,
"clonenum": 2,
"status":"activated"
},
{"id": 8,
"name": "WIN7X86VM",
"version": 6,
"clonenum": 2,
"status":"activated"
},
...
]
}
}
}
"result": {
"url": "/scan/policy/black-white-list",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"msg": "The action (append) was executed successfully for (white) list",
"error": "",
"download_file":"dGhpcyBpcyBhIHRlc3QhCg==",
}
}
}
checksum_type The checksum_type should only be in ["md5", "sha1", "sha256", "domain", "url", "url_regex"].
action The action should only be in ["append", "replace", "clear", "download", "delete"].
upload_file Encoded (base64) file contents (checksum). Maximum allowed file size is 200M
}
}
"method": "post",
"params": [
{
"url": "/config/system/timezone",
"tzid": "new_tzid",
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 28,
"ver": "2.3"
}
timezones = [
{
"id": 28,
"ver": "2.3"
"result": {
"url": "/config/system/timezone",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"timezone": "(GMT-8:00)Pacific Time(US&Canada)",
"msg": "Timezone was changed to (GMT-8:00)Pacific Time(US&Canada) successfully",
"error": "",
}
}
}
"http_access: "0",
"ssh_access": "0",
"telnet_access": "0",
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 30,
"ver": "2.3"
}
{
"id": 30,
"ver": "2.3"
"result": {
"url": "/config/system/interface",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"msg": "Network interface configuration was successfully updated",
"error": "",
}
}
}
ipv6 Optional
"ver": "2.3"
"result": {
"url": "/config/system/dns",
"status": {
"code": 0,
"message": "OK"
},
"data": {
"msg": "DNS configuration was successfully updated.",
"error": "",
}
}
}
},
"data":{
"msg": "New LDAP server was successfully added.",
"error": "",
}
}
}
},
"data": {
"msg": "New RADIUS server was successfully added.",
"error": "",
}
}
}
"ver": "2.3"
}
{
"id": 36,
"ver": "2.3"
"result": {
"url": "/config/system/fortiguard",
"status": {
"code": 0,
"message": "OK"
},
"data":{
"msg": "FortiGuard service was successfully updated.",
"error": "",
}
}
}
"pdf_sum_receiver":"",
"pdf_detail_receiver":"",
"report_schedule_type":"",
"report_week_day":"",
"report_hour_step":"",
"report_day_hour":"",
"report_week_hour":"",
"report_period_days":"",
"report_period_hours":"",
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 37,
"ver": "2.3"
}
{
"id": 37,
"ver": "2.3"
"result": {
"url": ""/config/system/mail",
"status": {
"code": 0,
"message": "OK"
},
"data":{
"msg": "Mail configuration was successfully updated.",
"error": "",
}
}
}
mail_rating_filter It has to be an array of: 2: Malicious; 16: High Suspicious; 8: Medium Suspicious; 4: Low
Suspicious
report_rating_filter It has to be an array of: 2: Malicious; 16: High Suspicious; 8: Medium Suspicious; 4: Low
Suspicious
alert_clean '0':disabled, '1': Alert logs will include jobs with Clean rating.
}
}
}
depth 0, 1, 2, 3, 4 or 5
vmexts exts Combinations of the following list : exe, php, tiff, 7z, gif, png, tnef, asf, htm, ppsx, unk, cdf,
ico, ppt, vcf, com, jpeg, pptx, xls, com1, jpg, qt, xlsx, dll, mov, rar, zip, doc, mp3, rm, docx,
mp4, rtf, pdf, swf, jar, dotx, docm, dotm, xltx, xlsm, xltm, xlsb, xlam, potx, sldx, pptm, ppsm,
potm, ppam, sldm, onetoc, thmx, bat, cmd, vbs, ps1, js, tar, gz, xz, bz2, arj, cab, tgz, txt, z,
msi, msg, asp, jsp, kgb, url, dot, xlt, pps, pot, upx, apk, WEBLink, lnk, jarlib, lzh
"Grayware":"suspicious",
"Hacking":"suspicious",
"Homosexuality":"benign",
"Illegal or Unethical":"benign",
"Marijuana":"benign",
"Nudity and Risque":"benign",
"Occult":"benign",
"Other Adult Materials":"benign",
"Plagiarism":"benign",
"Pornography":"benign",
"Tobacco":"benign",
"Weapons (Sales)":"benign",
},
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 40,
"ver": "2.3"
}
{
"id": 40,
"ver": "2.3"
"result": {
"url": "/config/scan/benign_url",
"status": {
"code": 0,
"message": "OK"
},
"data":{
"msg": "Benign URL configuration was successfully updated.",
"error": "",
}
}
}
"filename":"0",
"folder":"0",
"metadata":1,
"tracerlog":1,
"malicious":1,
"suspicious":1,
"clean_rating":1,
"other":1,
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 41,
"ver": "2.3"
}
{
"id": 41,
"ver": "2.3"
"result": {
"url": "/config/scan/job_archive",
"status": {
"code": 0,
"message": "OK"
},
"data":{
"msg": "Archive configuration was successfully updated.",
"error": "",
}
}
}
sharetype 0:SMBv1.0,1:SMBv2.0,2:SMBv2.1,3:SMBv3.0,4:FIFS,5:NFSv2,6:NFSv3,7:NFSv4,8:Azure
File Share, 9:S3 Bucket
"yara_id":"2880877873479829661",
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 42,
"ver": "2.4"
}
{
"id": 42,
"ver": "2.4"
"result": {
"url": "/config/scan/yara",
"status": {
"code": 0,
"message": "OK"
},
"data":{
"yara_id": "2880877873479829661",
"msg": "Yara configuration was successfully updated.",
"error": "",
}
}
}
file_type "any", "exe", "dll", "com", "ppt", "pptx", "xls","xlsx", "doc", "docx", "msg", "rtf", "pdf", "swf"
"id": 43,
"ver": "2.4"
"result": {
"url": "/scan/result/multifile",
"status": {
"code": 0,
"message": "OK"
},
"data":[{
"checksum": "f5e17ed3be9e9fa12360d67af93b33ac8299434369714b44f4c0482432b41b6e",
"kidsum": 1,
"sid": 3108940681876575659,
"job_list": [
{"jid": 3110452159542566741,
"rating" : "Malicious",
"score": 1,
"start_ts": 1377618931,
"finish_ts":1377618961,
"rsrcid": "AV Scanner",
"malware_name": "virus 1",
"vid": virus_id_1,
"behavior_info": 0,
"false_positive_negative": 0,
"untrusted": 1,
"ftype": "Unknown",
},
{"jid": jid_2,
"rating" : "High Risk",
"score": 1,
"start_ts": 1377618931,
"finish_ts":1377618961,
"malware_name": "virus 2",
"vid": virus_id_2,
"behavior_info": 1,
"false_positive_negative": 2,
"untrusted": 0,
"ftype": "Unknown",
},
],
"now":1377618931
},
{
"checksum": "b34af9dc65a3fe82ade27fae290df13a087c4f532272ce3dcb5f851d31db2c04",
"now":1377618931,
},
]
}
}
job_list For a zip file, the result is an array of children's job ids. If jid is [] and rating is ["Clean"], it
means the file is not a supported file type and the file is dropped. In this case, start_ts and
finish_ts will be the UTC time the file is dropped.
rating For a zip file, the result is an array of of the following, which denotes types of ratings of its
children:
Unknown,
Clean,
Malicious,
High Risk,
Medium Risk,
Low Risk,
For a single file, array size is 1
score For a zip file, the result is the bitwise combination of the following:
RISK_UNKNOWN=0
RISK_CLEAN=1
RISK_MALICIOUS=2
RISK_LOW=4
RISK_MEDIUM=8
RISK_HIGH=16
For a single file, it will be one of above value
false_positive_ 0: not false positive or false negative, 1: false positive, 2: false negative, order is
negative corresponding order of JID
45. Get configured user defined file extensions and exclusion list of user
configured file extensions
{
"method": "get",
"params": [
{
"url": "/config/scan/file_exts"
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 45,
"ver": "2.4"
}
{
"id": 45,
"ver": "2.4"
"result": {
"url": "/config/scan/file_exts",
"status": {
"code": 0,
"message": "OK"
},
"data":{
"user-defined-exts": "ext1 ext2 ext3 mydef",
"exclusion-list": "docx pdf"
}
}
}
}
}
"method": "get",
"params": [
{
"url": "/scan/result/jids",
"score": job score,
"start_ts": "2018-01-01 16:00:00", start time
"end_ts": "2018-01-01 17:00:00", end time
}
],
"session": "gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI=",
"id": 52,
"ver": "2.5"
}
{
"id": 52,
"ver": "2.5"
"result": {
"url": "/scan/result/jids",
"status": {
"message": "OK"
"code": 0,
},
"data":{
"jid": [],
}
}
}
{
"id": 53,
"ver": "2.3",
"result": {
"url": "/sys/login/token",
"status": {
"code": 0,
"message": "OK"
}
}
"session":"gzKj2PsMZ+4Hhs8Q9Ra+br+YStvpqWz\/8e291G1j1GI="
}