File type classifier for Karton framework
Project description
Classifier karton service
File type classifier for the Karton framework.
Entrypoint for samples. Classifies type of samples labeled as kind: raw
,
which makes them available for subsystems that receive samples with specific
type only (e.g. raw
=> runnable:win32:exe
)
Author: CERT.pl
Maintainers: psrok1, msm, nazywam
Consumes:
{
"type": "sample",
"kind": "raw"
"payload": {
"magic": "output from 'file' command",
"sample": <Resource>
}
}
Produces:
{
"type": "sample",
"stage": "recognized",
"kind": "runnable" # Executable format default for OS platform
|| "document" # Office document
|| "archive" # Archive containing samples (zip, e-mails)
|| "dump" # Dump from sandbox
|| "script", # Script (js/vbs/bat...)
|| "misc", # No platform or extension
"platform": "win32"
|| "win64"
|| "linux"
|| "android",
|| "macos",
|| "freebsd",
|| "netbsd",
|| "openbsd",
|| "solaris",
"extension": "*", # Expected file extension
"mime": "*", # Expected file mimetype
... (other fields are derived from incoming task)
}
Warning the output mime
field is not deterministic across libmagic versions and can change depending on the version you're using. We don't recommend creating consumers that listen on it directly.
Usage
First of all, make sure you have setup the core system: https://github.com/CERT-Polska/karton
Then install karton-classifier from PyPi:
$ pip install karton-classifier
$ karton-classifier
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file karton_classifier-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: karton_classifier-2.0.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8fc78fa02a2e7212961862a91f614d668285ba5568b226e3ae604753095579c |
|
MD5 | 7455322def3c61be0507cb4fd9f1735d |
|
BLAKE2b-256 | 2453798c704249c5c57caf084e24bf3a5fd33d3ce5367f495dd8e134f566d731 |