Abstract
The rise of cyber attacks in network security demands strong detection mechanisms. This paper proposes an ensemble learning approach to detect wormhole and sinkhole attacks using multiple classifiers for improved accuracy. The methodology includes feature normalization and Synthetic Minority Oversampling Technique (SMOTE) for class balancing. Five classifiers Random Forest (RF), XGBoost (XGB), K-Nearest Neighbor (KNN), Support Vector Machine (SVM), and Decision Tree (DT) are trained and optimized using GridSearchCV. The top three models are combined into ensemble methods, including stacking, voting, and meta-classification. The ensemble model is evaluated using accuracy, precision, recall, F1 score, and Receiver Operating Characteristic (ROC) curve analysis, achieving 92% accuracy. A confusion matrix confirms its reliability in minimizing false positives and negatives. This study highlights ensemble learning’s role in strengthening cybersecurity against sophisticated attacks.