Random Forest-Based Detection of Phishing E-mails Using Feature-Engineered Machine Learning Attributes
Abstract
Phishing e-mail continues to pose a significant cybersecurity threat by impersonating trusted entities to deceive users into disclosing sensitive information. This study investigates the effectiveness of a Random Forest classifier trained on feature-engineered e-mail attributes to detect phishing messages. The dataset comprised 524,846 e-mails with numerical features such as word counts, unique words, stopwords, links, domains, e-mail addresses, spelling errors, and urgency keywords; after removing duplicates, 205,052 instances remained and were split into training and testing sets at a 70:30 ratio. The model achieved an overall accuracy of 97.12 percent and an ROC-AUC score of 0.81. Analysis of the confusion matrix indicated high reliability in identifying safe e-mails, while the recall for phishing e-mails remained low due to severe class imbalance. These findings demonstrate that Random Forest offers a strong baseline for feature-based phishing detection, but further strategies to address class imbalance are required to improve phishing-class sensitivity.