The Internet of Things (IoT) has become an integral component in various applications, with significant prominence in healthcare and cybersecurity sectors. It is indispensable in medical diagnostics, monitoring, decision-support systems, and the safeguarding of sensitive data. However, the traditional methodologies have shown limitations in their ability to detect and classify all types of attacks effectively. This study presents a robust feature selection model, ANOVA-Recursive Feature Elimination (ANOVA-RFE), implemented with both Machine and Deep Learning paradigms, aiming to augment the security level by enhancing attack detection and classification. The models were trained using both the entire feature set and the selected features identified by ANOVA-RFE, demonstrating the efficiency and precision of the proposed method. The experiments yielded an accuracy of 100% and 99.96% using only the top five selected features from the first and second datasets, respectively. Furthermore, the performance of Gaussian Naive Bayes (GNB), K-Nearest Neighbors (K-NN), Random Forest (RF), AdaBoost (AB), Logistic Regression (LR), Decision Tree (DT), and Long Short-Term Memory (LSTM) models are evaluated, showcasing their respective accuracies on the first dataset. A scorelevel fusion was also employed, and the results were benchmarked against the current stateof-the-art, validating the robustness and high precision of the current study. Future work should consider analyzing different datasets and addressing further challenges.