Towards Classifying Benign And Malicious Packages Using Machine Learning

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Nguyen, Thanh-Cong, Nguyen, Ngoc-Thanh, Ung, Van-Giau, Vu, Duc-Ly
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911276012142592
author Nguyen, Thanh-Cong
Nguyen, Ngoc-Thanh
Ung, Van-Giau
Vu, Duc-Ly
author_facet Nguyen, Thanh-Cong
Nguyen, Ngoc-Thanh
Ung, Van-Giau
Vu, Duc-Ly
contents Recently, the number of malicious open-source packages in package repositories has been increasing dramatically. While major security scanners focus on identifying known Common Vulnerabilities and Exposures (CVEs) in open-source packages, there are very few studies on detecting malicious packages. Malicious open-source package detection typically requires static, dynamic analysis, or both. Dynamic analysis is more effective as it can expose a package's behaviors at runtime. However, current dynamic analysis tools (e.g., ossf's package-analysis) lack an automatic method to differentiate malicious packages from benign packages. In this paper, we propose an approach to extract the features from dynamic analysis (e.g., executed commands) and leverage machine learning techniques to automatically classify packages as benign or malicious. Our evaluation of nearly 2000 packages on npm shows that the machine learning classifier achieves an AUC of 0.91 with a false positive rate of nearly 0%.
format Preprint
id arxiv_https___arxiv_org_abs_2511_15033
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Towards Classifying Benign And Malicious Packages Using Machine Learning
Nguyen, Thanh-Cong
Nguyen, Ngoc-Thanh
Ung, Van-Giau
Vu, Duc-Ly
Cryptography and Security
Recently, the number of malicious open-source packages in package repositories has been increasing dramatically. While major security scanners focus on identifying known Common Vulnerabilities and Exposures (CVEs) in open-source packages, there are very few studies on detecting malicious packages. Malicious open-source package detection typically requires static, dynamic analysis, or both. Dynamic analysis is more effective as it can expose a package's behaviors at runtime. However, current dynamic analysis tools (e.g., ossf's package-analysis) lack an automatic method to differentiate malicious packages from benign packages. In this paper, we propose an approach to extract the features from dynamic analysis (e.g., executed commands) and leverage machine learning techniques to automatically classify packages as benign or malicious. Our evaluation of nearly 2000 packages on npm shows that the machine learning classifier achieves an AUC of 0.91 with a false positive rate of nearly 0%.
title Towards Classifying Benign And Malicious Packages Using Machine Learning
topic Cryptography and Security
url https://arxiv.org/abs/2511.15033