Machine Learning Approach for Malicious URL Detection with Particle Swarm Optimization-Based Feature Selection

The rapid growth of web-based services has intensified the need for reliable mechanisms to distinguish malicious Uniform Resource Locators (URLs) from legitimate ones. Phishing campaigns, malware distribution networks, and defacement operations increasingly rely on deceptive web addresses to compromise unsuspecting users and critical infrastructure. Accurate URL classification plays a critical role in mitigating phishing attacks, malware distribution, and other cyber threats. This study presents a machine learning framework for detecting malicious URLs in cybersecurity applications. This study presents a comprehensive empirical evaluation of multiple machine learning and deep learning approaches for URL classification under two experimental settings: training with the complete feature set and training with a reduced subset obtained through Particle Swarm Optimization (PSO). The framework incorporates advanced feature engineering techniques that capture domain-specific characteristics of malicious URLs. Seventeen classifiers, encompassing traditional ensemble methods, neural architectures, and hybrid stacking configurations, were evaluated on a publicly available dataset of 651,191 URL samples retrieved from Kaggle. The PSO reduced the original ten-feature space to seven discriminative features, representing a 30% dimensionality reduction. Experimental results demonstrate that all-feature models consistently outperformed their PSO-reduced counterparts, with Random Forest achieving the highest classification accuracy of 91.90% and an F1-score of 0.9165. The findings offer empirical grounding for the design of computationally efficient URL threat detection systems and provide actionable directions for future research in adversarial machine learning and real-time cybersecurity pipelines.

Authors

Institutions

Publication Details

Journal
Electronics
Published
2026-06-18
DOI
https://doi.org/10.3390/electronics15122701
Primary Topic
Spam and Phishing Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Machine Learning Approach for Malicious URL Detection with Particle Swarm Optimization-Based Feature Selection

Mohamed Farsi
Electronics
Spam and Phishing Detection
article

Machine Learning Approach for Malicious URL Detection with Particle Swarm Optimization-Based Feature Selection

Mohamed Farsi
article en

Abstract

The rapid growth of web-based services has intensified the need for reliable mechanisms to distinguish malicious Uniform Resource Locators (URLs) from legitimate ones. Phishing campaigns, malware distribution networks, and defacement operations increasingly rely on deceptive web addresses to compromise unsuspecting users and critical infrastructure. Accurate URL classification plays a critical role in mitigating phishing attacks, malware distribution, and other cyber threats. This study presents a machine learning framework for detecting malicious URLs in cybersecurity applications. This study presents a comprehensive empirical evaluation of multiple machine learning and deep learning approaches for URL classification under two experimental settings: training with the complete feature set and training with a reduced subset obtained through Particle Swarm Optimization (PSO). The framework incorporates advanced feature engineering techniques that capture domain-specific characteristics of malicious URLs. Seventeen classifiers, encompassing traditional ensemble methods, neural architectures, and hybrid stacking configurations, were evaluated on a publicly available dataset of 651,191 URL samples retrieved from Kaggle. The PSO reduced the original ten-feature space to seven discriminative features, representing a 30% dimensionality reduction. Experimental results demonstrate that all-feature models consistently outperformed their PSO-reduced counterparts, with Random Forest achieving the highest classification accuracy of 91.90% and an F1-score of 0.9165. The findings offer empirical grounding for the design of computationally efficient URL threat detection systems and provide actionable directions for future research in adversarial machine learning and real-time cybersecurity pipelines.

ElectronicsVol. 15(12)
Taibah University (SA)
Openalex Percentile: Top 2%
Spam and Phishing Detection
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.