Abstract

Phishing and social engineering attacks are significant threats in email-based digital communications. The research process begins with the data preprocessing stage which includes data cleaning, case folding, stopwords removal, and tokenizing. Text features are extracted using the TF-IDF method to produce a numerical representation. The dataset used is divided into training data (80%) and test data (20%) to ensure fair evaluation. The model was developed using Random Forest and Naive Bayes algorithms. Evaluation is carried out with metrics such as accuracy, precision, recall, and F1-score. The research results show that the Random Forest algorithm provides the best performance with an accuracy of 0.8996, precision 0.90, recall 0.90, and F1-score 0.90. Meanwhile, the Naive Bayes algorithm produces an accuracy of 0.6048, precision 0.65, recall 0.60, and F1-score 0.59. This research proves that Random Forest is superior in detecting phishing and social engineering attacks compared to Naive Bayes. The system developed can be an effective solution for increasing the security of email-based communications. It is hoped that the results of this research can contribute to the development of cyber threat detection technology in the future.