Performance Analysis of Random Forest, Decision Tree, and Naive Bayes for Phishing Link Detection Based on URL Features
DOI:
https://doi.org/10.25181/rt.v5i1.4330Keywords:
Phishing, Random Forest, Decision Tree, Naive Bayes, Machine LearningAbstract
Phishing attacks through fake links remain one of the most common cybersecurity threats and can lead to data breaches for computer network users. Manual detection is often ineffective because phishing methods continue to evolve, with link patterns that closely resemble legitimate domains. This experiment aims to analyze the performance of three classification algorithms—Random Forest, Decision Tree, and Naive Bayes—in detecting phishing links based on basic URL features. The experiment is expected to assist in the automatic recognition of phishing URLs based on link characteristics analyzed using machine learning methods. The process involves collecting a dataset containing both phishing and legitimate links, followed by feature extraction such as URL length, hostname length, number of specific symbols, detection of IP addresses in the domain, use of URL shortening services, and prefix-suffix patterns in the hostname. The dataset is divided into training and testing data with an 80:20 ratio. The models are trained using the three algorithms and tested to compare their accuracy, precision , recall, and F1-score. The testing results show that the Random Forest algorithm achieved the highest accuracy of 80.75%, with balanced precision and recall. Meanwhile, the Decision Tree achieved an accuracy of 77.73%, and Naive Bayes only reached 68.15%. These findings indicate that Random Forest is the most suitable for detecting phishing links based on simple URL feature analysis. Therefore, this model can be applied as an early detection system to minimize phishing attack risks in various environments.
Downloads
References
K. S. Y. A. Lucky Nurhadiyanto, “Ancaman Risiko Keamanan Theft Identity Pada Aplikasi Berbasis Artificial Intelligence Dalam Perspektif Lifestyle Exposure Theory,” Ikra-Ith Hum. J. Sos. Dan Hum., Vol. 8, No. 2, Juli. 2024.
“A Literature Review On Classification Of Phishing Attacks,” Int. J. Adv. Technol. Eng. Explor., Vol. 9, No. 89, Apr. 2022, Doi: 10.19101/Ijatee.2021.875031.
Lukito And W. B. T. Handaya, “Deteksi Website Phishing Menggunakan Teknik Machine Learning,” J. Inform. Atma Jogja, Vol. 6, No. 1, Art. No. 1, May 2025, Doi: 10.24002/Jiaj.V6i1.11538.
A. F. Mahmud And S. Wirawan, “Phishing Website Detection Using Machine Learning Classification Method,” Sistemasi, Vol. 13, No. 4, P. 1368, Jul. 2024, Doi: 10.32520/Stmsi.V13i4.3456.
R. Fauzan, A. V. Vitianingsih, D. Cahyono, A. L. Maukar, And Y. A. B. Suprio, “Penerapan Algoritma Klasifikasi Pada Machine Learning Untuk Deteksi Phishing: Application Of Classification Algorithms In Machine Learning For Phishing Detection,” Malcom Indones. J. Mach. Learn. Comput. Sci., Vol. 5, No. 2, Pp. 531–540, Mar. 2025, Doi: 10.57152/Malcom.V5i2.1968.
A. F. Mahmud And S. Wirawan, “Phishing Website Detection Using Machine Learning Classification Method,” Sistemasi, Vol. 13, No. 4, P. 1368, Jul. 2024, Doi: 10.32520/Stmsi.V13i4.3456.
D. Lusiyanti, S. Musdalifah, A. Sahari, and I. A. Fajri, “Evaluasi Kinerja Algoritma Machine learning pada Dataset Skala Besar,” MathVision J. Mat., vol. 7, no. 1, pp. 84–92, Mar. 2025, doi: 10.55719/mv.v7i1.1661
A. Raihan, M. Fadhli, And L. Lindawati, “Implementation Of Deep Learning For Detecting Phishing Attacks On Websites With Combination Of Cnn And Lstm,” J. Tek. Inform. Jutif, Vol. 5, No. 5, Pp. 1451– 1459, Oct. 2024, Doi: 10.52436/1.Jutif.2024.5.5.2446.
V. A. Windarni, A. F. Nugraha, S. T. A. Ramadhani, D. A. Istiqomah, F. M. Puri, And A. Setiawan, “Deteksi Website Phishing Menggunakan Teknik Filter Pada Model Machine Learning,” Inf. Syst. J., Vol. 6, No. 01, Art. No. 01, Aug. 2023, Doi: 10.24076/Infosjournal.2023v6i01.1268.
M. A. Sembiring, H. Saputra, R. A. Yusda, S. Sutarman, And E. B. Nababan, “Performance Of Robust Support Vector Machine Classification Model On Balanced, Imbalanced And Outliers Datasets,” Jitk J. Ilmu Pengetah. Dan Teknol. Komput., Vol. 10, No. 1, Pp. 208–215, Aug. 2024, Doi: 10.33480/Jitk.V10i1.5272.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Silcilia, Nadira Parsha Salsabila, Tarisza Apriani

This work is licensed under a Creative Commons Attribution 4.0 International License.



