Open AccessOpen Access


Malicious Traffic Detection in IoT and Local Networks Using Stacked Ensemble Classifier

R. D. Pubudu L. Indrasiri1, Ernesto Lee2, Vaibhav Rupapara3, Furqan Rustam4, Imran Ashraf5,*

1 School of Computing and Mathematics, Charles Sturt University, Australia
2 Department of Computer Science, Broward College, Broward County, Florida, USA
3 School of Computing and Information Sciences, Florida International University, USA
4 Department of Computer Science, Khwaja Fareed University of Engineering and Information Technology, Rahim Yar Khan, Pakistan
5 Department of Information and Communication Engineering, Yeungnam University, Gyeongsan-si, 38541, Korea

* Corresponding Author: Imran Ashraf. Email:

Computers, Materials & Continua 2022, 71(1), 489-515.


Malicious traffic detection over the internet is one of the challenging areas for researchers to protect network infrastructures from any malicious activity. Several shortcomings of a network system can be leveraged by an attacker to get unauthorized access through malicious traffic. Safeguard from such attacks requires an efficient automatic system that can detect malicious traffic timely and avoid system damage. Currently, many automated systems can detect malicious activity, however, the efficacy and accuracy need further improvement to detect malicious traffic from multi-domain systems. The present study focuses on the detection of malicious traffic with high accuracy using machine learning techniques. The proposed approach used two datasets UNSW-NB15 and IoTID20 which contain the data for IoT-based traffic and local network traffic, respectively. Both datasets were combined to increase the capability of the proposed approach in detecting malicious traffic from local and IoT networks, with high accuracy. Horizontally merging both datasets requires an equal number of features which was achieved by reducing feature count to 30 for each dataset by leveraging principal component analysis (PCA). The proposed model incorporates stacked ensemble model extra boosting forest (EBF) which is a combination of tree-based models such as extra tree classifier, gradient boosting classifier, and random forest using a stacked ensemble approach. Empirical results show that EBF performed significantly better and achieved the highest accuracy score of 0.985 and 0.984 on the multi-domain dataset for two and four classes, respectively.


Cite This Article

R. D. Pubudu L. Indrasiri, E. Lee, V. Rupapara, F. Rustam and I. Ashraf, "Malicious traffic detection in iot and local networks using stacked ensemble classifier," Computers, Materials & Continua, vol. 71, no.1, pp. 489–515, 2022.

This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 1254


  • 854


  • 0


Share Link

WeChat scan