Machine Learning Based Network Traffic Analyser for Malicious and Benign Traffic Detection

S. Immanuel Alex, Akshata, J. Shashank, Syed Thouheed Ahmed · 2025

The increasing reliance on digital networks and online services has made network traffic analysis crucial for ensuring security. Modern networks face challenges from dynamic traffic and widespread use of VPNs and encryption, often exploited by malicious actors to mask activities, rendering traditional rule-based detection ineffective. This study leverages a supervised Random Forest Classifier to classify network traffic as benign or malicious by analyzing key features such as protocol types, packet lengths, and source-destination relationships. Preprocessing steps, including protocol encoding, feature normalization, and class balancing, addressed issues of missing data, class imbalance, and feature standardization. The Random Forest Classifier, known for robustness and resistance to overfitting, aggregates decision trees to improve accuracy, achieving 94.97% accuracy, 97% F1 score, 99% precision, and 97% recall. This work presents an effective architecture and implementation, significantly contributing to advanced network traffic analysis and enhancing modern network security.

Read the paper · More papers on PaperTik