Launching Adversarial Attacks against Network Intrusion Detection Systems for IoT
Abstract
:1. Introduction
- We mount label noise adversarial attacks against an SVM model that detects malicious network traffic against IoT devices using the Bot-IoT dataset [14].
- We generate adversarial examples using the Fast Gradient Sign Method (FGSM) against binary and multi-class Artificial Neural Networks (ANNs) using the Bot-IoT dataset [14].
- Finally, we analyse and critically evaluate the experimental results along with the model robustness against adversarial examples.
2. Background
2.1. Intrusion Detection Systems
2.2. Internet of Things Security
2.3. Machine Learning Models and Examples
2.4. Datasets
2.5. Related Work
3. Methodology
3.1. Dataset Overview
3.2. Orchestrating Attacks against Machine Learning
3.3. Evaluation Criteria
4. Implementation and Results
4.1. Data Preparation
4.1.1. SVM Trusted Model
4.1.2. ANN Trusted Model
4.2. Creating Adversarial Examples
4.2.1. Support Vector Machine Label Flipping Activities
4.2.2. Creating Artificial Neural Network Adversarial Examples
4.3. Adversarial Example Results
4.3.1. Support Vector Machine Label Flipping Result
4.3.2. Artificial Neural Network Adversarial Examples Result
5. Evaluation and Discussion
5.1. Machine Learning Model Metrics
5.2. SVM Dataset Label Manipulation
5.3. ANN Adversarial Example Generation
5.3.1. Binary Classification ANN Model
5.3.2. Multi-Class ANN Model
6. Conclusions
Author Contributions
Funding
Conflicts of Interest
Appendix A. SVM Random Label Flip 5% Sample
n = 0.05 # 5% |
change = training.sample(int(n∗len( training ))).index |
# Use binary XOR to flip from 1 to 0 and vice versa |
training.loc [ change , ’attack ’] ^= 1 |
Appendix B. SVM Targeted Label Flip Function
def get_change (model , X_train , n): |
distances = model.decision_function ( X_train ) |
abs_values = np.abs ( distances ) # gen absolute distance |
df = pd.DataFrame ( data ={ ’distance’: distances , |
’abs_value ’: abs_values }, |
columns=["distance", " abs_value "]) change = df.sort_values( |
by =[’abs_value ’]).head(int(n∗len (df ))).index return change |
Appendix C. Create Logits Model
import tensorflow as tf # Version 2.3.0 |
logits_model = tf.keras.Model(model.input, |
model.layers [ −1].output) |
Appendix D. Convert Testing Dataset into Tensor
original_data = X_test_scaled |
original_data = tf.convert_to_tensor(original_data.reshape((len(X_test_scaled), 10))) |
Appendix E. Use Fast Gradient Sign Method to Generate Adversarial Examples
import cleverhans.future.tf2.attacks.fast_gradient_method epsilon = 1 |
adv_data = fast_gradient_method(logits_model, original_data, |
epsilon, np.inf, |
targeted=False) adv_data_pred = model.predict(adv_data) |
Appendix F. Visualisation of Metrics
Appendix G. Software and Hardware
References
- Sapre, S.; Ahmadi, P.; Islam, K. A Robust Comparison of the KDDCup99 and NSL-KDD IoT Network Intrusion Detection Datasets Through Various Machine Learning Algorithms. arXiv 2019, arXiv:1912.13204. [Google Scholar]
- Sisinni, E.; Saifullah, A.; Han, S.; Jennehag, U.; Gidlund, M. Industrial internet of things: Challenges, opportunities, and directions. IEEE Trans. Ind. Inform. 2018, 14, 4724–4734. [Google Scholar] [CrossRef]
- Benkhelifa, E.; Welsh, T.; Hamouda, W. A critical review of practices and challenges in intrusion detection systems for IoT: Toward universal and resilient systems. IEEE Commun. Surv. Tutor. 2018, 20, 3496–3509. [Google Scholar] [CrossRef]
- Goasduff, L. Gartner Predicts Outdoor Surveillance Cameras Will Be Largest Market for 5G Internet of Things Solutions Over Next Three Years. 2019. Available online: https://www.gartner.com/en/newsroom/press-releases/2019-10-17-gartner-predicts-outdoor-surveillance-cameras-will-be (accessed on 22 April 2021).
- Ibitoye, O.; Shafiq, O.; Matrawy, A. Analyzing adversarial attacks against deep learning for intrusion detection in IoT networks. In Proceedings of the 2019 IEEE Global Communications Conference (GLOBECOM), Waikoloa, HI, USA, 9–13 December 2019; IEEE: New York, NY, USA, 2019; pp. 1–6. [Google Scholar]
- Soe, Y.N.; Feng, Y.; Santosa, P.I.; Hartanto, R.; Sakurai, K. Towards a Lightweight Detection System for Cyber Attacks in the IoT Environment Using Corresponding Features. Electronics 2020, 9, 144. [Google Scholar] [CrossRef] [Green Version]
- Elrawy, M.F.; Awad, A.I.; Hamed, H.F. Intrusion detection systems for IoT-based smart environments: A survey. J. Cloud Comput. 2018, 7, 1–20. [Google Scholar] [CrossRef] [Green Version]
- Cup, K. Data. 1999. Available online: http://www.kdd.org/kdd-cup/view/kdd-cup-1999/Data (accessed on 22 April 2021).
- Tavallaee, M.; Bagheri, E.; Lu, W.; Ghorbani, A.A. A detailed analysis of the KDD CUP 99 data set. In Proceedings of the 2009 IEEE Symposium on Computational Intelligence for Security and Defense Applications, Ottawa, ON, Canada, 8–10 July 2009; IEEE: New York, NY, USA, 2009; pp. 1–6. [Google Scholar]
- Nisioti, A.; Mylonas, A.; Yoo, P.D.; Katos, V. From intrusion detection to attacker attribution: A comprehensive survey of unsupervised methods. IEEE Commun. Surv. Tutor. 2018, 20, 3369–3388. [Google Scholar] [CrossRef]
- McHugh, J. Testing intrusion detection systems: A critique of the 1998 and 1999 darpa intrusion detection system evaluations as performed by lincoln laboratory. ACM Trans. Inf. Syst. Secur. 2000, 3, 262–294. [Google Scholar] [CrossRef]
- Mahoney, M.V.; Chan, P.K. An analysis of the 1999 DARPA/Lincoln Laboratory evaluation data for network anomaly detection. In International Workshop on Recent Advances in Intrusion Detection; Springer: Berlin, Germany, 2003; pp. 220–237. [Google Scholar]
- Athanasiades, N.; Abler, R.; Levine, J.; Owen, H.; Riley, G. Intrusion detection testing and benchmarking methodologies. In Proceedings of the First IEEE International Workshop on Information Assurance, 2003. IWIAS 2003 Proceedings, Darmstadt, Germany, 24 March 2003; IEEE: New York, NY, USA, 2003; pp. 63–72. [Google Scholar]
- Koroniotis, N.; Moustafa, N.; Sitnikova, E.; Turnbull, B. Towards the development of realistic botnet dataset in the internet of things for network forensic analytics: Bot-iot dataset. Future Gener. Comput. Syst. 2019, 100, 779–796. [Google Scholar] [CrossRef] [Green Version]
- Ferrag, M.A.; Maglaras, L.; Moschoyiannis, S.; Janicke, H. Deep learning for cyber security intrusion detection: Approaches, datasets, and comparative study. J. Inf. Secur. Appl. 2020, 50, 102419. [Google Scholar] [CrossRef]
- Yuan, X.; He, P.; Zhu, Q.; Li, X. Adversarial examples: Attacks and defenses for deep learning. IEEE Trans. Neural Netw. Learn. Syst. 2019, 30, 2805–2824. [Google Scholar] [CrossRef] [Green Version]
- Kurakin, A.; Goodfellow, I.; Bengio, S. Adversarial machine learning at scale. arXiv 2016, arXiv:1611.01236. [Google Scholar]
- Pitropakis, N.; Panaousis, E.; Giannetsos, T.; Anastasiadis, E.; Loukas, G. A taxonomy and survey of attacks against machine learning. Comput. Sci. Rev. 2019, 34, 100199. [Google Scholar] [CrossRef]
- Kantartopoulos, P.; Pitropakis, N.; Mylonas, A.; Kylilis, N. Exploring Adversarial Attacks and Defences for Fake Twitter Account Detection. Technologies 2020, 8, 64. [Google Scholar] [CrossRef]
- Huang, L.; Joseph, A.D.; Nelson, B.; Rubinstein, B.I.; Tygar, J.D. Adversarial machine learning. In Proceedings of the 4th ACM Workshop on Security and Artificial Intelligence, Chicago, IL, USA, 21 October 2011; pp. 43–58. [Google Scholar]
- Xiao, H.; Biggio, B.; Nelson, B.; Xiao, H.; Eckert, C.; Roli, F. Support vector machines under adversarial label contamination. Neurocomputing 2015, 160, 53–62. [Google Scholar] [CrossRef]
- Van, N.T.; Thinh, T.N. An anomaly-based network intrusion detection system using deep learning. In Proceedings of the 2017 International Conference on System Science and Engineering (ICSSE), Ho Chi Minh City, Vietnam, 21–23 July 2017; IEEE: New York, NY, USA, 2017; pp. 210–214. [Google Scholar]
- Oh, S.R.; Kim, Y.G. Security requirements analysis for the IoT. In Proceedings of the 2017 International Conference on Platform Technology and Service (PlatCon), Busan, Korea, 13–15 February 2017; IEEE: New York, NY, USA, 2017; pp. 1–6. [Google Scholar]
- Davis, J.; Goadrich, M. The relationship between Precision-Recall and ROC curves. In Proceedings of the 23rd International Conference on Machine Learning, Pittsburgh, PA, USA, 25–29 June 2006; pp. 233–240. [Google Scholar]
- Flach, P.A. The geometry of ROC space: Understanding machine learning metrics through ROC isometrics. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), Washington, DC, USA, 21–24 August 2003; pp. 194–201. [Google Scholar]
- Wu, P.; Guo, H. LuNet: A Deep Neural Network for Network Intrusion Detection. In Proceedings of the 2019 IEEE Symposium Series on Computational Intelligence (SSCI), Xiamen, China, 6–9 December 2019; IEEE: New York, NY, USA, 2019; pp. 617–624. [Google Scholar]
- Khraisat, A.; Gondal, I.; Vamplew, P.; Kamruzzaman, J.; Alazab, A. A novel ensemble of hybrid intrusion detection system for detecting internet of things attacks. Electronics 2019, 8, 1210. [Google Scholar] [CrossRef] [Green Version]
- Atawodi, I.S. A Machine Learning Approach to Network Intrusion Detection System Using K Nearest Neighbor and Random Forest. Master’s Thesis, University of Southern Mississippi, Hattiesburg, MS, USA, 2019. [Google Scholar]
- Dong, B.; Wang, X. Comparison deep learning method to traditional methods using for network intrusion detection. In Proceedings of the 2016 8th IEEE International Conference on Communication Software and Networks (ICCSN), Beijing, China, 4–6 June 2016; IEEE: New York, NY, USA, 2016; pp. 581–585. [Google Scholar]
- Fernandez, G. Deep Learning Approaches for Network Intrusion Detection. Ph.D. Thesis, The University of Texas at San Antonio, San Antonio, TX, USA, 2019. [Google Scholar]
- Pacheco, Y.; Sun, W. Adversarial Machine Learning: A Comparative Study on Contemporary Intrusion Detection Datasets. In Proceedings of the 7th International Conference on Information Systems Security and Privacy—Volume 1: ICISSP, INSTICC, Online Streaming, Vienna, Austria, 11–13 February 2021; SciTePress: Setubal, Portugal, 2021; pp. 160–171. [Google Scholar] [CrossRef]
- Moustafa, N.; Slay, J. UNSW-NB15: A comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set). In Proceedings of the 2015 Military Communications and Information Systems Conference (MilCIS), Canberra, Australia, 10–12 November 2015; IEEE: New York, NY, USA, 2015; pp. 1–6. [Google Scholar]
- Jazi, H.H.; Gonzalez, H.; Stakhanova, N.; Ghorbani, A.A. Detecting HTTP-based application layer DoS attacks on web servers in the presence of sampling. Comput. Netw. 2017, 121, 25–36. [Google Scholar] [CrossRef]
- Sharafaldin, I.; Lashkari, A.H.; Ghorbani, A.A. Toward generating a new intrusion detection dataset and intrusion traffic characterization. In Proceedings of the ICISSP, Madeira, Portugal, 22–24 January 2018; pp. 108–116. [Google Scholar]
- Xiao, H.; Xiao, H.; Eckert, C. Adversarial Label Flips Attack on Support Vector Machines. In Proceedings of the ECAI, Montpellier, France, 27–31 August 2012; pp. 870–875. [Google Scholar]
- Biggio, B.; Nelson, B.; Laskov, P. Support vector machines under adversarial label noise. In Proceedings of the Asian Conference on Machine Learning, Taoyuan, Taiwan, 13–15 November 2011; pp. 97–112. [Google Scholar]
- Koh, P.W.; Steinhardt, J.; Liang, P. Stronger data poisoning attacks break data sanitization defenses. arXiv 2018, arXiv:1811.00741. [Google Scholar]
- Taheri, R.; Javidan, R.; Shojafar, M.; Pooranian, Z.; Miri, A.; Conti, M. On defending against label flipping attacks on malware detection systems. Neural Comput. Appl. 2020, 32, 1–20. [Google Scholar] [CrossRef] [Green Version]
- Zhou, Y.; Kantarcioglu, M.; Thuraisingham, B.; Xi, B. Adversarial support vector machine learning. In Proceedings of the 18th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Beijing, China, 12–16 August 2012; pp. 1059–1067. [Google Scholar]
- Goodfellow, I.J.; Shlens, J.; Szegedy, C. Explaining and harnessing adversarial examples. arXiv 2014, arXiv:1412.6572. [Google Scholar]
- Papernot, N.; McDaniel, P.; Jha, S.; Fredrikson, M.; Celik, Z.B.; Swami, A. The limitations of deep learning in adversarial settings. In Proceedings of the 2016 IEEE European symposium on security and privacy (EuroS&P), Saarbruecken, Germany, 21–24 March 2016; IEEE: New York, NY, USA, 2016; pp. 372–387. [Google Scholar]
- Wiyatno, R.; Xu, A. Maximal jacobian-based saliency map attack. arXiv 2018, arXiv:1808.07945. [Google Scholar]
- Yang, K.; Liu, J.; Zhang, C.; Fang, Y. Adversarial examples against the deep learning based network intrusion detection systems. In Proceedings of the MILCOM 2018-2018 IEEE Military Communications Conference (MILCOM), Los Angeles, CA, USA, 29–31 October 2018; IEEE: New York, NY, USA, 2018; pp. 559–564. [Google Scholar]
- Wang, Z. Deep learning-based intrusion detection with adversaries. IEEE Access 2018, 6, 38367–38384. [Google Scholar] [CrossRef]
- Rigaki, M. Adversarial Deep Learning Against Intrusion Detection Classifiers. 2017. Available online: http://urn.kb.se/resolve?urn=urn:nbn:se:ltu:diva-64577 (accessed on 22 April 2021).
- Jeong, J.; Kwon, S.; Hong, M.P.; Kwak, J.; Shon, T. Adversarial attack-based security vulnerability verification using deep learning library for multimedia video surveillance. Multimed. Tools Appl. 2019, 79, 16077–16091. [Google Scholar] [CrossRef]
- Ge, M.; Fu, X.; Syed, N.; Baig, Z.; Teo, G.; Robles-Kelly, A. Deep Learning-Based Intrusion Detection for IoT Networks. In Proceedings of the 2019 IEEE 24th Pacific Rim International Symposium on Dependable Computing (PRDC), Kyoto, Japan, 1–3 December 2019; IEEE: New York, NY, USA, 2019; pp. 256–25609. [Google Scholar]
- Papernot, N.; Faghri, F.; Carlini, N.; Goodfellow, I.; Feinman, R.; Kurakin, A.; Xie, C.; Sharma, Y.; Brown, T.; Roy, A.; et al. Technical Report on the CleverHans v2.1.0 Adversarial Examples Library. arXiv 2018, arXiv:1610.00768. [Google Scholar]
- Srinath, K. Python–The Fastest Growing Programming Language. Int. Res. J. Eng. Technol. 2017, 4, 354–357. [Google Scholar]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Abadi, M.; Barham, P.; Chen, J.; Chen, Z.; Davis, A.; Dean, J.; Devin, M.; Ghemawat, S.; Irving, G.; Isard, M.; et al. Tensorflow: A system for large-scale machine learning. In Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation OSDI 16, Savannah, GA, USA, 2–4 November 2016; pp. 265–283. [Google Scholar]
Category | Full Amount | 5% Amount | Training Amount | Testing Amount |
---|---|---|---|---|
DDoS | 38,532,480 | 1,926,624 | 1,541,315 | 385,309 |
DoS | 33,005,194 | 1,650,260 | 1,320,148 | 330,112 |
Normal | 9543 | 477 | 370 | 107 |
Reconnaissance | 1,821,639 | 91,082 | 72,919 | 18,163 |
Theft | 1587 | 79 | 370 | 14 |
Total | 73,370,443 | 3,668,522 | 2,934,817 | 733,705 |
Features | Description |
---|---|
pkSeqID | Row Identifier |
Proto | Textual representation of transaction protocols present in network flow |
saddr | Source IP address |
sport | Source port number |
daddr | Destination IP address |
dport | Destination port number |
attack | Class label: 0 for Normal traffic, 1 for Attack Traffic |
category | Traffic category |
subcategory | Traffic subcategory |
Top-10 Features | Description |
seq | Argus sequence number |
stddev | Standard deviation of aggregated records |
N_IN_Conn_P_SrcIP | Number of inbound connections per source IP. |
min | Minimum duration of aggregated records |
state_number | Numerical representation of transaction state |
mean | Average duration of aggregated records |
N_IN_Conn_P_DstIP | Number of inbound connections per destination IP. |
drate | Destination-to-source packets per second |
srate | Source-to-destination packets per second |
max | Maximum duration of aggregated records |
(a) SVM scores without label flipping | |
Scoring | Percentage (%) |
Accuracy | 85.897 |
Recall | 85.895 |
Precision | 100 |
F1 | 91.255 |
(b) ANN scores without adversarial examples | |
Scoring | Percentage (%) |
Accuracy | 99.692 |
Loss | 1.170 |
Recall | 99.813 |
Precision | 99.591 |
F1 | 99.702 |
Scoring | Accuracy | Precision | Recall | F1 | ||||
---|---|---|---|---|---|---|---|---|
Percentage of flipped labels (%) | 0 | 50 | 0 | 50 | 0 | 50 | 0 | 50 |
Random Flip | 0.999 | 0.441 | 0.999 | 0.610 | 1.0 | 0.613 | 0.999 | 0.612 |
Targeted Flip | 0.999 | 0.610 | 0.999 | 0.621 | 1.0 | 0.913 | 0.999 | 0.737 |
Scoring | Accuracy | Loss | Precision | Recall | F1 | |||||
---|---|---|---|---|---|---|---|---|---|---|
Epsilon | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
Binary Targeted | 0.996 | 0.927 | 0.016 | 0.151 | 0.996 | 0.895 | 0.996 | 0.563 | 0.996 | 0.690 |
Binary Non-Targeted | 0.996 | 0.768 | 0.016 | 1.080 | 0.996 | 0.769 | 0.996 | 0.771 | 0.996 | 0.769 |
Multi-Targeted | 0.956 | 0.421 | 0.045 | 1.764 | 0.952 | 0.312 | 0.957 | 0.493 | 0.955 | 0.382 |
Multi-Not-Targeted | 0.956 | 0.141 | 0.045 | 2.403 | 0.952 | 0.153 | 0.957 | 0.249 | 0.955 | 0.189 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Papadopoulos, P.; Thornewill von Essen, O.; Pitropakis, N.; Chrysoulas, C.; Mylonas, A.; Buchanan, W.J. Launching Adversarial Attacks against Network Intrusion Detection Systems for IoT. J. Cybersecur. Priv. 2021, 1, 252-273. https://doi.org/10.3390/jcp1020014
Papadopoulos P, Thornewill von Essen O, Pitropakis N, Chrysoulas C, Mylonas A, Buchanan WJ. Launching Adversarial Attacks against Network Intrusion Detection Systems for IoT. Journal of Cybersecurity and Privacy. 2021; 1(2):252-273. https://doi.org/10.3390/jcp1020014
Chicago/Turabian StylePapadopoulos, Pavlos, Oliver Thornewill von Essen, Nikolaos Pitropakis, Christos Chrysoulas, Alexios Mylonas, and William J. Buchanan. 2021. "Launching Adversarial Attacks against Network Intrusion Detection Systems for IoT" Journal of Cybersecurity and Privacy 1, no. 2: 252-273. https://doi.org/10.3390/jcp1020014
APA StylePapadopoulos, P., Thornewill von Essen, O., Pitropakis, N., Chrysoulas, C., Mylonas, A., & Buchanan, W. J. (2021). Launching Adversarial Attacks against Network Intrusion Detection Systems for IoT. Journal of Cybersecurity and Privacy, 1(2), 252-273. https://doi.org/10.3390/jcp1020014