Multi-Attack Intrusion Detection for In-Vehicle CAN-FD Messages
Abstract
:1. Introduction
- Our model employs LSTM layers with attention mechanisms to innovatively detect various CAN-FD bus attacks, such as DoS, Fuzzing, Replay, Spoofing, Scaling, and Ramp. This detection approach does not require the CAN-FD communication matrix or extensive prior knowledge, enhancing its broad applicability.
- As far as we know, we are the first to collect raw CAN-FD bus message data directly from actual vehicles and generate an attack dataset based on it. This dataset reflects diverse attack patterns, offering high adaptability for simulating scenarios across various vehicular environments.
- To validate our method’s effectiveness, we conduct experiments on two datasets: the real-vehicle dataset and the automotive CAN-FD Intrusion Dataset from the Hacking and Countermeasure Research Lab [36] in Korea. Compared with the State-of-the-Art (SOTA) method, our model provides refined classification capabilities for different types of attacks. Experimental results show that our model improves attack classification accuracy by 1.01% over the SOTA method, effectively identifying the type of attack in anomalous frames.
2. Background
2.1. Controller Area Network Bus with Flexible Data Rate
- SOF: The Start of Frame (SOF) bit is utilized for synchronization and to alert all nodes about the commencement of a CAN-FD message transmission. It is consistently set to 0.
- Identifier: Each ECU has a unique identifier code, known as the Identifier (ID), which determines the recipient of a message. The ID spans 11 bits in length, with the message priority dictated by this field; typically, a lower numerical value signifies a higher priority. Consequently, when an ECU faces a choice between two identifiers, the comparison is conducted based on their sequential order. If one identifier exhibits a logical “1” at any position while the other shows a logical “0”, the identifier with the “1” will lose its priority.
- IDE: The Identifier Extension (IDE) bit distinguishes between standard and extended frames. A logical “0” indicates an 11-bit ID, whereas a logical “1” indicates a 29-bit ID.
- DLC: Data Length Code (DLC) specifies the number of valid bytes within the data field, with the maximum representable byte count being 64.
- Data Field: The data field contains the payload data, which is interpreted by the designated receiving ECU.
2.2. Type of Attack
3. Problem Definition and Overview of Method
3.1. Problem Definition
3.2. Overview of Methods
4. Methodology
4.1. Data Collection
4.2. Generation of Anomalous Data
Algorithm 1: Generation of the Attack Dataset | |
Input: | Dataset without abnormal frame: . |
Output: | Dataset with abnormal frame: . |
1: | Initial as a copy of |
2: | for in : |
3: | ←A random index number not used before. |
4: | for in : |
5: | ←DoS frames : set the entire data field to 0. |
6: | ←Insert into behind row index . |
7: | for in : |
8: | ←A random index number not used before. |
9: | for in : |
10: | ←Fuzzing frames : choose integers in not used as the frame ID and select random value to fill the data field. |
11: | ←Insert into behind row index |
12: | for in : |
13: | ←A random index number not used. |
14: | for in : |
15: | ←Spoofing frames : choose integers not used as frame IDs and select substantial values to fill in the data field. |
16: | ←Insert into behind row index . |
17: | for in : |
18: | ←A random index number not used. |
19: | for in : |
20: | ←Replay frames : repeat the data following the frames. |
21: | ←Insert into behind row index . |
22: | for in : |
23: | ←A random index number not used. |
24: | for in : |
25: | ←Scaling frames : generate the scaling value data frame |
26: | ←Insert into behind row index . |
27: | for in : |
28: | ←A random index number not used. |
29: | for in : |
30: | ←Ramp frames : generate the ramping value data frame. |
31: | ←Insert to behind row index . |
32: | return |
4.3. Data Preprocessing
4.4. ADDM
4.5. ACDM
5. Experiment and Evaluation
5.1. Experiment Setup and Evaluation Metric
5.2. Experiment with ADDM
5.3. Experiment with ACDM
5.4. Disscusion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- de Andrade, R.; Santos, M.M.D.; Justo, J.F.; Yoshioka, L.R.; Hof, H.-J.; Kleinschmidt, J.H. Security Architecture for Automotive Communication Networks with CAN FD. Comput. Secur. 2023, 129, 103203. [Google Scholar] [CrossRef]
- Wang, C.; Xu, X.; Xiao, K.; He, Y.; Yang, G. Traffic Anomaly Detection Algorithm for CAN Bus Using Similarity Analysis. High-Confid. Comput. 2024, 1, 100207. [Google Scholar] [CrossRef]
- Tanksale, V. Intrusion detection system for controller area network. Cybersecurity 2024, 7, 4. [Google Scholar] [CrossRef]
- Rajapaksha, S.; Kalutarage, H.; Al-Kadri, M.O.; Petrovski, A.; Madzudzo, G.; Cheah, M. Ai-based intrusion detection systems for in-vehicle networks: A survey. ACM Comput. Surv. 2023, 55, 1–40. [Google Scholar] [CrossRef]
- Seo, E.; Song, H.M.; Kim, H.K. GIDS: GAN Based Intrusion Detection System for In-Vehicle Network. In Proceedings of the 2018 16th Annual Conference on Privacy, Security and Trust (PST), Belfast, UK, 28–30 August 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1–6. [Google Scholar]
- Han, M.L.; Kwak, B.I.; Kim, H.K. Anomaly Intrusion Detection Method for Vehicular Networks Based on Survival Analysis. Veh. Commun. 2018, 14, 52–63. [Google Scholar] [CrossRef]
- Jia, J.; Xu, Y.; Wu, Y.; Xu, Y.; Fan, Y.; Zhang, D. Intelligent Connected Vehicle CAN-FD Bus Network Security Protocol. In Proceedings of the 2023 International Conference on Mobile Internet, Cloud Computing and Information Security (MICCIS), Nanjing, China, 7–9 April 2023; pp. 57–62. [Google Scholar] [CrossRef]
- Lin, C.W.; Sangiovanni-Vincentelli, A. Cyber-security for the controller area network (CAN) communication protocol. In Proceedings of the 2012 International Conference on Cyber Security, Alexandria, VA, USA, 14–16 December 2012; pp. 1–7. [Google Scholar] [CrossRef]
- Lee, H.; Jeong, S.H.; Kim, H.K. OTIDS: A novel intrusion detection system for in-vehicle network by using remote frame. In Proceedings of the 2017 15th Annual Conference on Privacy, Security and Trust (PST), Calgary, AB, Canada, 28–30 August 2017; pp. 57–5709. [Google Scholar] [CrossRef]
- Islam, R.; Refat, R.U.D. Improving CAN bus security by assigning dynamic arbitration IDs. J. Transp. Secur. 2020, 13, 19–31. [Google Scholar] [CrossRef]
- Koscher, K.; Czeskis, A.; Roesner, F.; Patel, S.; Kohno, T.; Checkoway, S.; McCoy, D.; Kantor, B.; Anderson, D.; Shacham, H.; et al. Experimental security analysis of a modern automobile. In Proceedings of the 2010 IEEE Symposium on Security and Privacy, Oakland, CA, USA, 16–19 May 2010; pp. 447–462. [Google Scholar] [CrossRef]
- Iehira, K.; Inoue, H.; Ishida, K. Spoofing Attack Using Bus-Off Attacks Against a Specific ECU of the CAN Bus. In Proceedings of the 2018 15th IEEE Annual Consumer Communications & Networking Conference (CCNC), Las Vegas, NV, USA, 12–15 January 2018; pp. 1–4. [Google Scholar] [CrossRef]
- Prasad, S. Counteractive Control against Cyber-Attack Uncertainties on Frequency Regulation in the Power System. IET Cyber-Phys. Syst. Theory Appl. 2020, 5, 394–408. [Google Scholar] [CrossRef]
- Elsisi, M.; Tran, M.-Q. Development of an IoT Architecture Based on a Deep Neural Network against Cyber Attacks for Automated Guided Vehicles. Sensors 2021, 21, 8467. [Google Scholar] [CrossRef] [PubMed]
- Kleberger, P.; Olovsson, T.; Jonsson, E. Security Aspects of the In-Vehicle Network in the Connected Car. In Proceedings of the 2011 IEEE Intelligent Vehicles Symposium (IV), Baden-Baden, Germany, 5–9 June 2011; pp. 528–533. [Google Scholar] [CrossRef]
- Upstream Security. 2020 Global Automotive Cybersecurity Report. Netw. Secur. 2020, 2020, 4. [Google Scholar] [CrossRef]
- Heidari, A.; Jabraeil Jamali, M.A. Internet of Things intrusion detection systems: A comprehensive review and future directions. Clust. Comput. 2023, 26, 3753–3780. [Google Scholar] [CrossRef]
- Cui, J.; Zong, L.; Xie, J.; Tang, M. A novel multi-module integrated intrusion detection system for high-dimensional imbalanced data. Appl. Intell. 2023, 53, 272–288. [Google Scholar] [CrossRef] [PubMed]
- Sun, H.; Chen, M.; Weng, J.; Liu, Z.; Geng, G. Anomaly Detection for In-Vehicle Network Using CNN-LSTM with Attention Mechanism. IEEE Trans. Veh. Technol. 2021, 70, 10880–10893. [Google Scholar] [CrossRef]
- UN Regulation No. 155. Cyber Security and Cyber Security Management System; United Nations Economic Commission for Europe: Geneva, Switzerland, 2021; Available online: https://unece.org/sites/default/files/2021-03/R155e.pdf (accessed on 3 April 2021).
- ISO/SAE 21434:2021; Road Vehicles—Cybersecurity Engineering. International Organization for Standardization: Geneva, Switzerland, 2021. Available online: https://www.iso.org/standard/70918.html (accessed on 30 April 2024).
- U.S. Department of Transportation, National Highway Traffic Safety Administration. Cybersecurity Best Practices for the Safety of Modern Vehicles. Available online: https://www.nhtsa.gov/sites/nhtsa.gov/files/2022-09/cybersecurity-best-practices-safety-modern-vehicles-2022-tag.pdf (accessed on 30 April 2024).
- Halder, S.; Conti, M.; Das, S.K. Coids: A Clock Offset Based Intrusion Detection System for Controller Area Networks. In Proceedings of the 21st International Conference on Distributed Computing and Networking, Kolkata, India, 4–7 January 2020; pp. 1–10. [Google Scholar] [CrossRef]
- Olufowobi, H.; Young, C.; Zambreno, J.; Bloom, G. SAIDuCANT: Specification-Based Automotive Intrusion Detection Using Controller Area Network (CAN) Timing. IEEE Trans. Veh. Technol. 2020, 69, 1484–1494. [Google Scholar] [CrossRef]
- Ji, H.; Wang, Y.; Qin, H.; Wu, X.; Yu, G. Investigating the Effects of Attack Detection for In-Vehicle Networks Based on Clock Drift of ECUs. IEEE Access 2018, 6, 49375–49384. [Google Scholar] [CrossRef]
- Narayanan, S.N.; Mittal, S.; Joshi, A. Using Data Analytics to Detect Anomalous States in Vehicles. arXiv 2015, arXiv:1512.08048. [Google Scholar] [CrossRef]
- Guo, F.; Wang, Z.; Du, S.; Li, H.; Zhu, H.; Pei, Q.; Cao, Z.; Zhao, J.; Guo, F. Detecting Vehicle Anomaly in the Edge via Sensor Consistency and Frequency Characteristic. IEEE Trans. Veh. Technol. 2019, 68, 5618–5628. [Google Scholar] [CrossRef]
- Wasicek, A.; Burakova, Y. Context-aware Intrusion Detection in Automotive Control Systems. In Proceedings of the 5th ESCAR USA Conference, Detroit, MI, USA, 21–22 June 2017. [Google Scholar]
- Wang, C.; Zhao, Z.; Gong, L.; Zhu, L.; Liu, Z.; Cheng, X. A Distributed Anomaly Detection System for In-Vehicle Network Using HTM. IEEE Access 2018, 6, 9091–9098. [Google Scholar] [CrossRef]
- Taylor, A.; Leblanc, S.; Japkowicz, N. Anomaly Detection in Automobile Control Network Data with Long Short-Term Memory Networks. In Proceedings of the 2016 IEEE International Conference on Data Science and Advanced Analytics (DSAA), Montreal, QC, Canada, 17–19 October 2016; pp. 130–139. [Google Scholar] [CrossRef]
- Hossain, M.D.; Inoue, H.; Ochiai, H.; Fall, D.; Kadobayashi, Y. LSTM-Based Intrusion Detection System for In-Vehicle CAN Bus Communications. IEEE Access 2020, 8, 185489–185502. [Google Scholar] [CrossRef]
- Chen, S.; Jin, G.; Ma, X. Detection and Analysis of Real-Time Anomalies in Large-Scale Complex System. Measurement 2021, 184, 109929. [Google Scholar] [CrossRef]
- Qin, H.; Yan, M.; Ji, H. Application of Controller Area Network (CAN) Bus Anomaly Detection Based on Time Series Prediction. Veh. Commun. 2021, 27, 100291. [Google Scholar] [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is All You Need. Adv. Neural Inf. Process. Syst. 2017, 30, 1–11. [Google Scholar]
- CAN-FD Intrusion Dataset. Hacking and Countermeasure Research Lab (HCRL). Available online: https://ocslab.hksecurity.net/Datasets/can-fd-intrusion-dataset (accessed on 21 July 2022).
- Kishore, C.R.; Rao, D.C.; Nayak, J.; Behera, H.S. Intelligent Intrusion Detection Framework for Anomaly-Based CAN Bus Network Using Bidirectional Long Short-Term Memory. J. Inst. Eng. (India) Ser. B 2024. [Google Scholar] [CrossRef]
- Yan, W.; Wei, D.; Fu, B.; Zhang, H.; Liu, Q. A Mixed-Criticality Traffic Scheduler with Mitigating Congestion for CAN-to-TSN Gateway. ACM Trans. Des. Autom. Electron. Syst. 2024. [Google Scholar] [CrossRef]
- Park, J.; Lee, M.; Park, S.; Jeong, Y.; Kim, H.; Choi, S.; Song, S. Controller Area Network with Flexible Data Rate (CAN FD) Eye Diagram Prediction. IEEE Trans. Electromagn. Compat. 2024. [Google Scholar] [CrossRef]
- Han, M.L.; Kwak, B.I.; Kim, H.K. Event-Triggered Interval-Based Anomaly Detection and Attack Identification Methods for an In-Vehicle Network. IEEE Trans. Inf. Forensics Secur. 2021, 16, 2941–2956. [Google Scholar] [CrossRef]
- Hoppe, T.; Kiltz, S.; Dittmann, J. Security threats to automotive CAN networks—Practical examples and selected short-term countermeasures. Reliab. Eng. Syst. Saf. 2011, 96, 11–25. [Google Scholar] [CrossRef]
- Kwak, B.I.; Han, M.L.; Kim, H.K. Cosine Similarity Based Anomaly Detection Methodology for the CAN Bus. Expert Syst. Appl. 2021, 166, 114066. [Google Scholar] [CrossRef]
- Lo, W.; Alqahtani, H.; Thakur, K.; Almadhor, A.; Chander, S.; Kumar, G. A Hybrid Deep Learning Based Intrusion Detection System Using Spatial-Temporal Representation of In-Vehicle Network Traffic. Veh. Commun. 2022, 35, 100471. [Google Scholar] [CrossRef]
- Scikit-Learn Project. Receiver Operating Characteristic (ROC). Available online: https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html (accessed on 3 March 2020).
Parameters | Value | |
---|---|---|
ADDM | ACDM | |
Learning Sate | ||
Epochs | 100 | 100 |
Batch Size | 128 | 128 |
LSTM Unit Number | 256,256,64,64,32 | 512,512,128,128,64 |
Dropout | 0.2 | 0.2 |
Window Size | 4 | 4 |
Stride | 1 | 1 |
Optimizer | Adam | Adam |
Type of Attack | TPR (Recall) | FPR | TNR (Specificity) | FNR | Accuracy | Precision | F1 Score | |
---|---|---|---|---|---|---|---|---|
Real-vehicle dataset | ADDM | 0.9996 | 0.0008 | 0.9992 | 0.0004 | 0.9995 | 0.9997 | 0.9997 |
LSTM-based model | 0.9946 | 0.0229 | 0.9771 | 0.0054 | 0.9900 | 0.9918 | 0.9932 | |
HyDL-IDS | 0.9955 | 0.0118 | 0.9882 | 0.0045 | 0.9935 | 0.9958 | 0.9956 | |
HCRL dataset | ADDM | 1.000 | 3 × 10−5 | 0.9999 | 0 | 0.9999 | 0.9999 | 0.9999 |
LSTM-based model | 0.9999 | 4 × | 0.9999 | 2 × | 0.9999 | 0.9999 | 0.9999 | |
HyDL-IDS | 0.9999 | 0.0003 | 0.9997 | 4 × | 0.9999 | 0.9999 | 0.9999 |
Dataset | Type of Attack | Model | Accuracy | Precision | Recall | Specificity | F1 Score |
---|---|---|---|---|---|---|---|
Real-vehicle dataset | Replay | ACDM | 0.9994 | 0.9939 | 0.9953 | 0.9996 | 0.9946 |
LSTM-based model | 0.9850 | 0.9447 | 0.7916 | 0.9971 | 0.8614 | ||
HyDL-IDS | 0.9893 | 0.9659 | 0.8472 | 0.9981 | 0.9027 | ||
DoS | ACDM | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | |
LSTM-based model | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | ||
HyDL-IDS | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | ||
Fuzzing | ACDM | 0.9987 | 0.9795 | 0.9974 | 0.9987 | 0.9884 | |
LSTM-based model | 0.9966 | 0.9570 | 0.9851 | 0.9973 | 0.9709 | ||
HyDL-IDS | 0.9971 | 0.9614 | 0.9897 | 0.9976 | 0.9754 | ||
Spoofing | ACDM | 0.9988 | 0.9935 | 0.9629 | 0.9998 | 0.9780 | |
LSTM-based model | 0.9964 | 0.9688 | 0.9041 | 0.9991 | 0.9353 | ||
HyDL-IDS | 0.9973 | 0.9765 | 0.9269 | 0.9993 | 0.9511 | ||
Scaling | ACDM | 0.9996 | 0.9939 | 0.9917 | 0.9998 | 0.9928 | |
LSTM-based model | 0.9991 | 0.9793 | 0.9906 | 0.9994 | 0.9849 | ||
HyDL-IDS | 0.9991 | 0.9824 | 0.9884 | 0.9995 | 0.9854 | ||
Ramp | ACDM | 0.9998 | 0.9995 | 0.9954 | 0.9999 | 0.9975 | |
LSTM-based model | 0.9993 | 0.9888 | 0.9898 | 0.9996 | 0.9893 | ||
HyDL-IDS | 0.9994 | 0.9954 | 0.9863 | 0.9998 | 0.9908 | ||
HCRL dataset | Flooding | ACDM | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
LSTM-based model | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | ||
HyDL-IDS | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | ||
Fuzzing | ACDM | 0.9999 | 0.9999 | 1.0000 | 0.9999 | 0.9999 | |
LSTM-based model | 0.9999 | 0.9996 | 0.9997 | 0.9999 | 0.9997 | ||
HyDL-IDS | 0.9999 | 0.9998 | 0.9989 | 0.9999 | 0.9993 | ||
Malfunction | ACDM | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | |
LSTM-based model | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | ||
HyDL-IDS | 0.9999 | 0.9999 | 0.9999 | 0.9999 | 0.9999 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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
Gao, F.; Liu, J.; Liu, Y.; Gao, Z.; Zhao, R. Multi-Attack Intrusion Detection for In-Vehicle CAN-FD Messages. Sensors 2024, 24, 3461. https://doi.org/10.3390/s24113461
Gao F, Liu J, Liu Y, Gao Z, Zhao R. Multi-Attack Intrusion Detection for In-Vehicle CAN-FD Messages. Sensors. 2024; 24(11):3461. https://doi.org/10.3390/s24113461
Chicago/Turabian StyleGao, Fei, Jinshuo Liu, Yingqi Liu, Zhenhai Gao, and Rui Zhao. 2024. "Multi-Attack Intrusion Detection for In-Vehicle CAN-FD Messages" Sensors 24, no. 11: 3461. https://doi.org/10.3390/s24113461
APA StyleGao, F., Liu, J., Liu, Y., Gao, Z., & Zhao, R. (2024). Multi-Attack Intrusion Detection for In-Vehicle CAN-FD Messages. Sensors, 24(11), 3461. https://doi.org/10.3390/s24113461