-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
950 lines (856 loc) · 31.6 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
openapi: 3.0.0
info:
description: |
Trellix Intelligent Sandbox (Former: Advanced Threat Defense) provides an Application Programming Interface
(API) framework for external applications to access core Trellix Intelligent Sandbox (former: ATD) functions through the REST protocol.
REST stands for Representational State Transfer. It relies on a stateless, client-server and cacheable communication protocol – HTTP. It is an architecture style for designing networked applications. RESTful applications use HTTP requests to post data (create and/or update), get data (query information) and delete data. Thus, REST uses HTTP for all CRUD (Create/Read/Update/Delete) operations. It is a lightweight alternative to mechanisms like RPC (Remote Procedure Calls) and Web Services such as SOAP and WSDL.
**NOTE: Make sure to tweak the input parameters according to your organizational needs.**
[Importing this document in Postman](https://learning.postman.com/docs/integrations/available-integrations/working-with-openAPI/)
[How to create SDK from this?](./README.md)
version: 1.0.0
title: Trellix Intelligent Sandbox
termsOfService: https://www.trellix.com/en-in/products/advanced-threat-defense.html
contact:
url: https://www.trellix.com/en-in/products/advanced-threat-defense.html
servers:
- url: https://<TIS_IP>/php
tags:
- name: Session
description: Operations about user session
- name: User management
description: |
Operations related to users in Trellix Intelligent Sandbox (Former: Advanced Threat Defense)
- name: Malware status management
description: |
Operations related to samples and their handling in Trellix Intelligent Sandbox (Former: Advanced Threat Defense)
paths:
/session.php:
#Login
get:
tags:
- Session
operationId: Login
summary: Login into your Trellix Intelligent Sandbox.
description: |
This URL allows a third party application to log on to Trellix Intelligent Sandbox (Former: Advanced
Threat Defense) API framework.
security:
- ve-sdk-api-login: []
deprecated: false
parameters:
- in: header
name: VE-API-Version
description: The API Version from which the user wants to connect (This is an optional header parameter)
required: false
schema:
type: string
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/#Response"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Logout
delete:
tags:
- Session
operationId: Logout
summary: Logout from Trellix Intelligent Sandbox.
description: |
This URL allows logging out from Trellix Intelligent Sandbox (Former: Advanced Threat Defense). <br/>It generates either a response or an error message. Proper logout must be performed in order to clear the session information; else, subsequent logon is not allowed until session timeout.
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/LogoutResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Heartbeat
/heartbeat.php:
get:
tags:
- User management
operationId: HeartBeat
summary: Information about user
description: |
This URL provides Trellix Intelligent Sandbox (Former: Advanced Threat Defense) availability information to the user.
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/HeartBeatResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#List the analyzer profiles
/vmprofiles.php:
get:
tags:
- User management
operationId: AnalyzerProfiles
summary: Display the analyzer profiles.
description: This URL is to display the analyzer profiles. Only the analyzer profiles to which the user has access are displayed
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/AnalyzerProfilesResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Task ID List
/getTaskIdList.php:
get:
tags:
- Malware status management
operationId: TaskIdList
summary: Fetches the list of task id's associated with a job id.
description: This URL fetches the list of task id's associated with a job id.
parameters:
- in: query
name: jobId
required: true
schema:
type: integer
description: Serves as an identifier for the previously submitted file.
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/TaskIdListResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Check Brief Status
/samplestatus.php:
get:
tags:
- Malware status management
operationId: BriefStatus
summary: This URL checks the analysis status.
description: |
Provides Trellix Intelligent Sandbox (Former: Advanced Threat Defense) analysis status to the user.
parameters:
- in: query
name: iTaskId
required: true
schema:
type: integer
description: This is the returned iTaskId value in the submission step.
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/BriefStatusResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Get report content
/showreport.php:
get:
tags:
- Malware status management
operationId: ReportContent
summary: Download the analysis report files.
description: This URL is used to selectively download the analysis report files.
parameters:
- in: query
name: md5
required: false
schema:
type: string
- in: query
name: iTaskId
required: false
schema:
type: integer
- in: query
name: jobId
required: false
schema:
type: integer
- in: query
name: iType
required: true
schema:
type: string
enum:
- "txt"
- "html"
- "json"
- "xml"
- "ioc"
- "stix"
# - "zip"
# - "pdf"
# - "sample"
description: File type of the output
#Priority is given to jobId
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/ReportContentResponse"
"400":
description: Bad request. Kindly provide any one of the following options - md5/iTaskId/jobId.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Users List
/briefUserList.php:
get:
tags:
- User management
operationId: UsersList
summary: Display the user profile information.
description: |
This URL displays the user profile information present on the Trellix Intelligent Sandbox (Former: Advanced Threat Defense).
parameters:
- in: query
name: userType
required: true
schema:
type: string
enum:
- "NSP"
- "MWG"
- "STAND_ALONE"
description: This is the usertype associated with a user profile. For example NSP, MWG, STAND_ALONE and so on.
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/UsersListResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Verify blacklisted and whitelisted hash values
/atdHashLookup.php:
post:
tags:
- Malware status management
operationId: VerifyHashValues
summary: Checks the status of hash value submitted by user.
description: This URL is to check if a user submitted hash value is either blacklisted or whitelisted. Only single hash value can be verified at a time.
requestBody:
required: true
content:
multipart/form-data:
schema:
required:
- data
type: object
properties:
data:
type: object
properties:
md5:
type: string
description: Valid value should look like this- '{"md5":"A3CCFD0AA0C17FD23AA9FD0D84B86C05"}'
description: Contains the following parameters defined in a json string.
md5- Any valid 32 digit hexadecimal number
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/VerifyHashValuesResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#File/URL submission
/fileupload.php:
post:
tags:
- Malware status management
operationId: FileSubmission
summary: Upload a file/URL for dynamic analysis.
description: The URL is used 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.
requestBody:
required: true
content:
multipart/form-data:
schema:
required:
- data
type: object
properties:
amas_filename:
type: string
format: binary
description: The name of the sample file.
This parameter is optional for URL submissions.
data:
type: object
properties:
data:
type: object
properties:
xMode:
type: boolean
description: Optional parameter with values either 0 or 1.
example: 0
overrideOS:
type: boolean
example: 1
messageId:
type: string
description: Maximum 128-character string
example: ""
vmProfileList:
type: integer
description: Analyzer profile ID. The profile ID number can be found in the UI Policy/Analyzer Profile page.
example: 11
submitType:
type: integer
description: This parameter accepts 4 values — '0', '1', '2' and '3'.
0 — Regular file upload
1 — URL submission — URL link is processed inside analyzer VM
2 — Submit file with URL
3 — URL Download — File from URL is first downloaded and then analyzed
example: 1
url:
type: string
description: Any valid web URL.
example: "http://www.yahoo.com"
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/FileSubmissionResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
#Bulk Sample Status
/getBulkStatus.php:
post:
tags:
- Malware status management
operationId: BulkStatus
summary: Find the status of bulk number of samples in a single query.
description: The Resource URL is to find the status of bulk number of samples in a single query.
requestBody:
required: true
content:
multipart/form-data:
schema:
required:
- data
type: object
properties:
data:
type: object
properties:
bulkrequest:
type: object
#description: This parameter is a json string which accepts following sub-parameters:-
properties:
numRequest:
type: integer
format: int 32
description: This is a numeric filed which contains the number of samples for which status is queried. The maximum value is 100.
jobIDs:
type: array
items:
type: integer
format: int 32
description: This is a numeric field which contains the number of samples for which status is queried. The maximum value is 100.
taskIDs:
type: array
items:
type: integer
format: int 32
description: This is a numeric field which contains the number of samples for which status is queried. The maximum value is 100.
deprecated: false
responses:
"200":
description: successful operation
content:
application/vnd.ve.v1.0+json:
schema:
$ref: "#/components/schemas/BulkStatusResponse"
"400":
description: Bad request, kindly check the input parameters.
"401":
description: Unauthorized user kindly check VE-SDK-API and try again for the same.
"404":
description: Resource not found.
"5XX":
description: Server error occured.
externalDocs:
description: |
Find out more about Trellix Intelligent Sandbox (Former: Advanced Threat Defense) APIs.
url: https://docs.trellix.com/en/bundle/trellix-intelligent-sandbox-5.0.x-api-reference-guide/page/GUID-F600CDC5-827A-4435-BD37-E0DF91810AB1.html
security:
- ve-sdk-api: []
components:
securitySchemes:
ve-sdk-api-login:
type: apiKey
in: header # can be "header", "query" or "cookie"
name: VE-SDK-API
description: Base64 encoded <b>'user name:password'</b> string
ve-sdk-api:
type: apiKey
in: header
name: VE-SDK-API
description: Base64 encoded <b>'session:userId'</b> string
schemas:
#Login
LoginResponse:
type: object
properties:
success:
type: boolean
example: true
results:
type: object
properties:
session:
type: string
description: Logged on session id.
userId:
type: string
description: Logged on user id.
apiVersion:
type: string
description: API version.
matdVersion:
type: string
description: |
Trellix Intelligent Sandbox (Former: Advanced Threat Defense) version.
serverTZ:
type: string
description: Server time zone.
isAdmin:
type: string
description: "Determines whether the user has admin privileges. <br />
IsAdmin- '1' – User has admin privileges. <br/>
IsAdmin- '0' – User does not have admin privileges."
example: 1
isCurrentAPI:
type: boolean
description: Check whether isCurrentAPI returns true or false.
example: 1
#HeartBeat
HeartBeatResponse:
type: object
properties:
success:
type: boolean
example: true
results:
type: object
properties:
session:
type: string
description: Logged on session id.
userId:
type: string
description: Logged on user id.
heartBeat:
type: string
description: The time in seconds when the response was returned.
#List the analyzer profiles
AnalyzerProfilesResponse:
type: object
properties:
success:
type: boolean
example: true
results:
type: array
items:
type: object
properties:
vmProfileid:
type: integer
example : 1
userid:
type: integer
example : 1
imageid:
type: integer
example : 10
maxExecTime:
type: integer
example : 180
minExecTime:
type: integer
example : 5
recursiveAnalysis:
type: integer
example : 1
name:
type: string
example : "winXp"
vmDesc:
type: string
example : "winXPsp3"
summary:
type: integer
example : 1
userLog:
type: integer
example : 1
asm:
type: integer
example : 1
locBlackList:
type: integer
example : 0
mfeAV:
type: integer
example : 1
reAnalysis:
type: integer
example : 0
gtiTS:
type: integer
example : 1
gam:
type: integer
example : 1
selectedOSName:
type: string
example : "winXPsp3"
sandbox:
type: integer
example : 1
internet:
type: integer
example : 0
#Logout
LogoutResponse:
type: object
properties:
success:
type: boolean
example: true
description: Success = true / false gives the logout success status.
results:
type: object
properties:
return:
type: integer
example: 0
description: |-
Return value. <br/>This value is 0 if logout is successful, otherwise an error message is returned.
#Task ID List
TaskIdListResponse:
type: object
properties:
success:
type: boolean
example: true
result:
type: object
properties:
taskIdList:
type: string
example: "201"
description:
If a zip file with two samples is submitted, then the response contains task id's of the two samples.<br/>
<br/>
If a single file is submitted, then the response contains a task id of the single sample.
#Check Brief Status
BriefStatusResponse:
type: object
properties:
success:
type: boolean
example: true
description : Success is true if the request is processed successfully else false.
results:
type: object
properties:
taskid:
type: integer
description: Task ID of the submitted sample file.
istate:
type: integer
description: istate is a numeric value as explained above.
status:
type: string
description: Current status of the sample.
example: waiting / analyzing / completed.
filename:
type: string
description: Name of the sample file.
md5:
type: string
description: |
The MD5 hash value of the sample file as calculated by Trellix Intelligent Sandbox (Former: Advanced Threat Defense).
vmProfile:
type: string
description: The internally assigned ID for the VM Profile that was used.
jobid:
type: integer
description: Job ID of the submitted sample file.
vmName:
type: string
description: VM name based on the operating system that was used for dynamic analysis.
vmDesc:
type: string
description: The user-provided description for the analyzer VM that was used for dynamic analysis.
#Get report content
ReportContentResponse:
type: string #TBD with ideal type string vs object
description: Content of the requested result file.
#Users List
UsersListResponse:
type: object
properties:
success:
type: boolean
example: true
results:
type: array
description: Contains array of json data with following parameters.
items:
type: object
properties:
idx:
type: integer
example: 5
description: This is the id assigned for the user profile [Unique Identifier of the user].
loginId:
type: string
example: "meg"
description: Login-id of the users.
userType:
type: string
example: "NSP"
description: This is the input parameter passed.
fullName:
type: string
example: "Virtual Network Security Platform"
description: Name associated with the user profile.
#Verify blacklisted and whitelisted hash values
VerifyHashValuesResponse:
type: object
properties:
success:
type: boolean
example: true
results:
type: object
example: "A3CCFD0AA0B17FD23AA9FD0D84B86C:w"
description: Displays input hash value and its corresponding character.<br/>
'w' — hash value is whitelisted by user.<br/>
'b' — hash value is blacklisted.<br/>
'0' — hash value is not in the whitelist or blacklist.<br/>
'j' — hash is submitted in last three days.<br/>
'Invalid input data' — invalid hash value.<br/>
The valuation is performed in the following order-<br/>
Check if it is 'b'. Return 'b' if it is the case.<br/>
Check if it is 'j'. Return 'j' if it is the case.<br/>
Check if it is 'w'. Return 'w' if it is the case.<br/>
Otherwise return '0'.
#File/URL submission
FileSubmissionResponse:
type: object
properties:
success:
type: boolean
example: true
subId:
type: integer
example: 72057594037928306
description: 64-bit JobId assigned for the sample.
mimeType:
type: string
example: "application/pdf"
fileId:
type: string
example: ""
filesWait:
type: integer
example: 0
description: Number of samples in waiting state.
estimatedTime:
type: integer
example: 0
description: Estimated time for the analysis to finish on the submitted sample.
results:
type: array
description: Contains json data with following parameters.
md5- MD5 hash value of the submitted sample.
items:
properties:
taskId:
type: integer
description: 64-bit ID assigned for the submitted sample. taskId is -1 for a .zip file and has the same value (-1), in case skipTaskId is enabled.
messageId:
type: string
example: ""
description: String that is sent in the request to identify the sample.
file:
type: string
example: "clean_pdf.pdf"
submitType:
type: string
example: "0"
description: This parameter accepts 4 values — '0', '1', '2' and '3'.
url:
type: string
example: ""
description: Any valid web URL.
destIp:
type: string
example: null
srcIp:
type: string
example: ""
md5:
type: string
example: "F0F9F5762565782F62FED035584537D0"
description: MD5 hash value of the submitted sample.
sha1:
type: string
example: "7F53D6A3DC01D30567049B11B264E1B551F7D0B7"
description: SHA-1 hash value of the submitted sample.
sha256:
type: string
example: "BD3C5441961707875CE5BE7A1497D44EC5C63250B4FD7577085B134571CE0AF7"
description: SHA-256 hash value of the submitted sample.
size:
type: string
example: "144779"
cache:
type: integer
example: 0
description: Determines whether the file was submitted for analysis in the past, and the corresponding action.
#Bulk Sample Status
BulkStatusResponse:
type: object
properties:
success:
type: boolean
example: true
results:
type: object
description: Contains json data with following parameters-
properties:
bulkresponse:
type: object
properties:
numResponse:
type: integer
format: int 32
description: This is a numeric value which represents number of samples status retrieved. This is equal to numRequest in the input data.
status:
type: array
description: This is an array of jobIDs/taskIDs with their analysis status and score.
items:
properties:
jobID:
type: integer
format: int 32
example: 4512
status:
type: integer
format: int 32
example: 5
description: JobID/taskID status displays following values-<br/>
-1 — not available <br/>
1 — accepted <br/>
2 — waiting <br/>
3 — analyzing <br/>
4 — xmode <br/>
5 — completed <br/>
6 — cancelled <br/>
7 — invalid <br/>
8 — discarded <br/>
score:
type: integer
description: The sample score defines the severity of the sample.
The score includes the following values- <br/>
-6 — Analysis not completed <br/>
-2 — Failed <br/>
-1 — Clean <br/>
0 — Unverified <br/>
1 — Informational <br/>
2 — Low <br/>
3 — Medium <br/>
4 — High <br/>
5 — Very High <br/>