Random Forest’s Impact on Real-time Phishing Defence

By: KUKUTLA TEJONATH REDDY, International Center for AI and Cyber Security Research and Innovations (CCRI), Asia University, Taiwan, tejonath45@gmail.com


Phishing attacks represent an ongoing and evolving threat in the digital landscape, requiring new methods of detection and prevention. This article examines in detail the effectiveness of Random Forest, an ensemble learning algorithm, in phishing detection. The strength of Random Forest lies in its ability to analyse a variety of attributes, including URL components, content analysis, sender information (for email), and SSL/TLS certification information for Explores the benefits, a its attributes importance, and emphasizes its role in strengthening cybersecurity defences against ever-evolving phishing threats.


Phishing attacks have become increasingly sophisticated, posing significant risks to individuals and organizations. As technology advances, so do the ways cybercriminals deceive users and obtain sensitive information without their permission. Machine learning algorithms used in cybersecurity have proven to be a powerful tool to combat these malicious practices. One such algorithm, Random Forest, is popular for its effectiveness in phishing detection [1].

Understanding Random Forests:

Random forest is a cluster learning algorithm that combines the strengths of multiple decision trees to produce more accurate and robust predictions. For phishing detection, RandomOne analyses various extracts from websites and emails to determine if they are a legitimate or potential phishing threat [2][3].

Figure : Working of Random Forest

Feature Extraction:

Random Forest’s success in phishing detection lies in its ability to assess a variety of factors. These factors include:

URL Components:

  • Length of the URL
  • Presence of special characters
  • Number of subdomains

Content Analysis:

  • Keywords indicative of phishing (e.g., “login,” “password,” “verify”)
  • HTML and JavaScript analysis

Sender Information (for emails):

  • Sender’s email address
  • Email header analysis

SSL/TLS Certificate Details:

  • Validity period
  • Certificate issuer

Training the Random Forest Model:

The Random Forest algorithm is trained on a labelled data set, with patterns marked as legitimate or phishing. During training, the algorithm builds multiple decision trees, each considering a small set of random parameters. This randomness helps to better generalize the model to new and unseen data.

Cross-validation methods are often used to ensure that model performance is robust to different subsets of the dataset. This iteration increases random forest’s ability to accurately classify phishing threats while reducing the risk of overfitting.

Benefits of random forests in phishing detection:

High Accuracy:

Random forests generally have greater accuracy in distinguishing between formal firms and equity firms, due to a number of decision trees.

Importance of the feature:

The algorithm provides insight into the importance of features, and helps cybersecurity experts understand which characteristics are most helpful in detecting phishing.


Random forests are too often less appropriate than individual decision trees, making them a robust way to deal with diverse and changing phishing techniques.

Real-time detection:

Random forest activity enables real-time or near-real-time phishing detection, which is critical in the rapidly evolving cybersecurity landscape.


As the complexity of phishing attacks increases, the need for advanced and adaptive detection technologies becomes paramount. With its ability to handle a variety of factors and provide accurate predictions, Random Forest stands out as a valuable tool in the arsenal of cybersecurity professionals Using the capabilities of Random Forest in phishing detection doesn’t provide not only increases threat identification, but also contributes to ongoing efforts to create a secure digital environment for both individuals and organizations.


  1. Weedon, M., Tsaptsinos, D., & Denholm-Price, J. (2017, June). Random forest explorations for URL classification. In 2017 International Conference On Cyber Situational Awareness, Data Analytics And Assessment (Cyber SA) (pp. 1-4). IEEE.
  2. Gupta, B. B., Yadav, K., Razzak, I., Psannis, K., Castiglione, A., & Chang, X. (2021). A novel approach for phishing URLs detection using lexical based machine learning in a real-time environment. Computer Communications, 175, 47-57.
  3. Akinyelu, A. A., & Adewumi, A. O. (2014). Classification of phishing email using random forest machine learning technique. Journal of Applied Mathematics, 2014.
  4. Yang, R., Zheng, K., Wu, B., Wu, C., & Wang, X. (2021). Phishing website detection based on deep convolutional neural network and random forest ensemble learning. Sensors, 21(24), 8281.
  5. Yang, R., Zheng, K., Wu, B., Wu, C., & Wang, X. (2021). Phishing website detection based on deep convolutional neural network and random forest ensemble learning. Sensors, 21(24), 8281.
  6. Sadique, F., Kaul, R., Badsha, S., & Sengupta, S. (2020, January). An automated framework for real-time phishing URL detection. In 2020 10th Annual Computing and Communication Workshop and Conference (CCWC) (pp. 0335-0341). IEEE.
  7. Deveci, M., Pamucar, D., Gokasar, I., Köppen, M., & Gupta, B. B. (2022). Personal mobility in metaverse with autonomous vehicles using Q-rung orthopair fuzzy sets based OPA-RAFSI model. IEEE Transactions on Intelligent Transportation Systems.
  8. Cvitić, I., Perakovic, D., Gupta, B. B., & Choo, K. K. R. (2021). Boosting-based DDoS detection in internet of things systems. IEEE Internet of Things Journal9(3), 2109-2123.
  9. Lv, L., Wu, Z., Zhang, L., Gupta, B. B., & Tian, Z. (2022). An edge-AI based forecasting approach for improving smart microgrid efficiency. IEEE Transactions on Industrial Informatics18(11), 7946-7954.
  10. Stergiou, C. L., Psannis, K. E., & Gupta, B. B. (2021). InFeMo: flexible big data management through a federated cloud system. ACM Transactions on Internet Technology (TOIT)22(2), 1-22.
  11. Almomani, A., Alauthman, M., Shatnawi, M. T., Alweshah, M., Alrosan, A., Alomoush, W., & Gupta, B. B. (2022). Phishing website detection with semantic features based on machine learning classifiers: a comparative study. International Journal on Semantic Web and Information Systems (IJSWIS)18(1), 1-24.

Cite As

REDDY K.T (2023) Random Forest’s Impact on Real-time Phishing Defence, Insights2Techinfo, pp.1

64080cookie-checkRandom Forest’s Impact on Real-time Phishing Defence
Share this:

Leave a Reply

Your email address will not be published.