Main Article Content
Abstract
The implementation of smart water distribution systems that rely on the Internet of Things (IoT) has substantially increased the need for intrusion detection systems capable of distinguishing among various categories of attackers. Such granularity is essential for timely and appropriate incident response. The nature of telemetry streams in operational settings is imbalanced: normal traffic is prevalent, whereas the rare but important classes of attacks are represented by a small number of attacks. In such circumstances, the traditional type of classifier can achieve high overall accuracy but fails to identify minority threats of greatest operational interest. This paper introduces a multi-class attack classification model that is robust to class imbalance and operates in real time on the IoT water network, classifying samples using the Synthetic Minority Over-sampling Technique (SMOTE) combined with a Random Forest (RF) ensemble classifier. The data used in the study is a collection of 1,048,575 telemetry records that simulate smart water infrastructure behavior by combining network indicators such as AnomalyScore, DataRate, and Protocol with physical-process indicators such as WaterFlowRate (Lpm), thereby covering cyber-physical interactions. An RF model trained on the original imbalanced dataset is compared with one trained on SMOTE-balanced data and evaluated on an unseen imbalanced test set. Even though the baseline achieves 99.3% accuracy, its recall is 0% for the rare DoS and DDoS classes. However, in comparison, the SMOTE-enhanced model obtains 99.88% accuracy and a higher recall of 92.31% for DoS and 99.66% for DDoS, and the macro- averaged F1-score rises from 0.60 to 0.93. The most discriminative features are recognized as AnomalyScore, DataRate, and WaterFlowRate (Lpm), which support interpretability and informed decision-making in sustainability-sensitive smart water infrastructure.
Keywords
Article Details
References
- M. M. Althobaiti. Intelligent intrusion detection for IoT and cyber-physical systems using machine learning. International Journal of Advances in Applied Sciences, vol. 14, no. 1, pp. 1–10,2025. DOI: 0.21833/ijaas.2025.06.009
- S. U. Jan; S. Ahmed; V. Shakho; I. Koo. Toward a lightweight Intrusion Detection System for the Internet of Things. IEEE Access, vol. 7,2019.DOI: 10.1109/ACCESS.2019.2907965
- T. Saranya; S. I. Priyadharshini. A Dual-strategy framework for cyber threat detection in imbalanced,high-dimensional data across heterogeneous networks. IEEE Access, vol. 13, pp. 125313-125331,2025.DOI: 0.1109/ACCESS.2025.3582788
- R. Ahmad; I. Alsmadi. Machine learning approaches to IoT security: A systematic literature review. Internet of Things,vol. 14,2024. DOI: 10.1016/j.iot.2021.100365
- L. Xiao. IoT security techniques based on machine learning: How do IoT devices use ai to enhance security? IEEE Signal Processing Magazine, vol.35,2019.DOI:10.14445/22312803/IJCTTV 7I2P110
- H. Fares; M. Zeroual; A. Karim; Y. Maleh; Y. Baddi; N. Aknin. Machine learning, deep learning and ensemble learning based approaches for intrusion detection enhancement. Edpacs, vol. 69, no. 1, pp.1–15,2024. DOI: 10.1080/07366981.2024.2422645
- A. Alrefaei; M. Ilyas. Using machine learning multiclass classification technique to detect IoT attacks in real time in Italian National ConferenceonSensors,pp.1-6,2024. DOI:10.3390/s24144516
- M. Bokhari; M. Z. Khan; F. Masoodi; M. Zeyauddin. Bagging ensemble model performance in IoT cyberattack detection: A comprehensive evaluation.In 12th International Conference on Computing for Sustainable Global Development
- (INDIACom),2025, DOI:10.23919/INDIACom66777.2025.11115395
- Y. Zhou; Guang Cheng; Shanqing Jiang; Mian Dai. Building an efficient intrusion detection system based on feature selection and ensemble classifier.Computer Networks,Vol.174,2020. DOI: 10.1016/j.comnet.2020.107247
- A. Thakkar; R. Lohiya. Attack classification of imbalanced intrusion data for IoT network using ensemble learning-based deep neural network. IEEE Internet of Things Journal, vol. 10, no.13, 2023.DOI:10.1109/JIOT.2023.3244810
- K. Shaukat; S. Luo; V. Varadharajan. Performance comparison and current challenges of using machine learning techniques in cyber-security. Energies, vol.13, no. 10, p. 2509,2020.DOI: 10.3390/en13102509
- R. Tanty; P. B. Dash; J. Nayak; B. Naik. Intelligent Intrusion Detection in military IoT networks using recursive feature elimination with extreme gradient boosting. In 2025 4th International Conference on Range Technology (ICORT), pp. 1–6,2025,.DOI: 10.1109/ICORT64008.2025.11115621
- D. Elreedy; A. F. Atiya. A comprehensive analysis of synthetic minority oversampling technique (SMOTE) for handling class imbalance. Information Sciences, vol. 505,2020.DOI: 10.1016/j.ins.2019.07.070
- C. Hazman. lids-sioel: Intrusion detection framework for IoT-based smart environments security using ensemble learning, Cluster Computing, vol. 26,2022.DOI: 10.1007/s10586-022-03810-0
- A. Abbas; M. A. Khan; S. Latif. A new ensemble-based intrusion detection system for internet of things. Arabian Journal for Science and Engineering,vol.47,no.2,2025. DOI: 10.1007/s13369-021-06086-5
- R. Chowdhury. An optimal feature-based network intrusion detection system using bagging ensemble method for real-time traffic analysis. Multimedia Tools and Applications,vol.81,no.28,2023.DOI: 10.1007/s11042-022-12330-
- S. S. Sonawane. Optimized deep feature analysis for enhanced botnet attack prediction in IoT networks. Journal of Information Systems Engineering&Management,vol.10,2025.DOI:10.52783/jisem.v10i3s.413
- M. Douiba; S. Benkirane; A. Guezzaz; M. Azrour. An improved anomaly detection model for IoT security using decision tree and gradient boosting. The Journal of Supercomputing, vol. 79, no. 3, pp. 3392– 3411, 2023.DOI:0.1007/s11227-022-04783-y
- L. Yang. Intrusion detection based on approximate information entropy for random forest classification. in 2019 4th International Conference on Big Data and Computing (ICBDC 2019), 2019.DOI: 10.1145/3335484.3335488
- N. Gupta; V. Jindal; P. Bedi. CSE-IDS: Using cost-sensitive deep learning and ensemble algorithms to handle class imbalance in network-based intrusion detection systems. Computer Security,vol.112,2022. DOI:10.1016/j.cose.2021.102499
- M. Altalhan; A. Algarni; M. T.-H. Alouane.Imbalanced data problem in machine learning: A Review. IEEEAccess,vol.13,2025.
- DOI: 10.1109/ACCESS.2025.3531662
- S. Bagui; K. Li. Resampling imbalanced data for network intrusion detection datasets. Journal of Big Data,vol. 8, no. 1,2021.
- DOI: 10.1186/s40537-020-00390-x
- M. A. Talukder; M. Khalid; N. Sultana. A hybrid
- machine learning model for intrusion detection in wireless sensor networks leveraging data balancing and dimensionality reduction. Scientific Reports, vol.15, no. 1,2025.DOI: 10.1038/s41598- 025-87028-1
- S. Sadhwani; B. Manibalan; R. Muthalagu; P. Pawar. A lightweight model for DDoS attack detection using machine learning techniques, Applied Sciences, MDPI, vol. 13, no. 15, p. 8712,2023.DOI: 10.3390/app13179937
- V. Patel; H. Shukla; A. Raval. Enhancing botnet detection with machine learning and explainable AI: A step towards trustworthy ai security. International Journal for Multidisciplinary Research,vol. 7, no. 1,2025.DOI: 10.36948/ijfmr.2025.v07i02.39353
- J. Manokaran; G. Vairavel; J. Vijaya. PPFCM-smote: a novel balancing system for anomaly detection in IoT edge using probabilistic possibilistic fuzzy clustering and smote. International Journal of Information Technology, 2024.DOI: 0.1007/s41870-024-02129-w
- M. B. Musthafa. Optimizing IoT intrusion detection using balanced class distribution, feature selection and ensemble machine learning techniques Sensors,MDPI, vol. 24, no. 13, 2024.DOI: 10.3390/s24134293
- Shaher Zyoud. Exploring the promising role of internet of things in urban water systems: a comprehensive global analysis of insights, trends and research priorities. Discover Internet of Things, vol.5,2025. DOI: 10.1007/s43926-025-00129-1
- W. Rajeh; M. M. Aborokbah; M. S., T. Alashoor; K.
- P. Tabnet-SFO: An Intrusion Detection Model for smart water management in smart cities. International Journal of Intelligent Systems, vol.2025,p.6281847,2025.DOI: 10.1155/int/6281847
- N. N. Tilakarathne and W. D. Madhuka Priyashan. An Overview of Security and Privacy in Smart Cities.EAI/Springer Innovations in Communication and Computing (2022): 21–44, DOI:10.1007/978-3-030-82715-1_2.
- O. D. Okey. Boostedenml: Efficient technique for detecting cyberattacks in IoT systems using boosted ensemble machine learning. Sensors, MDPI, vol. 22, no. 19,2022.DOI: 10.3390/s22197409
- P. K. Keserwani. A Smart Anomaly-based Intrusion Detection System for the Internet of Things (IoT)network using gwo-pso-rf model, Journal of Reliable Intelligent Environments, vol. 7, no. 1,2021.DOI:10.1007/s40860-020-00126-x
- A. S. Ahanger; S. M. Khan; F. Masoodi. Intrusion detection system for IoT environment using ensemble approaches. In 2023 10th International Conference on Computing for Sustainable Global Development (INDIACom), pp. 1–6,2023.URL:https://ieeexplore.ieee.org/abstract/document/10112382
- P. Verma. A novel intrusion detection approach using machine learning ensemble for IoT environments. Applied Sciences, vol. 11, no. 21,2021.DOI: 10.3390/app112110268
- Y. Cao. An intrusion detection system based on stacked ensemble learning for IoT network. Computers and Electrical Engineering,vol. 110,2023.DOI:10.1016/j.compeleceng.2023.108836
- W. Lian; Guoqing Nie; Bin Jia; Dandan Shi; Yongquan Liang. An intrusion detection method based on decision tree-recursive feature elimination in ensemble learning. Mathematical Problems in Engineering, vol 2020, issue 1,2020. DOI: 10.1155/2020/2835023
- M. B. Pranto; Md. Hasibul Alam Ratul; Md. Mahidur Rahman; Ishrat Jahan Diya; Zunayeed-Bin Zahir. Performance of machine learning techniques in anomaly detection with basic feature selection strategy-a network intrusion detection system. Journal of Advanced Information Technology, vol. 13, no. 1,2022.DOI: 10.12720/jait.13.1.36-44
- S. Alangari. An unsupervised machine learning algorithm for attack and anomaly detection in IoT sensors,” Wireless Personal Communications,vol. 144,2024.DOI: 10.1007/s11277-023-10811-8
- M. N. Kanyama; F. B. Shava; A. M. Gamundani; A. Hartmann. Machine learning applications for anomaly detection in smart ater metering networks: A systematic review. Physics and Chemistry of the Earth, vol. 134, p. 103558, 2025. DOI: 10.1016/j.pce.2024.103558
- J. Wang; J. E. van Zyl; L. Wen;Y. Li; S. Che. The impact of smart meter programmes on household water consumption: evidence from new Zealand, Journal of Behavioral and Experimental Economics, vol. 118, p. 102413, 2025.DOI: 10.1016/j.socec.2025.102413
- Hajar Hameed Addeen, Yang Xiao, Jiacheng li, and Mohsen Guizani. A Survey of Cyber-Physical Attacks and Detection Methods in Smart Water Distribution Systems. IEEE Access,vol-9,2021.DOI:10.1109/ACCESS.2021.3095713
References
M. M. Althobaiti. Intelligent intrusion detection for IoT and cyber-physical systems using machine learning. International Journal of Advances in Applied Sciences, vol. 14, no. 1, pp. 1–10,2025. DOI: 0.21833/ijaas.2025.06.009
S. U. Jan; S. Ahmed; V. Shakho; I. Koo. Toward a lightweight Intrusion Detection System for the Internet of Things. IEEE Access, vol. 7,2019.DOI: 10.1109/ACCESS.2019.2907965
T. Saranya; S. I. Priyadharshini. A Dual-strategy framework for cyber threat detection in imbalanced,high-dimensional data across heterogeneous networks. IEEE Access, vol. 13, pp. 125313-125331,2025.DOI: 0.1109/ACCESS.2025.3582788
R. Ahmad; I. Alsmadi. Machine learning approaches to IoT security: A systematic literature review. Internet of Things,vol. 14,2024. DOI: 10.1016/j.iot.2021.100365
L. Xiao. IoT security techniques based on machine learning: How do IoT devices use ai to enhance security? IEEE Signal Processing Magazine, vol.35,2019.DOI:10.14445/22312803/IJCTTV 7I2P110
H. Fares; M. Zeroual; A. Karim; Y. Maleh; Y. Baddi; N. Aknin. Machine learning, deep learning and ensemble learning based approaches for intrusion detection enhancement. Edpacs, vol. 69, no. 1, pp.1–15,2024. DOI: 10.1080/07366981.2024.2422645
A. Alrefaei; M. Ilyas. Using machine learning multiclass classification technique to detect IoT attacks in real time in Italian National ConferenceonSensors,pp.1-6,2024. DOI:10.3390/s24144516
M. Bokhari; M. Z. Khan; F. Masoodi; M. Zeyauddin. Bagging ensemble model performance in IoT cyberattack detection: A comprehensive evaluation.In 12th International Conference on Computing for Sustainable Global Development
(INDIACom),2025, DOI:10.23919/INDIACom66777.2025.11115395
Y. Zhou; Guang Cheng; Shanqing Jiang; Mian Dai. Building an efficient intrusion detection system based on feature selection and ensemble classifier.Computer Networks,Vol.174,2020. DOI: 10.1016/j.comnet.2020.107247
A. Thakkar; R. Lohiya. Attack classification of imbalanced intrusion data for IoT network using ensemble learning-based deep neural network. IEEE Internet of Things Journal, vol. 10, no.13, 2023.DOI:10.1109/JIOT.2023.3244810
K. Shaukat; S. Luo; V. Varadharajan. Performance comparison and current challenges of using machine learning techniques in cyber-security. Energies, vol.13, no. 10, p. 2509,2020.DOI: 10.3390/en13102509
R. Tanty; P. B. Dash; J. Nayak; B. Naik. Intelligent Intrusion Detection in military IoT networks using recursive feature elimination with extreme gradient boosting. In 2025 4th International Conference on Range Technology (ICORT), pp. 1–6,2025,.DOI: 10.1109/ICORT64008.2025.11115621
D. Elreedy; A. F. Atiya. A comprehensive analysis of synthetic minority oversampling technique (SMOTE) for handling class imbalance. Information Sciences, vol. 505,2020.DOI: 10.1016/j.ins.2019.07.070
C. Hazman. lids-sioel: Intrusion detection framework for IoT-based smart environments security using ensemble learning, Cluster Computing, vol. 26,2022.DOI: 10.1007/s10586-022-03810-0
A. Abbas; M. A. Khan; S. Latif. A new ensemble-based intrusion detection system for internet of things. Arabian Journal for Science and Engineering,vol.47,no.2,2025. DOI: 10.1007/s13369-021-06086-5
R. Chowdhury. An optimal feature-based network intrusion detection system using bagging ensemble method for real-time traffic analysis. Multimedia Tools and Applications,vol.81,no.28,2023.DOI: 10.1007/s11042-022-12330-
S. S. Sonawane. Optimized deep feature analysis for enhanced botnet attack prediction in IoT networks. Journal of Information Systems Engineering&Management,vol.10,2025.DOI:10.52783/jisem.v10i3s.413
M. Douiba; S. Benkirane; A. Guezzaz; M. Azrour. An improved anomaly detection model for IoT security using decision tree and gradient boosting. The Journal of Supercomputing, vol. 79, no. 3, pp. 3392– 3411, 2023.DOI:0.1007/s11227-022-04783-y
L. Yang. Intrusion detection based on approximate information entropy for random forest classification. in 2019 4th International Conference on Big Data and Computing (ICBDC 2019), 2019.DOI: 10.1145/3335484.3335488
N. Gupta; V. Jindal; P. Bedi. CSE-IDS: Using cost-sensitive deep learning and ensemble algorithms to handle class imbalance in network-based intrusion detection systems. Computer Security,vol.112,2022. DOI:10.1016/j.cose.2021.102499
M. Altalhan; A. Algarni; M. T.-H. Alouane.Imbalanced data problem in machine learning: A Review. IEEEAccess,vol.13,2025.
DOI: 10.1109/ACCESS.2025.3531662
S. Bagui; K. Li. Resampling imbalanced data for network intrusion detection datasets. Journal of Big Data,vol. 8, no. 1,2021.
DOI: 10.1186/s40537-020-00390-x
M. A. Talukder; M. Khalid; N. Sultana. A hybrid
machine learning model for intrusion detection in wireless sensor networks leveraging data balancing and dimensionality reduction. Scientific Reports, vol.15, no. 1,2025.DOI: 10.1038/s41598- 025-87028-1
S. Sadhwani; B. Manibalan; R. Muthalagu; P. Pawar. A lightweight model for DDoS attack detection using machine learning techniques, Applied Sciences, MDPI, vol. 13, no. 15, p. 8712,2023.DOI: 10.3390/app13179937
V. Patel; H. Shukla; A. Raval. Enhancing botnet detection with machine learning and explainable AI: A step towards trustworthy ai security. International Journal for Multidisciplinary Research,vol. 7, no. 1,2025.DOI: 10.36948/ijfmr.2025.v07i02.39353
J. Manokaran; G. Vairavel; J. Vijaya. PPFCM-smote: a novel balancing system for anomaly detection in IoT edge using probabilistic possibilistic fuzzy clustering and smote. International Journal of Information Technology, 2024.DOI: 0.1007/s41870-024-02129-w
M. B. Musthafa. Optimizing IoT intrusion detection using balanced class distribution, feature selection and ensemble machine learning techniques Sensors,MDPI, vol. 24, no. 13, 2024.DOI: 10.3390/s24134293
Shaher Zyoud. Exploring the promising role of internet of things in urban water systems: a comprehensive global analysis of insights, trends and research priorities. Discover Internet of Things, vol.5,2025. DOI: 10.1007/s43926-025-00129-1
W. Rajeh; M. M. Aborokbah; M. S., T. Alashoor; K.
P. Tabnet-SFO: An Intrusion Detection Model for smart water management in smart cities. International Journal of Intelligent Systems, vol.2025,p.6281847,2025.DOI: 10.1155/int/6281847
N. N. Tilakarathne and W. D. Madhuka Priyashan. An Overview of Security and Privacy in Smart Cities.EAI/Springer Innovations in Communication and Computing (2022): 21–44, DOI:10.1007/978-3-030-82715-1_2.
O. D. Okey. Boostedenml: Efficient technique for detecting cyberattacks in IoT systems using boosted ensemble machine learning. Sensors, MDPI, vol. 22, no. 19,2022.DOI: 10.3390/s22197409
P. K. Keserwani. A Smart Anomaly-based Intrusion Detection System for the Internet of Things (IoT)network using gwo-pso-rf model, Journal of Reliable Intelligent Environments, vol. 7, no. 1,2021.DOI:10.1007/s40860-020-00126-x
A. S. Ahanger; S. M. Khan; F. Masoodi. Intrusion detection system for IoT environment using ensemble approaches. In 2023 10th International Conference on Computing for Sustainable Global Development (INDIACom), pp. 1–6,2023.URL:https://ieeexplore.ieee.org/abstract/document/10112382
P. Verma. A novel intrusion detection approach using machine learning ensemble for IoT environments. Applied Sciences, vol. 11, no. 21,2021.DOI: 10.3390/app112110268
Y. Cao. An intrusion detection system based on stacked ensemble learning for IoT network. Computers and Electrical Engineering,vol. 110,2023.DOI:10.1016/j.compeleceng.2023.108836
W. Lian; Guoqing Nie; Bin Jia; Dandan Shi; Yongquan Liang. An intrusion detection method based on decision tree-recursive feature elimination in ensemble learning. Mathematical Problems in Engineering, vol 2020, issue 1,2020. DOI: 10.1155/2020/2835023
M. B. Pranto; Md. Hasibul Alam Ratul; Md. Mahidur Rahman; Ishrat Jahan Diya; Zunayeed-Bin Zahir. Performance of machine learning techniques in anomaly detection with basic feature selection strategy-a network intrusion detection system. Journal of Advanced Information Technology, vol. 13, no. 1,2022.DOI: 10.12720/jait.13.1.36-44
S. Alangari. An unsupervised machine learning algorithm for attack and anomaly detection in IoT sensors,” Wireless Personal Communications,vol. 144,2024.DOI: 10.1007/s11277-023-10811-8
M. N. Kanyama; F. B. Shava; A. M. Gamundani; A. Hartmann. Machine learning applications for anomaly detection in smart ater metering networks: A systematic review. Physics and Chemistry of the Earth, vol. 134, p. 103558, 2025. DOI: 10.1016/j.pce.2024.103558
J. Wang; J. E. van Zyl; L. Wen;Y. Li; S. Che. The impact of smart meter programmes on household water consumption: evidence from new Zealand, Journal of Behavioral and Experimental Economics, vol. 118, p. 102413, 2025.DOI: 10.1016/j.socec.2025.102413
Hajar Hameed Addeen, Yang Xiao, Jiacheng li, and Mohsen Guizani. A Survey of Cyber-Physical Attacks and Detection Methods in Smart Water Distribution Systems. IEEE Access,vol-9,2021.DOI:10.1109/ACCESS.2021.3095713