CTI Verify file classifiers (SVM)

Three support vector machines that score a file's structure as more like the malicious or the benign files of its kind. They are the "custom scan" models of CTI Verify, a threat-intelligence platform built as a MongoDB course project, where they add a statistical opinion beside YARA rules, threat feeds and a sandbox. They never decide a verdict alone.

Kind Model Algorithm False positives (test) Detection (test) Counts in a verdict
Windows programs (PE) file_svm_pe linear SVM 0.41% 79.0% yes
Linux programs (ELF) file_svm_elf rbf SVM 0.30% 66.1% yes
PDF documents file_svm_pdf linear SVM 1.00% 72.5% no: shown, never counted

Test figures are measured on the 12 weeks of EMBER2024 after the training period, at each model's own threshold, which is set so that at most 1% of benign files are flagged. That is why the models also miss a share of malware: detection is the price of few false alarms.

Training data

EMBER2024: 3.2 million files first seen between September 2023 and December 2024, published as feature vectors with benign/malicious labels. No malware was downloaded, only the numbers. Split by time: the first 46 weeks to fit, the last 6 training weeks to choose the model and set the threshold, and the following 12 weeks to test. Three candidates per kind (LinearSVC, SGD linear SVM, RBF SVC); the best on validation ships, unless it fails the gate.

The gate: a model may count only if, on the test weeks, it flags at most 1% of benign files and catches at least half of the malicious ones, and it flags at most 5% of the ordinary files of its kind found on a real PC (operating-system programs, PDFs installed with software).

Limitations

  • The PDF model fails the second half of the gate. It flagged 7 of 12 ordinary PDFs installed with software (58%). It ships with "scores": false: CTI Verify shows its result and adds nothing to the verdict. Treat it the same way.
  • The models read structure and byte statistics, not behaviour. Packed, signed or unusual benign software can look malicious, and new malware families can look benign.
  • Trained on files from 2023 and 2024. Accuracy drifts as malware changes; retrain on newer EMBER weeks.
  • Not a replacement for an antivirus product. Use it as one signal among several.

Use

pip install -r requirements.txt
python predict.py file.exe

api/file_svm.py (numpy only) turns a file into EMBER2024's 2,568 features with ml/thrember/features.py (EMBER2024's own code at commit 0ef753e81d98, Apache 2.0) and scores them. Each .json manifest holds the model's test figures, threshold and SHA-256; a model whose bytes do not match its manifest is refused.

The .npz files are plain arrays (coef, intercept, mask, mean, scale, Platt platt_a/platt_b, and the support vectors for the RBF model), loaded with allow_pickle=False.

Licence

The models and api/file_svm.py: Apache 2.0. ml/thrember/: Apache 2.0, by the EMBER2024 authors (see ml/thrember/LICENSE).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support