- Released
- Type
- Bug fix
Threat.Zone 3.6.4
File types detected from content, not from the file name
API changes
Breaking
- Breaking:
file.mimetypeno longer falls back to a type guessed from the file name extension. When ThreatZone cannot detect the type from the content,file.mimetypeis nowapplication/. A client that usedoctet-stream file.mimetypeas a content type for such files must treatapplication/as "type not detected".octet-stream declaredExtensionstill gives the extension from the file name. Base URL:https:/./ app.threat.zone/ public-api - Breaking: for
.docx,.xlsxand.pptxsubmissions,file.mimetypenow returns the Office (OOXML) type, for exampleapplication/, instead ofvnd.openxmlformats-officedocument.wordprocessingml.document application/. These files, and OpenDocument, EPUB, JAR and APK files, now go to document analysis and are no longer extracted as archives. A client that matchedzip application/to find Office documents, or that expected archive extraction for these files, must match the OOXML type and the new routing. Base URL:zip https:/./ app.threat.zone/ public-api
Important changes
- Office documents now reach document analysis as one file instead of being unpacked as archives: Word, Excel and PowerPoint files (.docx, .xlsx, .pptx), OpenDocument, EPUB, JAR and APK files are no longer extracted. The file content decides the route, not the file name, so a plain ZIP file named
report.docxis still extracted as an archive. - Submit files with one less prompt: the file analysis and CDR upload pages no longer check the file type in the browser and no longer show the file type mismatch window that could appear before you submitted a file. ThreatZone now detects the file type from the file content after you submit it.
Static analysis
The file type in a report now shows what the file really is, even when the file name says otherwise: ThreatZone detects the file type from the file content, not from the file name extension. For example, an HTML file named
test.lnkis no longer reported as a Windows shortcut.Spot a file that hides behind a false extension at a glance: the file information card of a submission now shows a Declared Extension field with the extension from the file name, and a Mismatch badge when this extension does not match the detected file type. This information does not change the verdict or the score.
Review Android samples with accurate app details: the APK Info section of a static analysis report now shows the correct information for an APK file.
Public API and SDK
Flag disguised files in your own integrations: the
fileobject ofGET /andsubmissions/ {uuid} GET /now returnssubmissions/ search/ sha256/ {sha256} declaredExtension,realExtensionandisMimetypeMismatched, so a client can see when the file name extension does not match the detected file type.POST /,submissions/ sandbox POST /andsubmissions/ static POST /also accept an optionalsubmissions/ cdr declared_content_typeform field, for example the origin HTTPContent-Type. This field is a hint only and does not change the detected type or the analysis route. The mismatch flag is for display only and does not change the verdict or the score. Older submissions returndeclaredExtension: ""andisMimetypeMismatched: false. Base URL:https:/./ app.threat.zone/ public-api