Ity lahatsoratra ity dia ho ilaina ho an'ireo izay zatra ny teknolojia Check Point amin'ny alàlan'ny emulation rakitra (Fandrahonana Emulation) ary fanadiovana rakitra mavitrika (Fandrahonana fitrandrahana) ary te-hanao dingana mankany amin'ny automatique ireo asa ireo. Misy ny Check Point
Fanafohezana fototra
Ny API fisorohana ny fandrahonana dia miasa miaraka amina singa telo lehibe, izay antsoina amin'ny API amin'ny alàlan'ireto soatoavina lahatsoratra manaraka ireto:
av - singa Anti-Virus, tompon'andraikitra amin'ny famakafakana sonia ny fandrahonana fantatra.
te - Ny singa Emulation fandrahonana, tompon'andraikitra amin'ny fanamarinana ny rakitra ao amin'ny boaty fasika, ary ny fanaovana didim-pitsarana ratsy/tsaratsara aorian'ny fakana tahaka.
fitrandrahana - Singan'ny Fandrahonana Fandrahonana, tompon'andraikitra amin'ny famadihana haingana ny antontan-taratasin'ny birao ho endrika azo antoka (izay esorina ny atiny rehetra mety hanimba), mba hanaterana azy ireo haingana amin'ny mpampiasa/rafitra.
Ny rafitra API sy ny fetra lehibe
Ny API fisorohana ny fandrahonana dia mampiasa fangatahana 4 ihany − mampakatra, manontany, misintona ary quota. Ao amin'ny lohatenin'ny fangatahana efatra dia mila mandefa ny lakile API ianao amin'ny fampiasana ny parameter alàlana. Raha vao jerena, ny rafitra dia mety ho toa tsotra kokoa noho ny in
Amin'izao fotoana izao, ny hany dikan-ny API fisorohana ny fandrahonana dia navoaka - 1.0; ny URL ho an'ny API antso dia tokony ahitana v1 amin'ny ampahany izay ilainao hamaritana ny dikan-teny. Tsy toy ny Management API, ilaina ny manondro ny dikan-teny API ao amin'ny URL, raha tsy izany dia tsy hotanterahina ny fangatahana.
Ny singa Anti-Virus, rehefa antsoina tsy misy singa hafa (te, extraction), amin'izao fotoana izao dia tsy manohana afa-tsy fangatahana fangatahana amin'ny fitambaran'ny hash md5. Ny fandrahonana fandrahonana sy ny fandrahonana fitrandrahana koa dia manohana sha1 sy sha256 hash sums.
Tena zava-dehibe ny tsy manao fahadisoana amin'ny fanontaniana! Ny fangatahana dia azo tanterahina tsy misy hadisoana, fa tsy tanteraka. Mibanjina kely, andeha hojerentsika izay mety hitranga rehefa misy lesoka/typos amin'ny fanontaniana.
Fangatahana misy typo miaraka amin'ny teny tatitra(reports)
{ "request": [
{
"sha256": {{sha256}},
"features": ["te"] ,
"te": {
"images": [
{
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
reportss: ["tar", "pdf", "xml"]
}
}
]
}
Tsy hisy hadisoana amin'ny valiny, fa tsy hisy fampahalalana momba ny tatitra mihitsy
{
"response": [
{
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
},
"sha256": "9cc488fa6209caeb201678f8360a6bb806bd2f85b59d108517ddbbf90baec33a",
"file_type": "pdf",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 10,
"images": [
{
"report": {
"verdict": "malicious"
},
"status": "found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"combined_verdict": "malicious",
"severity": 4,
"confidence": 3,
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
}
}
]
}
Fa ho an'ny fangatahana tsy misy typo amin'ny fanalahidin'ny tatitra
{ "request": [
{
"sha256": {{sha256}},
"features": ["te"] ,
"te": {
"images": [
{
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
reports: ["tar", "pdf", "xml"]
}
}
]
}
Mahazo valiny efa misy id momba ny fampidinana tatitra izahay
{
"response": [
{
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
},
"sha256": "9cc488fa6209caeb201678f8360a6bb806bd2f85b59d108517ddbbf90baec33a",
"file_type": "pdf",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 10,
"images": [
{
"report": {
"verdict": "malicious",
"full_report": "b684066e-e41c-481a-a5b4-be43c27d8b65",
"pdf_report": "e48f14f1-bcc7-4776-b04b-1a0a09335115",
"xml_report": "d416d4a9-4b7c-4d6d-84b9-62545c588963"
},
"status": "found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"combined_verdict": "malicious",
"severity": 4,
"confidence": 3,
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
}
}
]
}
Raha mandefa fanalahidin'ny API diso/ lany daty isika dia hahazo fahadisoana 403 ho valin'izany.
SandBlast API: amin'ny rahona sy amin'ny fitaovana eo an-toerana
Ny fangatahana API dia azo alefa any amin'ny fitaovana Check Point izay manana ny singa Fandrahonana Emulation (blade). Amin'ny maha-adiresy fangatahana dia mila mampiasa ny ip/url ny fitaovana sy ny port 18194 ianao (ohatra, https://10.10.57.19:18194/tecloud/api/v1/file/query). Tokony ho azonao antoka ihany koa fa ny politikan'ny fiarovana amin'ny fitaovana dia mamela an'io fifandraisana io. Fanomezana alalana amin'ny alàlan'ny fanalahidin'ny API amin'ny fitaovana eo an-toerana amin'ny alàlan'ny default NIALA ary ny fanalahidin'ny fanomezan-dàlana amin'ny lohatenin'ny fangatahana dia tsy azo alefa mihitsy.
Ny fangatahana API amin'ny rahona CheckPoint dia tokony halefa any te.checkpoint.com (ohatra - https://te.checkpoint.com/tecloud/api/v1/file/query). Ny fanalahidin'ny API dia azo alaina ho fahazoan-dàlana fitsapana mandritra ny 60 andro amin'ny alàlan'ny fifandraisana amin'ny mpiara-miombon'antoka Check Point na ny biraon'ny orinasa eo an-toerana.
Amin'ny fitaovana eo an-toerana, ny Threat Extraction dia tsy mbola tohanana ho fenitra.
Ny fitaovana eo an-toerana dia tsy mahazaka ny fangatahana quota.
Raha tsy izany dia tsy misy fahasamihafana eo amin'ny fangatahana amin'ny fitaovana eo an-toerana sy amin'ny rahona.
Alefaso ny antso API
Fomba ampiasaina − POST
Adiresy antso - https:///tecloud/api/v1/file/upload
Ny fangatahana dia misy ampahany roa (form-data): rakitra natao ho an'ny emulation/fanadiovana ary vata fangatahana misy lahatsoratra.
Ny fangatahana lahatsoratra dia tsy azo atao foana, fa mety tsy misy tefy. Mba hahombiazan'ny fangatahana dia tsy maintsy alefanao farafaharatsiny ireto lahatsoratra manaraka ireto ao amin'ny fangatahana:
Minitra takiana amin'ny fangatahana fampiakarana
HTTP POST
https:///tecloud/api/v1/file/upload
Lohateny:
fanomezan-dàlana:
Body
{
"fangatahana": {
}
}
File
File
Amin'ity tranga ity, ny rakitra dia hokarakaraina mifanaraka amin'ny mari-pamantarana default: singa - te, sary OS - Win XP sy Win 7, tsy mamorona tatitra.
Hevitra momba ny sehatra lehibe amin'ny fangatahana lahatsoratra:
anaran'ny fisie и file_type Azonao atao ny mamela azy ireo ho banga na tsy mandefa azy ireo mihitsy, satria tsy dia fampahalalana mahasoa loatra izany rehefa mampakatra rakitra. Ao amin'ny valin'ny API, ireo sehatra ireo dia ho fenoina ho azy araka ny anaran'ny rakitra alaina, ary ny fampahalalana ao amin'ny cache dia mbola tsy maintsy karohina amin'ny fampiasana ny habetsan'ny hash md5/sha1/sha256.
Ohatra fangatahana miaraka amin'ny anaran'ny rakitra sy ny karazana_file
{
"request": {
"file_name": "",
"file_type": "",
}
}
Toetoetra — lisitra izay manondro ny fiasa ilaina amin'ny fanodinana ao anaty boaty fasika - av (Anti-Virus), te (Threat Emulation), fitrandrahana (Threat Extraction). Raha toa ka tsy lany mihitsy io paramètre io, dia ny singa default ihany no ampiasaina - te (Threat Emulation).
Mba ahafahana manamarina ireo singa telo misy dia mila mamaritra ireo singa ireo amin'ny fangatahana API ianao.
Ohatra amin'ny fangatahana miaraka amin'ny fanamarinana av, te ary fitrandrahana
{ "request": [
{
"sha256": {{sha256}},
"features": ["av", "te", "extraction"]
}
]
}
Fanalahidy ao amin'ny fizarana te
sary - lisitra misy diksionera misy id sy laharan'ny fanavaozana ny rafitra miasa izay hanaovana ny fisavana. Ny ID sy ny laharan'ny fanavaozana dia mitovy amin'ny fitaovana rehetra eo an-toerana sy ny rahona.
Lisitry ny rafitra miasa sy fanavaozana
Misy OS Image ID
fanitsiana
Image OS sy Application
e50e99f3-5963-4573-af9e-e3f4750b55e2
1
Microsoft Windows: XP - 32bit SP3
Office: 2003, 2007
Adobe Acrobat Reader: 9.0
Flash Player 9r115 sy Active X 10.0
Java Runtime: 1.6.0u22
7e6fe36e-889e-4c25-8704-56378f0830df
1
Microsoft Windows7 - 32 bit
Office: 2003, 2007
Adobe Acrobat Reader: 9.0
Flash Player: 10.2r152 (Plugin& Active X)
Java Runtime: 1.6.0u0
8d188031-1010-4466-828b-0cd13d4303ff
1
Microsoft Windows7 - 32 bit
Office: 2010
Adobe Acrobat Reader: 9.4
Flash Player: 11.0.1.152 (Plugin & Active X)
Java Runtime: 1.7.0u0
5e5de275-a103-4f67-b55b-47532918fa59
1
Microsoft Windows7 - 32 bit
Office: 2013
Adobe Acrobat Reader: 11.0
Flash Player: 15 (Plugin & Active X)
Java Runtime: 1.7.0u9
3ff3ddae-e7fd-4969-818c-d5f1a2be336d
1
Microsoft Windows7 - 64 bit
Office: 2013 (32bit)
Adobe Acrobat Reader: 11.0.01
Flash Player: 13 (Plugin & Active X)
Java Runtime: 1.7.0u9
6c453c9b-20f7-471a-956c-3198a868dc92
1
Microsoft Windows8.1 - 64 bit
Office: 2013 (64bit)
Adobe Acrobat Reader: 11.0.10
Flash Player: 18.0.0.160 (Plugin & Active X)
Java Runtime: 1.7.0u9
10b4a9c6-e414-425c-ae8b-fe4dd7b25244
1
Microsoft Windows: 10
Office: Professional Plus 2016 en-us
Adobe Acrobat Reader: DC 2015 MUI
Flash Player: 20 (Plugin & Active X)
Java Runtime: 1.7.0u9
Raha toa ka tsy voatondro mihitsy ny lakile sary, dia hisy ny fakan-tahaka amin'ny sary natolotry ny Check Point (amin'izao fotoana izao Win XP sy Win 7). Ireo sary ireo dia atolotra mifototra amin'ny fiheverana ny fifandanjana tsara indrindra amin'ny fampisehoana sy ny tahan'ny fisamborana.
tatitra - lisitr'ireo tatitra angatahinay raha toa ka hita fa ratsy ilay rakitra. Misy ireto safidy manaraka ireto:
-
famintinana - arsiva .tar.gz misy tatitra momba ny emulation nataon'i ho an'ny rehetra sary nangatahana (samy pejy html sy singa toy ny horonan-tsary avy amin'ny OS emulator, fanariam-pifamoivoizana an-tambajotra, tatitra ao amin'ny json, ary ny santionany ao amin'ny arsiva voaaro amin'ny tenimiafina). Mitady ny fanalahidy amin'ny valiny izahay - summary_report ho an'ny fampidinana ny tatitra manaraka.
-
PDF - antontan-taratasy momba ny emulation in iray sary, izay efa zatra mahazo amin'ny alàlan'ny Smart Console. Mitady ny fanalahidy amin'ny valiny izahay - pdf_report ho an'ny fampidinana ny tatitra manaraka.
-
XML - antontan-taratasy momba ny emulation in iray sary, mety ho an'ny fanaparitahana masontsivana manaraka ao amin'ny tatitra. Mitady ny fanalahidy amin'ny valiny izahay - xml_report ho an'ny fampidinana ny tatitra manaraka.
-
tara - .tar.gz archive misy tatitra momba ny emulation in iray sary nangatahana (samy pejy html sy singa toy ny horonan-tsary avy amin'ny OS emulator, fanariam-pifamoivoizana an-tambajotra, tatitra ao amin'ny json, ary ny santionany ao amin'ny arsiva voaaro amin'ny tenimiafina). Mitady ny fanalahidy amin'ny valiny izahay - full_report ho an'ny fampidinana ny tatitra manaraka.
Inona no ao anatin'ny tatitra famintinana
Ny fanalahidy full_report, pdf_report, xml_report dia ao amin'ny rakibolana ho an'ny OS tsirairay
{
"response": [
{
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
},
"sha256": "9e6f07d03b37db0d3902bde4e239687a9e3d650e8c368188c7095750e24ad2d5",
"file_type": "html",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 10,
"images": [
{
"report": {
"verdict": "malicious",
"full_report": "8d18067e-b24d-4103-8469-0117cd25eea9",
"pdf_report": "05848b2a-4cfd-494d-b949-6cfe15d0dc0b",
"xml_report": "ecb17c9d-8607-4904-af49-0970722dd5c8"
},
"status": "found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
},
{
"report": {
"verdict": "malicious",
"full_report": "d7c27012-8e0c-4c7e-8472-46cc895d9185",
"pdf_report": "488e850c-7c96-4da9-9bc9-7195506afe03",
"xml_report": "e5a3a78d-c8f0-4044-84c2-39dc80ddaea2"
},
"status": "found",
"id": "6c453c9b-20f7-471a-956c-3198a868dc92",
"revision": 1
}
],
"score": -2147483648,
"combined_verdict": "malicious",
"severity": 4,
"confidence": 3,
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
}
}
]
}
Fa ny fanalahidin'ny summary_report - misy iray ho an'ny emulation amin'ny ankapobeny
{
"response": [
{
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
},
"sha256": "d57eadb7b2f91eea66ea77a9e098d049c4ecebd5a4c70fb984688df08d1fa833",
"file_type": "exe",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 10,
"images": [
{
"report": {
"verdict": "malicious",
"full_report": "c9a1767b-741e-49da-996f-7d632296cf9f",
"xml_report": "cc4dbea9-518c-4e59-b6a3-4ea463ca384b"
},
"status": "found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
},
{
"report": {
"verdict": "malicious",
"full_report": "ba520713-8c0b-4672-a12f-0b4a1575b913",
"xml_report": "87bdb8ca-dc44-449d-a9ab-2d95e7fe2503"
},
"status": "found",
"id": "6c453c9b-20f7-471a-956c-3198a868dc92",
"revision": 1
}
],
"score": -2147483648,
"combined_verdict": "malicious",
"severity": 4,
"confidence": 3,
"summary_report": "7e7db12d-5df6-4e14-85f3-2c1e29cd3e34",
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
}
}
]
}
Azonao atao ny mangataka tatitra tar sy xml ary pdf miaraka, afaka mangataka famintinana sy tar ary xml ianao. Tsy azo atao ny mangataka tatitra famintinana sy pdf miaraka.
Fanalahidy ao amin'ny fizarana fitrandrahana
Ho an'ny fitrandrahana fandrahonana dia fanalahidy roa ihany no ampiasaina:
fomba — pdf (miova ho pdf, ampiasaina amin'ny default) na madio (manadio votoaty mavitrika).
extracted_parts_codes - lisitry ny kaody hanesorana votoaty mavitrika, tsy azo ampiharina afa-tsy amin'ny fomba madio
Kaody hanesorana votoaty amin'ny rakitra
Code
Description
1025
Zavatra mifandray
1026
Macro sy Code
1034
Rohy saro-pady
1137
PDF GoToR Actions
1139
PDF Launch Actions
1141
PDF URI Actions
1142
PDF Sound Actions
1143
PDF Movie Actions
1150
PDF JavaScript Actions
1151
PDF Fandefasana Form Actions
1018
Fanontaniana momba ny data
1019
Zavatra mipetaka
1021
Fast Save Data
1017
Custom Properties
1036
Statistique Properties
1037
Famintinana Properties
Raha te-hisintona kopia nodiovina ianao dia mila manao fangatahana fangatahana (izay horesahina etsy ambany) aorian'ny segondra vitsy, mamaritra ny habetsaky ny rakitra sy ny singa fitrandrahana ao amin'ny lahatsoratra fangatahana. Azonao atao ny maka ny rakitra voadio amin'ny alàlan'ny id amin'ny valin'ny fangatahana - extracted_file_download_id. Indray mandeha indray, mijery mialoha kely aho dia manome ohatra momba ny fangatahana sy valin-kafatra amin'ny fitadiavana id amin'ny fampidinana antontan-taratasy voafafa.
Fangatahana fangatahana hikaroka ny fanalahidin'ny extracted_file_download_id
{ "request": [
{
"sha256": "9a346005ee8c9adb489072eb8b5b61699652962c17596de9c326ca68247a8876",
"features": ["extraction"] ,
"extraction": {
"method": "pdf"
}
}
]
}
Valiny amin'ny fanontaniana (mitadiava fanalahidin'ny extracted_file_download_id)
{
"response": [
{
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
},
"sha256": "9a346005ee8c9adb489072eb8b5b61699652962c17596de9c326ca68247a8876",
"file_type": "",
"file_name": "",
"features": [
"extraction"
],
"extraction": {
"method": "pdf",
"extract_result": "CP_EXTRACT_RESULT_SUCCESS",
"extracted_file_download_id": "b5f2b34e-3603-4627-9e0e-54665a531ab2",
"output_file_name": "kp-20-xls.cleaned.xls.pdf",
"time": "0.013",
"extract_content": "Macros and Code",
"extraction_data": {
"input_extension": "xls",
"input_real_extension": "xls",
"message": "OK",
"output_file_name": "kp-20-xls.cleaned.xls.pdf",
"protection_name": "Potential malicious content extracted",
"protection_type": "Conversion to PDF",
"protocol_version": "1.0",
"risk": 5.0,
"scrub_activity": "Active content was found - XLS file was converted to PDF",
"scrub_method": "Convert to PDF",
"scrub_result": 0.0,
"scrub_time": "0.013",
"scrubbed_content": "Macros and Code"
},
"tex_product": false,
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
}
}
]
}
General information
Amin'ny antso API iray dia rakitra iray ihany no azonao alefa ho fanamarinana.
Ny singa av dia tsy mitaky fizarana fanampiny misy fanalahidy, dia ampy ny mamaritra azy ao amin'ny rakibolana Toetoetra.
Fangatahana antso API
Fomba ampiasaina − POST
Adiresy antso - https:///tecloud/api/v1/file/query
Alohan'ny handefasana rakitra (fangatahana fampidinana) dia tsara ny manamarina ny cache sandbox (fangatahana fangatahana) mba hanamafisana ny entana ao amin'ny server API, satria ny mpizara API dia mety efa manana fampahalalana sy didim-pitsarana momba ny rakitra alaina. Ny antso dia tsy misy afa-tsy ampahany amin'ny lahatsoratra. Ny ampahany ilaina amin'ny fangatahana dia sha1/sha256/md5 hash habetsan'ny rakitra. Raha ny marina, azonao atao ny mahazo izany amin'ny valin'ny fangatahana fampidinana.
Minitra takiana amin'ny fangatahana
HTTP POST
https:///tecloud/api/v1/file/query
Lohateny:
fanomezan-dàlana:
Body
{
"fangatahana": {
"sha256":
}
}
Ohatra iray amin'ny valinteny amin'ny fangatahana fampiakarana, izay ahitana ny sandan'ny hash sha1/md5/sha256
{
"response": {
"status": {
"code": 1002,
"label": "UPLOAD_SUCCESS",
"message": "The file was uploaded successfully."
},
"sha1": "954b5a851993d49ef8b2412b44f213153bfbdb32",
"md5": "ac29b7c26e7dcf6c6fdb13ac0efe98ec",
"sha256": "313c0feb009356495b7f4a60e96737120beb30e1912c6d866218cee830aebd90",
"file_type": "",
"file_name": "kp-20-doc.doc",
"features": [
"te"
],
"te": {
"trust": 0,
"images": [
{
"report": {
"verdict": "unknown"
},
"status": "not_found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"status": {
"code": 1002,
"label": "UPLOAD_SUCCESS",
"message": "The file was uploaded successfully."
}
}
}
}
Ny fangatahana fangatahana, ankoatry ny sandan'ny hash, dia tokony hitovy amin'ny fangatahana fampiakarana teo aloha (na nokasaina hatao), na koa "efa" (misy saha vitsy kokoa amin'ny fangatahana fangatahana raha oharina amin'ny fangatahana fampiakarana). Raha toa ka misy saha maromaro kokoa noho ny tao amin'ny fangatahana fampiakarana ny fangatahana fangatahana, dia tsy ho azonao ny fampahalalana ilaina rehetra amin'ny valiny.
Ity misy ohatra iray amin'ny valin'ny fanontaniana iray izay tsy nahitana ny angona ilaina rehetra
{
"response": [
{
"status": {
"code": 1006,
"label": "PARTIALLY_FOUND",
"message": "The request cannot be fully answered at this time."
},
"sha256": "313c0feb009356495b7f4a60e96737120beb30e1912c6d866218cee830aebd90",
"file_type": "doc",
"file_name": "",
"features": [
"te",
"extraction"
],
"te": {
"trust": 10,
"images": [
{
"report": {
"verdict": "malicious",
"pdf_report": "4e9cddaf-03a4-489f-aa03-3c18f8d57a52",
"xml_report": "9c18018f-c761-4dea-9372-6a12fcb15170"
},
"status": "found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"combined_verdict": "malicious",
"severity": 4,
"confidence": 1,
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
},
"extraction": {
"method": "pdf",
"tex_product": false,
"status": {
"code": 1004,
"label": "NOT_FOUND",
"message": "Could not find the requested file. Please upload it."
}
}
}
]
}
Tandremo ny saha fehezan-dalàna и marika. Miseho in-telo ao amin'ny rakibolana sata ireo saha ireo. Voalohany dia hitantsika ny "code" fanalahidy manerantany: 1006 sy "label": "PARTIALLY_FOUND". Manaraka izany dia hita ho an'ny singa tsirairay nangatahanay ireo fanalahidy ireo - te sy extraction. Ary raha ho an'ny te dia mazava fa hita ny angon-drakitra, dia tsy misy fampahalalana momba ny fitrandrahana.
Toy izao ny endrik'ilay fanontaniana amin'ny ohatra etsy ambony
{ "request": [
{
"sha256": {{sha256}},
"features": ["te", "extraction"] ,
"te": {
"images": [
{
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"reports": [
"xml", "pdf"
]
}
}
]
}
Raha mandefa fangatahana fangatahana tsy misy singa fitrandrahana ianao
{ "request": [
{
"sha256": {{sha256}},
"features": ["te"] ,
"te": {
"images": [
{
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"reports": [
"xml", "pdf"
]
}
}
]
}
Avy eo ny valiny dia ahitana fampahalalana feno ("code": 1001, "label": "FOUND")
{
"response": [
{
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
},
"sha256": "313c0feb009356495b7f4a60e96737120beb30e1912c6d866218cee830aebd90",
"file_type": "doc",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 10,
"images": [
{
"report": {
"verdict": "malicious",
"pdf_report": "4e9cddaf-03a4-489f-aa03-3c18f8d57a52",
"xml_report": "9c18018f-c761-4dea-9372-6a12fcb15170"
},
"status": "found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"combined_verdict": "malicious",
"severity": 4,
"confidence": 1,
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
}
}
]
}
Raha tsy misy fampahalalana ao amin'ny cache mihitsy, dia ho "label" ny valiny: "NOT_FOUND"
{
"response": [
{
"status": {
"code": 1004,
"label": "NOT_FOUND",
"message": "Could not find the requested file. Please upload it."
},
"sha256": "313c0feb009356495b7f4a60e96737120beb30e1912c6d866218cee830aebd91",
"file_type": "",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 0,
"images": [
{
"report": {
"verdict": "unknown"
},
"status": "not_found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"status": {
"code": 1004,
"label": "NOT_FOUND",
"message": "Could not find the requested file. Please upload it."
}
}
}
]
}
Amin'ny antso API iray dia afaka mandefa vola hash maromaro indray mandeha ianao ho fanamarinana. Ny valiny dia hamerina ny angona amin'ny filaharana mitovy amin'ny nandefasana azy tao amin'ny fangatahana.
Ohatra fangatahana fangatahana miaraka amin'ny isa sha256 maromaro
{ "request": [
{
"sha256": "b84531d3829bf6131655773a3863d6b16f6389b7f4036aef9b81c0cb60e7fd81"
},
{
"sha256": "b84531d3829bf6131655773a3863d6b16f6389b7f4036aef9b81c0cb60e7fd82"
}
]
}
Valiny fanontaniana misy isa sha256 maro
{
"response": [
{
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
},
"sha256": "b84531d3829bf6131655773a3863d6b16f6389b7f4036aef9b81c0cb60e7fd81",
"file_type": "dll",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 10,
"images": [
{
"report": {
"verdict": "malicious"
},
"status": "found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"combined_verdict": "malicious",
"severity": 4,
"confidence": 3,
"status": {
"code": 1001,
"label": "FOUND",
"message": "The request has been fully answered."
}
}
},
{
"status": {
"code": 1004,
"label": "NOT_FOUND",
"message": "Could not find the requested file. Please upload it."
},
"sha256": "b84531d3829bf6131655773a3863d6b16f6389b7f4036aef9b81c0cb60e7fd82",
"file_type": "",
"file_name": "",
"features": [
"te"
],
"te": {
"trust": 0,
"images": [
{
"report": {
"verdict": "unknown"
},
"status": "not_found",
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"score": -2147483648,
"status": {
"code": 1004,
"label": "NOT_FOUND",
"message": "Could not find the requested file. Please upload it."
}
}
}
]
}
Ny fangatahan'ny tenifototra maromaro indray mandeha amin'ny fangatahana fangatahana dia hisy fiantraikany mahasoa amin'ny fampandehanana ny mpizara API.
Download API antso
Fomba ampiasaina − POST (araka ny antontan-taratasy), GET miasa koa (ary mety toa mitombina kokoa)
Adiresy antso - https:///tecloud/api/v1/file/download?id=
Ny lohapejy dia mitaky ny fanalahidin'ny API, ny vatan'ny fangatahana dia foana, ny id download dia alefa amin'ny adiresy URL.
Ho setrin'ny fangatahana fangatahana, raha vita ny emulation ary nangatahana ny tatitra rehefa misintona ny rakitra, dia ho hita ny id amin'ny fampidinana tatitra. Raha misy kopia nodiovina no angatahina, dia tokony hitady ny id hisintonana ny antontan-taratasy voadio ianao.
Amin'ny fitambarany, ny fanalahidy amin'ny valin'ny fangatahana misy ny sandan'ny id ho an'ny fametahana dia mety:
-
summary_report
-
full_report
-
pdf_report
-
xml_report
-
extracted_file_download_id
Mazava ho azy, mba hahazoana ireo fanalahidy ireo ho valin'ny fangatahana fangatahana, dia tsy maintsy voafaritra ao amin'ny fangatahana izy ireo (ho an'ny tatitra) na tadidio ny manao fangatahana amin'ny fampiasana ny asa fitrandrahana (ho an'ny antontan-taratasy voadio)
Quota API antso
Fomba ampiasaina − POST
Adiresy antso - https:///tecloud/api/v1/file/quota
Mba hanamarinana ny fetra sisa ao amin'ny rahona, ampiasao ny fangatahana quota. Foana ny vatana fangatahana.
Valiny ohatra amin'ny fangatahana quota
{
"response": [
{
"remain_quota_hour": 1250,
"remain_quota_month": 10000000,
"assigned_quota_hour": 1250,
"assigned_quota_month": 10000000,
"hourly_quota_next_reset": "1599141600",
"monthly_quota_next_reset": "1601510400",
"quota_id": "TEST",
"cloud_monthly_quota_period_start": "1421712300",
"cloud_monthly_quota_usage_for_this_gw": 0,
"cloud_hourly_quota_usage_for_this_gw": 0,
"cloud_monthly_quota_usage_for_quota_id": 0,
"cloud_hourly_quota_usage_for_quota_id": 0,
"monthly_exceeded_quota": 0,
"hourly_exceeded_quota": 0,
"cloud_quota_max_allow_to_exceed_percentage": 1000,
"pod_time_gmt": "1599138715",
"quota_expiration": "0",
"action": "ALLOW"
}
]
}
API fisorohana ny fandrahonana ho an'ny vavahadin'ny fiarovana
Ity API ity dia novolavolaina talohan'ny API fisorohana ny fandrahonana ary natao ho an'ny fitaovana eo an-toerana ihany. Amin'izao fotoana izao dia tsy ilaina izany raha mila ny Threat Extraction API ianao. Ho an'ny Fandrahonana Emulation dia tsara kokoa ny mampiasa ny API fisorohana fandrahonana mahazatra. Handefa TP API ho an'ny SG ary amboary ny fanalahidin'ny API izay ilainao manaraka ny dingana
Andeha hojerentsika akaiky ny asa te и fitrandrahana amin'ity API ity.
Ho an'ny singa te rakibolana nomena te_options amin'ny fangatahana fampiakarana/fanontaniana, ary ny lakile amin'ity fangatahana ity dia mifanandrify tanteraka amin'ny te keys in
Ohatra fangatahan'ny emulation rakitra ao amin'ny Win10 miaraka amin'ny tatitra
{
"request": [{
"protocol_version": "1.1",
"api_key": "<api_key>",
"request_name": "UploadFile",
"file_enc_data": "<base64_encoded_file>",
"file_orig_name": "<filename>",
"te_options": {
"images": [
{
"id": "10b4a9c6-e414-425c-ae8b-fe4dd7b25244",
"revision": 1
}
],
"reports": ["summary", "xml"]
}
}
]
}
Ho an'ny singa fitrandrahana rakibolana nomena scrub_options. Ity fangatahana ity dia mamaritra ny fomba fanadiovana: miova ho PDF, mazava tsara ny votoaty mavitrika, na mifidiana fomba mifanaraka amin'ny mombamomba ny Fandrahonana Fandrahonana (voatondro ny anaran'ny mombamomba azy). Ny zava-dehibe amin'ny famaliana ny fangatahana API fitrandrahana ho an'ny rakitra iray dia ny fahazoanao kopia voadio amin'ny valin'io fangatahana io ho tady encryption base64 (tsy mila manao fangatahana fangatahana ianao ary mitady ny id mba hisintonana ny antontan-taratasy)
Ohatra amin'ny fangatahana hamafa rakitra
{
"request": [{
"protocol_version": "1.1",
"api_key": "<API_KEY>",
"request_name": "UploadFile",
"file_enc_data": "<base64_encoded_file>",
"file_orig_name": "hi.txt",
"scrub_options": {
"scrub_method": 2
}
}]
}
Valio fangatahana
{
"response": [{
"protocol_version": "1.1",
"src_ip": "<IP_ADDRESS>",
"scrub": {
"file_enc_data": "<base64_encoded_converted_to_PDF_file>",
"input_real_extension": "js",
"message": "OK",
"orig_file_url": "",
"output_file_name": "hi.cleaned.pdf",
"protection_name": "Extract potentially malicious content",
"protection_type": "Conversion to PDF",
"real_extension": "txt",
"risk": 0,
"scrub_activity": "TXT file was converted to PDF",
"scrub_method": "Convert to PDF",
"scrub_result": 0,
"scrub_time": "0.011",
"scrubbed_content": ""
}
}]
}
Na dia eo aza ny hoe vitsy kokoa ny fangatahana API takiana hahazoana kopia voadio, hitako fa ity safidy ity dia tsy tiana kokoa sy mety kokoa noho ny fangatahana angon-drakitra ampiasaina amin'ny
Postman Collections
Namorona fanangonana tao amin'ny Postman aho ho an'ny API fisorohana ny fandrahonana sy ny API fisorohana ny fandrahonana ho an'ny vavahadin'ny fiarovana, izay maneho ny fangatahana API mahazatra indrindra. Mba hahafahan'ny mpizara ip/url API sy ny lakile ho soloina ho an'ny fangatahana, ary ny haben'ny hash sha256 tokony hotsaroana aorian'ny fampidinana ny rakitra, dia misy karazany telo noforonina tao anatin'ireo fanangonana (azonao atao ny mahita azy ireo amin'ny alàlan'ny fandehanana any amin'ny fikandrana fanangonana. Ahitsio -> Variables): te_api (takina), api_key (tsy maintsy fenoina, afa-tsy rehefa mampiasa TP API amin'ny fitaovana eo an-toerana), sha256 (avelao foana, tsy ampiasaina amin'ny TP API ho an'ny SG).
Ohatra amin'ny fampiasana
Ao amin'ny fiaraha-monina
Source: www.habr.com