Machine Learning-Based Malware Classification by Type and Family
Klasifikace malwaru na základě strojového učení podle typu a rodiny
Authors
Supervisors
Reviewers
Editors
Other contributors
Journal Title
Journal ISSN
Volume Title
Publisher
České vysoké učení technické v Praze
Czech Technical University in Prague
Czech Technical University in Prague
Date of defense
2025-06-10
Abstract
Tato diplomová práce se zabývá problematikou klasifikace malwaru pomocí strojového učení a přináší dataset označený jak na úrovni typu malwaru, tak na úrovni jeho rodiny. Binární soubory byly shromážděny ze zdrojů jako VirusShare, VX Underground a MalwareBazaar a následně opatřeny štítky o rodině získanými z názvů souborů a typovými štítky převzatými z ClarAVy. Dataset byl dále zpracován jednotným automatizovaným postupem pro extrakci příznaků založeným na statické analýze, především s využitím údajů z PE hlaviček, aby bylo možné provádět pokročilé klasifikační úlohy. Vyhodnocení se zaměřilo na tři klíčové oblasti. V binární klasifikaci, tedy rozlišování mezi malwarem a legitimními vzorky, dosáhly modely Random Forest a XGBoost velmi vysoké přesnosti, konkrétně 98,5 % při detekci podle typu a 98,98 % při detekci podle rodiny. Při použití zmenšených datasetů o 1 000 vzorcích, které simulovaly podmínky s omezeným množstvím dat, si modely udržely vysoký výkon s přesností 97,6 % při typové detekci a 98,66 % při detekci podle rodiny. Při klasifikaci mezi jednotlivými typy nebo rodinami malwaru dosahovaly modely až 97,5 % přesnosti na úrovni typů a až 93,7 % na úrovni rodin. Při klasifikaci do více tříd, kdy bylo cílem přiřadit vzorky ke správnému typu nebo rodině, dosáhl model SVM přesnosti 81,1 % pro typy, zatímco Random Forest a XGBoost přibližně 73,4 % pro rodiny. Výsledky poukazují na praktické kompromisy mezi přesností a výpočetní náročností a ukazují, že značení na úrovni typu i rodiny umožňuje detailnější a hodnotnější klasifikaci malwaru. Práce tak vytváří pevný základ pro další výzkum v oblasti pokročilé detekce a klasifikace malwaru.
This thesis addresses the challenge of malware classification using machine learning by developing a novel dataset labeled at both the malware type and family levels. Raw binaries were collected from sources such as VirusShare, VX Underground, and MalwareBazaar, and subsequently labeled with family information parsed from binary names and type-level labels integrated from ClarAVy. The dataset was processed using a unified feature extraction pipeline based on static analysis, particularly extracting features from PE headers, to support advanced classification tasks. The evaluation was focused on three key classification tasks. In the binary classification of malware versus benign samples, Random Forest and XGBoost achieved high accuracy on the full datasets, reaching 98.5% for type-based detection and 98.98% for family-based detection. When using truncated datasets of 1,000 samples to assess performance under limited data conditions, both models still performed strongly, achieving 97.6% for type-based detection and 98.66% for family-based detection. For interclass classification, which distinguishes between malware types or families, the models reached up to 97.5% accuracy on type-level tasks and up to 93.7% on family-level tasks. In the multiclass classification setting, which assigns samples to the correct type or family, SVM achieved 81.1% accuracy on type labels, while Random Forest and XGBoost reached approximately 73.4% on family labels. The results highlight practical trade-offs between accuracy and computational cost, and demonstrate that labeling at both the type and family levels enables more fine-grained and insightful malware classification. The thesis establishes a robust foundation for future research on advanced malware detection and classification.
This thesis addresses the challenge of malware classification using machine learning by developing a novel dataset labeled at both the malware type and family levels. Raw binaries were collected from sources such as VirusShare, VX Underground, and MalwareBazaar, and subsequently labeled with family information parsed from binary names and type-level labels integrated from ClarAVy. The dataset was processed using a unified feature extraction pipeline based on static analysis, particularly extracting features from PE headers, to support advanced classification tasks. The evaluation was focused on three key classification tasks. In the binary classification of malware versus benign samples, Random Forest and XGBoost achieved high accuracy on the full datasets, reaching 98.5% for type-based detection and 98.98% for family-based detection. When using truncated datasets of 1,000 samples to assess performance under limited data conditions, both models still performed strongly, achieving 97.6% for type-based detection and 98.66% for family-based detection. For interclass classification, which distinguishes between malware types or families, the models reached up to 97.5% accuracy on type-level tasks and up to 93.7% on family-level tasks. In the multiclass classification setting, which assigns samples to the correct type or family, SVM achieved 81.1% accuracy on type labels, while Random Forest and XGBoost reached approximately 73.4% on family labels. The results highlight practical trade-offs between accuracy and computational cost, and demonstrate that labeling at both the type and family levels enables more fine-grained and insightful malware classification. The thesis establishes a robust foundation for future research on advanced malware detection and classification.
Description
Keywords
klasifikace malwaru, strojové učení, statická analýza, binární klasifikace, klasifikace mezi třídami, vícekategoriální klasifikace, anotace malwaru, extrakce příznaků, Random Forest, XGBoost, SVM, KNN, MLP, dataset malwaru, detekce malwaru, malware classification, machine learning, static analysis, binary classification, interclass classification, multiclass classification, malware labeling, feature extraction, Random Forest, XGBoost, SVM, KNN, MLP, malware dataset, malware detection
Citation
Underlying research data set URL
Permanent link
Rights/License
Vysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem v platném znění.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.