The Internet of Medical Things (IoMT) connects medical devices through communication networks to support healthcare monitoring and services, but this connectivity also increases exposure to cyberattacks, including Distributed Denial of Service (DDoS). This study evaluates the Random Forest algorithm for attack detection in IoMT traffic using the CICIoMT2024 dataset. The dataset contains 416,047 samples, 45 numerical features, and six classes: Benign, DDoS, DoS, MQTT, Recon, and Spoofing. The research includes preprocessing, an 80:20 stratified split, class imbalance handling using Synthetic Minority Oversampling Technique (SMOTE) for binary classification while retaining the original multiclass training distribution, and hyperparameter optimization using Grid Search Cross-Validation. The model was evaluated using accuracy, precision, recall, F1-score, confusion matrix, and Area Under the Curve–Receiver Operating Characteristic (AUC-ROC). The binary scenario achieved 99.56% accuracy, 99.57% precision, 99.56% recall, 99.56% F1-score, and 0.9998 AUC-ROC. The multiclass scenario achieved 99.43% accuracy, 99.43% precision, 99.43% recall, 99.42% F1-score, and a macro-average AUC-ROC of 0.9999. Feature importance analysis identified rst_count, psh_flag_number, Max, and Rate as the most influential features. These findings indicate that Random Forest can accurately detect IoMT traffic while identifying network characteristics that support practical monitoring and security hardening in IoMT infrastructure.
Copyrights © 2026