Skip to main content

Cyber Attack Detection in IoT Networks with Small Samples: Implementation And Analysis

  • Conference paper
  • First Online:
Advanced Data Mining and Applications (ADMA 2022)


Securing Internet of Things networks from cyber security attacks is essential for preventing data loss and safeguarding backbone networks. The resource-constrained nature of the sensor nodes used in the IoT makes them vulnerable to various attacks. Hence, it is important to monitor network traffic information to accurately and promptly identify threats. In this paper, using a machine learning-based framework for learning and detecting such attacks in an IoT network from the network data is proposed. Further, a real IoT network consisting of Raspberry Pi sensor nodes and ZigBee communication modules is built for implementing two cyber attacks. The network traffic information for normal and attack scenarios is collected to evaluate the attack detection performance of learning-based models. We performed a comparison analysis with deep learning and traditional machine learning models. Our evaluation reveals that the proposed features and the machine learning framework can detect attacks with high accuracy from the network traffic information. In particular, the triplet network-based deep learning framework showed promising results in efficiently detecting the attacks from the traffic information with merely a small set of training samples.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions


  1. Parmisano, A., Garcia, S., M.J.E.: Stratosphere laboratory - a labeled dataset with malicious and benign IoT network traffic. (2020).

  2. Ashraf, I., et al.: A survey on cyber security threats in IoT-enabled maritime industry. IEEE Trans. Intell. Transp. Syst. 1–14 (2022)

    Google Scholar 

  3. Breiman, L.: Random forests. Mach. Learn. 45(1), 5–32 (2001)

    Google Scholar 

  4. Canedo, J., Skjellum, A.: Using machine learning to secure IoT systems. In: Proceeding of the 14th Conference on Privacy, Security and Trust, pp. 219–222. IEEE (2016)

    Google Scholar 

  5. Chen, T., He, T., Benesty, M., Khotilovich, V., Tang, Y.: Xgboost: extreme gradient boosting. R package version 0.4-2, pp. 1–4 (2015)

    Google Scholar 

  6. Chowdhury, M., Ray, B., Chowdhury, S., Rajasegarar, S.: A novel insider attack and machine learning based detection for the internet of things. ACM Trans. IoT 2(4), 1–23 (2021)

    Google Scholar 

  7. Cortes, C., Vapnik, V.: Support-vector networks. Mach. Lear. 20(3), 273–297 (1995)

    Google Scholar 

  8. DigiXBee: Python library (2022).

  9. DigiXBee: Zigbee modules (s2c) (2022).

  10. Erfani, S.M., Rajasegarar, S., Karunasekera, S., Leckie, C.: High-dimensional and large-scale anomaly detection using a linear one-class SVM with deep learning. Pattern Recogn. 58, 121–134 (2016)

    Article  Google Scholar 

  11. Ergen, T., Kozat, S.S.: Unsupervised anomaly detection with LSTM neural networks. IEEE Trans. Neural Net. Learn. Syst. 31(8), 3127–3141 (2019)

    Google Scholar 

  12. MacQueen, J.: Classification and analysis of multivariate observations. In: 5th Berkeley Symposium Mathamatical Statistics Probability, pp. 281–297 (1967)

    Google Scholar 

  13. Markets: IoT solutions & markets (2020).

  14. Piracha, Waqas Ahmad, Chowdhury, Morshed, Ray, Biplob, Rajasegarar, Sutharshan, Doss, Robin: Insider attacks on Zigbee based IoT networks by exploiting AT commands. In: Shankar Sriram, V.. S.., Subramaniyaswamy, V.., Sasikaladevi, N.., Zhang, Leo, Batten, Lynn, Li, Gang (eds.) ATIS 2019. CCIS, vol. 1116, pp. 77–91. Springer, Singapore (2019).

    Chapter  Google Scholar 

  15. SchölkopfÜ, B., Williamson, R.C., SmolaÜ, A., Shawe-Taylory, J.: SV estimation of a distribution’s support. Adv. Neural Inf. Process. Syst 41, 582–588 (2000)

    Google Scholar 

  16. Schroff, F., Kalenichenko, D., Philbin, J.: Facenet: a unified embedding for face recognition and clustering. In: CVPR, pp. 815–823 (2015)

    Google Scholar 

  17. Sutskever, I., Vinyals, O., Le, Q.V.: Sequence to sequence learning with neural networks. In: NIPS, pp. 3104–3112. NIPS’14, MIT Press, USA (2014)

    Google Scholar 

  18. Vaccari, I., Cambiaso, E., Aiello, M.: Remotely exploiting at command attacks on zigbee networks. Secur. Commun. Netw. 1–9 (2017)

    Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Sutharshan Rajasegarar .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kanthuru, V.A. et al. (2022). Cyber Attack Detection in IoT Networks with Small Samples: Implementation And Analysis. In: Chen, W., Yao, L., Cai, T., Pan, S., Shen, T., Li, X. (eds) Advanced Data Mining and Applications. ADMA 2022. Lecture Notes in Computer Science(), vol 13725. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-22063-0

  • Online ISBN: 978-3-031-22064-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics