journal article·2025-09-15Open access

Malicious URL Detection with Advanced Machine Learning and Optimization-Supported Deep Learning Models

Fuat Türk, Mahmut Kılıçaslan

Applied Sciences· Volume 15· Issue 18

Abstract

This study presents a comprehensive comparative analysis of machine learning, deep learning, and optimization-based hybrid methods for malicious URL detection on the Malicious Phish dataset. For feature selection and model hyperparameter tuning, the Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Harris Hawk Optimizer (HHO) were employed. Both multiclass and binary classification tasks were addressed using classic machine learning algorithms such as LightGBM, XGBoost, and Random Forest, as well as deep learning models including LSTM, CNN, and hybrid CNN+LSTM architectures, with optimization support also integrated into these models. The experimental results reveal that the ELECTRA-based deep learning model achieved outstanding accuracy and F1-scores of up to 99% in both multiclass and binary scenarios. Although optimization-supported hybrid models also improved performance, the language-model-based ELECTRA architecture demonstrated a significant superiority over classical and optimized approaches. The findings indicate that optimization algorithms are effective in feature selection and enhancing model performance, yet next-generation language models clearly set a new benchmark in malicious URL detection.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Network Security and Intrusion Detection · Advanced Malware Detection Techniques · Anomaly Detection Techniques and Applications

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Computer Engineering, Faculty of Technology, Gazi University, Ankara 06500, Türkiye

Department of Statistics, Vocational School of Information Technologies, Ankara University, Ankara 06110, Türkiye

References (41)

Show source-provided references
1. deepBF: Malicious URL detection using learned bloom filter and evolutionary deep learning10.1016/j.comcom.2022.12.027 ↗
2. Malicious url classification using artificial fish swarm optimization and deep learning
3. Anomaly detection based capsnet for malicious Url detection system10.1007/s11276-025-03960-0 ↗
4. An enhanced mechanism for malicious URL detection using deep learning and DistilBERT-based feature extraction10.1007/s11227-024-06908-x ↗
5. Multi-modal features representation-based convolutional neural network model for malicious website detection10.1109/ACCESS.2023.3348071 ↗
6. Structural Analysis of URL For Malicious URL Detection Using Machine Learning
7. Exploring low-level statistical features of n-grams in phishing URLs: A comparative analysis with high-level features10.1007/s10586-024-04655-5 ↗
8. A Hybrid CNN-Brown-Bear Optimization Framework for Enhanced Detection of URL Phishing Attacks
9. PMANet: Malicious URL detection via post-trained language model guided multi-level feature attention network10.1016/j.inffus.2024.102638 ↗
10. Detection of malicious URLs using Temporal Convolutional Network and Multi-Head Self-Attention mechanism10.1016/j.asoc.2024.112540 ↗
11. Nagy, N., Aljabri, M., Shaahid, A., Ahmed, A.A., Alnasser, F., Almakramy, L., Alhadab, M., and Alfaddagh, S. (2023). Phishing URLs detection using sequential and parallel ML techniques: Comparative analysis. Sensors, 23.10.3390/s23073467 ↗
12. malicious software detection based on URL-API intensity feature selection using deep spectral neural classification for improving host security10.1142/S1469026823500025 ↗
13. Enhancing Phishing Detection: A Machine Learning Approach with Feature Selection and Deep Learning Models10.1109/ACCESS.2025.3543738 ↗
14. Detection of malicious URLs using machine learning10.1007/s11276-024-03700-w ↗
15. Enhancing malicious URL detection: A novel framework leveraging priority coefficient and feature evaluation10.1109/ACCESS.2024.3412331 ↗
16. TransURL: Improving malicious URL detection with multi-layer Transformer encoding and multi-scale pyramid features10.1016/j.comnet.2024.110707 ↗
17. Hoang, X.D., Le Minh, D., and Ninh, T.T.T. (2023, January 23–25). A CNN-Based Model for Detecting Malicious URLs. Proceedings of the 2023 RIVF International Conference on Computing and Communication Technologies (RIVF), Hanoi, Vietnam.10.1109/RIVF60135.2023.10471782 ↗
18. Su, M.-Y., and Su, K.-L. (2023). Bert-based approaches to identifying malicious urls. Sensors, 23.10.3390/s23208499 ↗
19. Elsadig, M., Ibrahim, A.O., Basheer, S., Alohali, M.A., Alshunaifi, S., Alqahtani, H., Alharbi, N., and Nagmeldin, W. (2022). Intelligent deep machine learning cyber phishing url detection based on bert features extraction. Electronics, 11.10.3390/electronics11223647 ↗
20. Islam, M.S., Jyoti, M.N.J., Mia, M.S., and Hussain, M.G. (2023, January 14–16). Fake website detection using machine learning algorithms. Proceedings of the 2023 International Conference on Digital Applications, Transformation & Economy (ICDATE), Miri, Sarawak, Malaysia.10.1109/ICDATE58146.2023.10248584 ↗
21. Hani, R.B., Amoura, M., Ammourah, M., Khalil, Y.A., and Swailm, M. (2024, January 13–15). Malicious URL detection using machine learning. Proceedings of the 2024 15th International Conference on Information and Communication Systems (ICICS), Irbid, Jordan.10.1109/ICICS63486.2024.10638299 ↗
22. Gupta, N., Thapliyal, S., Sharma, A., Sheladia, J., Wazid, M., and Giri, D. (2024, January 19–21). Deep learning approach for malicious url detection using cnn, rnn, lstm and bi-lstm models. Proceedings of the 2024 6th International Conference on Computational Intelligence and Networks (CINE), Bhubaneswar, India.10.1109/CINE63708.2024.10881598 ↗
23. Kopitar, L., Kocbek, P., Cilar, L., Sheikh, A., and Stiglic, G. (2020). Early detection of type 2 diabetes mellitus using machine learning-based prediction models. Sci. Rep., 10.10.1038/s41598-020-68771-z ↗
24. A comprehensive review on detection of cyber-attacks: Data sets, methods, challenges, and future research directions10.1016/j.iot.2022.100615 ↗
25. The random subspace method for constructing decision forests10.1109/34.709601 ↗
26. An improved random forest classifier for multi-class classification
27. Kulkarni, V.Y., and Sinha, P.K. (2012, January 18–20). Pruning of random forest classifiers: A survey and future directions. Proceedings of the 2012 International Conference on Data Science & Engineering (ICDSE), Cochin, India.10.1109/ICDSE.2012.6282329 ↗
28. Long short-term memory10.1162/neco.1997.9.8.1735 ↗
29. Muhuri, P.S., Chatterjee, P., Yuan, X., Roy, K., and Esterline, A. (2020). Using a long short-term memory recurrent neural network (LSTM-RNN) to classify network attacks. Information, 11.10.3390/info11050243 ↗
30. A comparative study and analysis of LSTM deep neural networks for heartbeats classification10.1007/s12553-021-00552-8 ↗
31. Efficiently Learning an Encoder that Classifies Token Replacements and Masked Permuted Network-Based BIGRU Attention Classifier for Enhancing Sentiment Classification of Scientific Text
32. Accelerating Federated Learning with genetic algorithm enhancements10.1016/j.eswa.2025.127636 ↗
33. OSEN-IoT: An optimized stack ensemble network with genetic algorithm for robust intrusion detection in heterogeneous IoT networks10.1016/j.eswa.2025.127183 ↗
34. Enhance URL Defacement Attack Detection Using Particle Swarm Optimization and Machine Learning
35. Almseidin, M., Gawanmeh, A., Alzubi, M., Al-Sawwa, J., Mashaleh, A.S., and Alkasassbeh, M. (2025). Hybrid deep neural network optimization with particle swarm and grey wolf algorithms for sunburst attack detection. Computers, 14.10.3390/computers14030107 ↗
36. Alohali, M.A., Alahmari, S., Aljebreen, M., Asiri, M.M., Miled, A.B., Albouq, S.S., Alrusaini, O., and Alqazzaz, A. (2025). Two stage malware detection model in internet of vehicles (IoV) using deep learning-based explainable artificial intelligence with optimization algorithms. Sci. Rep., 15.10.1038/s41598-025-00269-y ↗
37. Mitchell, M. (1998). An Introduction to Genetic Algorithms, MIT Press.
38. Evolutionary algorithms10.1002/widm.1124 ↗
39. Particle swarm optimization for single objective continuous space problems: A review10.1162/EVCO_r_00180 ↗
40. Harris hawks optimization algorithm: Variants and applications10.1007/s11831-022-09780-1 ↗
41. GramBeddings: A new neural network for URL based identification of phishing web pages through n-gram embeddings10.1016/j.cose.2022.102964 ↗