Distance-based feature selection using Benford’s law for malware detection

Detecting malware in computer networks and data streams from Android devices remains a critical challenge for cybersecurity researchers. While machine learning and deep learning techniques have shown promising results, these approaches often require large volumes of labelled data, offer limited interpretability, and struggle to adapt to sophisticated threats such as zero-day attacks. Moreover, their high computational requirements restrict their applicability in resource-constrained environments. This research proposes an innovative approach that advances the state of the art by offering practical solutions for dynamic and data-limited security scenarios. By integrating natural statistical laws, particularly Benford’s law, with dissimilarity functions, a lightweight, fast, and scalable model is developed that eliminates the need for extensive training and large labelled datasets while improving resilience to data imbalance and scalability for large-scale cybersecurity applications. Although Benford’s law has demonstrated potential in anomaly detection, its effectiveness is limited by the difficulty of selecting relevant features. To overcome this, the study combines Benford’s law with several distance functions, including Median Absolute Deviation, Kullback–Leibler divergence, Euclidean distance, and Pearson correlation, enabling statistically grounded feature selection. Additional metrics, such as the Kolmogorov test, Jensen–Shannon divergence, and Z statistics, were used for model validation. This approach quantifies discrepancies between expected and observed distributions, addressing classic feature selection challenges like redundancy and imbalance. Validated on both balanced and unbalanced datasets, the model achieved strong results: 88.30% accuracy and 85.08% F1-score in the balanced set, 92.75% accuracy and 95.29% F1-score in the unbalanced set. The integration of Benford’s law with distance functions significantly reduced false positives and negatives. Compared to traditional Machine Learning methods, which typically require extensive training and large datasets to achieve F1 scores between 92% and 99%, the proposed approach delivers competitive performance while enhancing computational efficiency, robustness, and interpretability. This balance makes it a practical and scalable alternative for real-time or resource-constrained cybersecurity environments. • Innovative use of Benford’s law to identify significant features in data flows, evaluating compliance with expected numerical patterns through distance functions. • Introduction of a model combining statistical criteria and distance functions as an alternative to traditional feature selection techniques. • The use of distance functions to evaluate the model based on BL focused on selecting the main features that maximise the separation between benign and malicious flows. • Practical application in cybersecurity scenarios, such as detecting malware in network flows, where the selected features improve the effectiveness of monitoring systems.

Authors

Institutions

Publication Details

Journal
Computers & Security
Published
2025-08-22
DOI
https://doi.org/10.1016/j.cose.2025.104625
Citations
1
Primary Topic
Benford’s Law and Fraud Detection
Type
article
Field-Weighted Citation Impact
2.63
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Distance-based feature selection using Benford’s law for malware detection

Séamus Ó Ciardhuáin, Pedro Fernandes, Mário Antunes
1 citations
Computers & Security
Benford’s Law and Fraud Detection
2.63
article

Distance-based feature selection using Benford’s law for malware detection

Séamus Ó Ciardhuáin, Pedro Fernandes, Mário Antunes
article en
1 citations

Abstract

Detecting malware in computer networks and data streams from Android devices remains a critical challenge for cybersecurity researchers. While machine learning and deep learning techniques have shown promising results, these approaches often require large volumes of labelled data, offer limited interpretability, and struggle to adapt to sophisticated threats such as zero-day attacks. Moreover, their high computational requirements restrict their applicability in resource-constrained environments. This research proposes an innovative approach that advances the state of the art by offering practical solutions for dynamic and data-limited security scenarios. By integrating natural statistical laws, particularly Benford’s law, with dissimilarity functions, a lightweight, fast, and scalable model is developed that eliminates the need for extensive training and large labelled datasets while improving resilience to data imbalance and scalability for large-scale cybersecurity applications. Although Benford’s law has demonstrated potential in anomaly detection, its effectiveness is limited by the difficulty of selecting relevant features. To overcome this, the study combines Benford’s law with several distance functions, including Median Absolute Deviation, Kullback–Leibler divergence, Euclidean distance, and Pearson correlation, enabling statistically grounded feature selection. Additional metrics, such as the Kolmogorov test, Jensen–Shannon divergence, and Z statistics, were used for model validation. This approach quantifies discrepancies between expected and observed distributions, addressing classic feature selection challenges like redundancy and imbalance. Validated on both balanced and unbalanced datasets, the model achieved strong results: 88.30% accuracy and 85.08% F1-score in the balanced set, 92.75% accuracy and 95.29% F1-score in the unbalanced set. The integration of Benford’s law with distance functions significantly reduced false positives and negatives. Compared to traditional Machine Learning methods, which typically require extensive training and large datasets to achieve F1 scores between 92% and 99%, the proposed approach delivers competitive performance while enhancing computational efficiency, robustness, and interpretability. This balance makes it a practical and scalable alternative for real-time or resource-constrained cybersecurity environments. • Innovative use of Benford’s law to identify significant features in data flows, evaluating compliance with expected numerical patterns through distance functions. • Introduction of a model combining statistical criteria and distance functions as an alternative to traditional feature selection techniques. • The use of distance functions to evaluate the model based on BL focused on selecting the main features that maximise the separation between benign and malicious flows. • Practical application in cybersecurity scenarios, such as detecting malware in network flows, where the selected features improve the effectiveness of monitoring systems.

Computers & SecurityVol. 158
Instituto de Engenharia de Sistemas e Computadores Investigação e Desenvolvimento (PT), Instituto Politécnico de Leiria (PT), Shannon Applied Biotechnology Centre (IE), INESC TEC (PT)
Peace, Justice and strong institutions
Openalex Percentile: Top 9%
Benford’s Law and Fraud Detection
2.63
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.