{'fraction_non_alphanumeric': 0.029739104703348732, 'fraction_numerical': 0.006781304969669073, 'mean_word_length': 5.377260575562195, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Systematic Survey of Attack Detection and Prevention in Connected and Autonomous Vehicles

The number of Connected and Autonomous Vehicles (CAVs) is increasing rapidly in various smart transportation services and applications, considering many benefits to society, people, and the environment. Several research surveys for CAVs were conducted by primarily focusing on various security threats and vulnerabilities in the domain of CAVs to classify different types of attacks, impacts of attacks, attack features, cyber-risk, defense methodologies against attacks, and safety standards. However, the importance of attack detection and prevention approaches for CAVs has not been discussed extensively in the state-of-the-art surveys, and there is a clear gap in the existing literature on such methodologies to detect new and conventional threats and protect the CAV systems from unexpected hazards on the road. Some surveys have a limited discussion on Attacks Detection and Prevention Systems (ADPS), but such surveys provide only partial coverage of different types of ADPS for CAVs. Furthermore, there is a scope for discussing security, privacy, and efficiency challenges in ADPS that can give an overview of important security and performance attributes. This survey paper, therefore, presents the significance of CAVs in the market, potential challenges in CAVs, key requirements of essential security and privacy properties, various capabilities of adversaries, possible attacks in CAVs, and performance evaluation parameters for ADPS. An extensive analysis is discussed of different ADPS categories for CAVs and state-of-the-art research works based on each ADPS category that gives the latest findings in this research domain. This survey also discusses crucial and open security research problems that are required to be focused on the secure deployment of CAVs in the market.


Introduction
Connected and Autonomous Vehicle (CAV) is an automotive entity configured with revolutionary technologies such as sensors, robotics, and complex software. It automatically executes different automotive system operations (like computation and communication) for Vehicle-to-Everything (V2X) communications and In-Vehicle Network (IVN) data transmission through wireless technology, i.e., Dedicated Short-Range Communications (DSRC), Long-Term Evolution (LTE, i.e., 5G/6G), or Wireless Fidelity (Wi-Fi). The integration of such modern technologies with Intelligent Transportation Systems (ITS) is a powerful tool that can gather meaningful information for data analytics and provide real-time information and effective services to the end users, thereby benefiting society, vehicle passengers, other people, industrialists, governments in the development of a sustainable world [1], [2]. Therefore, CAVs are widely practiced in various applications, i.e., advanced road safety, business and human productivity, traffic flow and congestion management, datadriven mobility, sustainability, and transport accessibility. Hence, CAVs provide new business opportunities through next-generation automotive applications and services. CAVs are mainly developed to offer effective productivity while commuting on the road. Thus, the control of various CAV components is primarily managed by the vehicle rather than the driver. To make it more straightforward for the implementation purpose, different automation levels for a vehicle are categorized while considering the level of vehicle and driver controls. A range of these levels starts at level 0 (no automation) and ends at level 5 (full automation). They are classified as (i) level 0: no driving automation, (ii) level 1: driver assistance, (iii) level 2: partial driving automation, (iv) level 3: conditional driving automation, (v) level 4: high driving automation, and (vi) level 5: full driving automation. In this classification, the first three levels are categorized as the driving environment based on human driver monitoring, whereas the automated system monitors the driving environment in the other three levels [3].

Introduction of IVN and CAN
IVN is the backbone of CAVs in today's modern vehicles for data computation and communication among different installed sensors and mechanical components within a vehicle [4]. CAVs consist of several Electronic Control Units (ECUs) that are connected over the Controller Area Network (CAN) to transmit meaningful automotive instructions for further action(s). There are different communication protocols for IVNs, i.e., CAN, FlexRay, Media-Oriented System Transport (MOST), and Local Interconnect Network (LIN). Among these protocols, CAN is mainly practiced in an auto-

Market Scope of CAVs
Automotive applications and services are used in various industries, such as transportation, retail, autonomous vehicles, financial, insurance, energy, health services, and media for multiple purposes that lead to a huge market scope of automotive businesses in the present and future world. According to a survey [11], the automotive industry sector's total annual revenue in 2014 was around 2 trillion USD in the United States (US) only, which was 11.5% of US Gross Domestic Product (GDP) in the year of 2014. Around USD 735 billion (of the total annual revenue) was explicitly generated from autonomous vehicles [11]. While looking at the roadmap of the New South Wales region of Australia [12], CAVs will be adopted at a large scale in a service environment for different usages, aiming for new economic opportunities, great connectivity in customers' lives, and better accessibility of places through data analytics, new technologies, and strong collaborations. Moreover, autonomous vehicles provide functionality and services that are beneficial to decrease energy requirements and achieve sustainable mobility development. Such functionality and services include: (i) vehicle lightweight and rightsizing, (ii) powertrain electrification, (iii) platooning, and (iv) eco-driving [13].
Worldwide, e-commerce sales extensively grew to around USD 3.5 trillion from USD 572 billion in the period of 2010-2019 [14], and even more people have become E-commerce customers due to the Covid-19 pandemic for multiple individuals and societal benefits. The demand for last-mile delivery has therefore increased exponentially, resulting into higher delivery costs, longer delivery times, and fixed time slots due to limited human resources. Moreover, the environment will have negative impacts as delivery traffic continuously increases. Therefore, it is necessary to mitigate adverse effects for a sustainable development. To deal with these challenges, Autonomous Vehicles (AVs) can play a significant role in delivering various products to customers effectively and quickly to fulfill customer preferences, leading to a new delivery concept as Anything to Consumer (X2C). Considering the trend in shopping (for any products), the X2C delivery market will dominate regular parcel delivery in the near future that can be possible through Automated Guided Vehicles (AGVs) to deliver products in urban areas and Unmanned Aerial Vehicles (UAVs) for rural or hilly areas delivery, benefiting customers, businesses, and government [15]. Considering the significant intentions of government agencies, automotive industries, and researchers, many economic opportunities extensively open various ways to develop and commercialize new components and systems through future mobility technologies.

Security, Privacy, and Efficiency Challenges
The market of CAVs is exponentially increasing for different automotive services and applications due to various benefits of CAN bus system-based CAVs that integrate the outside world and the IVN for better real-time data analytics. For example, CAVs interact with different components (via an available central gateway in IVN), such as wireless sensors, other vehicles, network infrastructures, pedestrians, and other smart devices over LTE, DSRC, and Wi-Fi technologies for sustainable mobility. However, the nature of messages broadcast in CAN opens the opportunity for the attackers to penetrate the CAN for susceptible activities in the system. Moreover, CAN does not provide in-built authentication and encryption facilities to protect the system from potential security attacks. Thus, CAVs are vulnerable to many security threats in the exposure of IVNs to the remote attackers [7], [8], [16], [17], [18], [79]. It is also demonstrated through experiments on a Jeep Cherokee that compromised electronic control units (ECUs) can be remotely accessed to broadcast forged or bogus messages on the CAN bus system [19], [20]. The discussed experimental results [21] revealed the possibility of security threats in different Bayerische Motoren Werke (BMW) car models, thereby the remote attacker can control the IVN of CAVs where various types of ECUs, OBD-II, and TIS are connected over the CAN bus. CAN is eventually susceptible to different security and privacy attacks due to the unavailability of encryption mechanisms and poor management of access control.
CAVs communicate with heterogeneous devices to deliver meaningful information timely and provide the best available content that enables decision-making systems to offer better efficiency and effective results. CAVs are also capable of gathering movement and location-based data of travelers through the installed sensors, and this captured data can be saved into the database (by using cloud-assisted systems) to analyze it based on available software, providing meaningful information to end users [22], [23], [24]. The automotive system in CAVs is also linked with different user accounts to provide relevant services effectually. However, the exposure of IVN also directly reveals the users' personal and confiden-tial data (i.e., private conversations, user activities, vehicle locations, payment details, etc.). Since the design and implementation of privacy protection regulations are comprehensively pending for the collected data from CAVs, the collected data is shared among different stakeholders, such as the government, private industries (as the third-party service provider), and people [18], [25]. Consequently, privacy protection in CAVs is essential to avert the disclosure of identifiable information, vehicle tracking, and personal activities.
ECUs are resource-constrained components, and they are connected over the CAN bus to regularly broadcast messages for delivering different automotive instructions to the receiver entities so the automotive system can make better decisions in CAVs, where the human intervention is significantly less or null. However, the broadcast nature also increases the computation and communication overheads on the CAN bus and receiver end. Besides, security mechanisms need resources during the implementation stage to verify the authenticity and integrity of the sender and transferred messages [16], [79], [87]. Therefore, it is vital to minimize the requirement of computational resources in attack detection and prevention solutions to quickly identify intrusions and provide protection against crucial threats in CAVs.

Motivation towards a New Survey Article
Several survey articles [2], [10], [17], [26], [27] on the cyber security of CAVs are presented by discussing various security threats and vulnerabilities in the domain of CAVs. Such articles have focused on the classification of attacks, attack features, impacts of attacks, cyber-risk, defense strategies against attacks, and safety standards. CAVs perform different IVN operations based on the automotive control system for effective services, but there is remarkably less or null human interference [3]. To offer effective productivity and comfortable journey to vehicle passengers, CAVs are connected with the outside world via DSRC, LTE, or Wi-Fi [2]. As a result, attackers can perform adversarial activities to disrupt IVN functionalities by launching different attacks remotely. This may lead to a major disaster on the road [7], [8], [16], [17], [18]. It is hence necessary to effectively identify vulnerable activities, detect defective components, protect the automotive system, and recover from unexpected situations to avert infrastructure and human life damages.
An Intrusion Detection System (IDS) is a software-based procedure or tool to monitor the system/network to capture any adversarial incidents or activities that infringe the system's normal functionalities [28]. Attack Detection and Prevention Systems (ADPSs) are software-based approaches, developed to detect anomalies in the system and protect it from malicious activities to continue its operations. Though it is vital to timely detect incidents and prevent the automotive system, the importance on attack detection and prevention approaches for CAVs has not been covered extensively in earlier surveys [2], [17], [26], [27]. There are some surveys [1], [7], [10], [26], [29] with a limited discussion on attacks detection and prevention, but all different types of ADPSs for CAVs are unexplored that can indeed improve the automotive system of CAVs. We have summarized the coverage (based on important subjects) of relevant recent survey articles in Table 1 to understand the status of existing security survey articles in CAVs. We also notice that the significance of key requirements for CAVs (in terms of security, privacy, and efficiency) are not discussed substantially. This motivated us to extensively discuss all ADPS categories for CAVs that can help detect security problems in IVN and reduce the damage cost through CAVs on the road. Focusing on the aforementioned requirements, we write a detailed survey on different categories of ADPS and potential challenges in these ADPSs.

Organization of Paper
The remaining part of the paper is organized as follows: Section 2 provides an overview of important security and privacy properties, attack scenarios, possible attacks in CAV, and performance evaluation parameters for ADPS. Section 3 described the considered approach to include the most relevant articles in preparing a survey paper. Section 4 discusses the overview of different ADPS categories and stateof-the-art research works based on each ADPS category that gives the latest findings in this research domain. In Section 5, we suggest important and open security research problems that are required to be focused on for novel contributions in CAVs. Section 6 gives our concluding remarks on the survey article and intended fuzzing approaches for intrusion detection.

Key Requirements for CAVs: Security, Privacy, and Efficiency
This section discusses essential security and privacy properties for IVN. We explain crucial security and privacy threats that can significantly impact the IVN. We also discuss various malevolent ways, used for adversarial activities in IVN. Therefore, it may lead to security and privacy challenges that need to be addressed to protect the IVN from illegal actions. Moreover, different performance parameters are explained that are useful to measure the performance efficiency of CAN-based ADPS and to understand the performance results of future ADPS universally.

Security and Privacy Properties
We explain relevant security and privacy properties that are more important in IVN as the exposures of private data and the system may lead to various issues in CAVs [30].

Authentication
When messages are exchanged over a common communication channel, the receiver entity should confirm the sender and data exactness of transferred messages to prevent misleading information and forgery. Furthermore, confirming both entities (sender and receiver) through mutual authentication and key agreement mechanisms in two-way message communications that confirm data exchanges between legitimate entities is necessary. Otherwise, it may lead to impersonation and data modification attacks, resulting into infrastructure damage and/or life threats to vehicle travelers. ECUs are connected over the CAN bus to send relevant messages to execute different operations in the automotive systems, and it thus becomes necessary to authenticate the sender in CAVs to avoid counterfeit information. If the sender is not authenticated, then there is a possibility that adversaries can perform malicious actions to interrupt IVN functionality, aiming to damage the automotive system in CAVs [1], [2], [7], [10], [17], [26], [27]. To satisfy authenticity in the CAN, various security solutions that are mainly designed using MACs and digital signatures can be practiced.

Availability
It refers to the reliability of obtained information at the receiver side within a stipulated time to consider as the input in further actions. If imperative information is unavailable to the authorized entity at the required time, it may lead to unfortunate events that can put the entire automotive system in impairment situations [111]. CAVs are configured with the CAN to perform different automated operations based on the collected/given vehicular data through IVN functionality. Crucial automotive components (i.e., engine, power train, tire pressure monitoring, etc.) should receive instructions without any delay to execute related operations successively for providing an impeccable experience in autonomous vehicles. If exigent data is unavailable to crucial automotive components, it may lead to vehicle accidents on the road that might also have direct risks to human life. Moreover, it is also required to send appropriate messages if data delivery fails for some reason. Therefore, data availability is a crucial requirement in CAN-based CAVs.

Confidentiality
When messages are transferred over a public channel, it is essential to ensure that only legitimate receivers understand such information from the sent messages to satisfy the secrecy of data. Data confidentiality is lost if adversaries or other entities can extract meaningful information by intercepting exchanged messages. A compromised device can then disclose confidential information while sending data into the system. IVN messages are sent over the CAN bus and include automotive instructions used as input to perform further operations. Further, transmitted messages are available to all connected ECUs due to the broadcast nature of the CAN. Thereby, suppose any compromised ECU is connected over the CAN bus (and there is no guarantee that other ECUs know the connectivity of compromised ECUs over the CAN bus). In that case, an adversary can use confidential information of CAVs during malevolent activities [7]. Thus, encryption of CAN messages has become essential during data transmission, but it is also vital to consider the resource-constraint problem in CAN while applying encryption techniques to satisfy data confidentiality.

Integrity
When messages are transferred from the sender to the receiver side, information should be available at the receiver entity the same as the sender sent it. If the receiver obtains modified information, then transmitted messages are tampered, resulting in the loss of data integrity. Thereby, the receiver should discard such altered messages without considering them. If the receiver accepts amended information, it may lead to different decisions, as the received information is used as input values for further operations. The functionalities in CAVs are operated based on automatic operations, and the intervention of humans is highly less or completely null in an automated system-monitored driving environment. Therefore, data integrity requirement becomes more significant in CAVs to verify the exactness of obtained messages from various senders. If adversaries can alter the CAN message, it creates data integrity problems in the system. It is also challenging to identify the sender in CAN to report malicious actions (performed by the specific entity) due to the unavailability of sender information in CAN messages [2], [7], [27]. One-way hash-based authentication techniques are effective to avoid data tampering in CAN messages. Consequently, integrity is also vital in knowing whether exchange messages are altered or not.

User Privacy
CAN is highly useful in automotive systems to execute various automated operations in CAVs, UAVs, AGVs, the health sector, and other related application areas, reducing/removing human monitoring for rich experience during the usage. In such applications, the system is connected to different devices for effective data analytics by exchanging meaningful communications. Furthermore, data is particularly crucial, so it has substantial inhibitive impacts on the system and its users if it does not have adequate data protection mechanisms. Thus, if data leakage is possible in CAVs, it can expose vehicle users' activities, previously visited places, vehicle movements, and related actions [2], [17], [27]. In order to avert illegal data access, it is required to ensure that only legitimate entities should know vehicle users' activities. Therefore, it is necessary to satisfy user privacy in CAVs.

Attacks Vector
The attack vector is the way to enter the system to launch a diversity of attacks. We describe different possible ways for adversarial activities in CAVs based on the CAN bus architecture, OBD-II, wireless interface, physical ports, and ECUs components [7], [8], [10], [18], [27].

External and Internal Adversaries
The external adversary is an outsider entity that is capable to receive public channel parameters (transferred over the TIS). However, the system parameters (given to the registered entities during the registration/initial phase) are not available to such adversaries as the external adversary is not registered with the system for legally executing various operations and communications in the future. Therefore, this type of adversary has limited capabilities to launch various attacks on the IVN components of CAVs. However, external adversaries can monitor exchanged messages (transferred over the public communication channel) to eavesdrop on such messages and then use such information to intercept future communications through adversarial actions.
An internal adversary (also known as an insider attacker) can be an authorized entity (who is registered with the central authority) to communicate with other registered entities. Thus, an internal adversary has own credentials, system parameters, and public channel parameters, enabling the adversary to perform malicious activities (launching diverse attacks) on the IVN components, i.e., ECU, CAN bus network, and infotainment system. Since internal adversaries aim to execute illegal actions on the system as a registered entity to avoid identification and detection. It is indeed challenging to identify inside attackers.

Active and Passive Adversaries
An active adversary aims to interrupt prevailing functionalities of the AV systems by generating/sending packets with deceitful intents to the system. Thereby, it has a direct impact on the AV systems which may persist important components of CAVs (i.e., engine/power train/chassis ECUs, CAN bus, gateway ECU) to perform abnormal actions, e.g., stop/delay messages, do changes in communications, overwhelm CAN packets, etc. Since CAVs enabled with the automation level 3/4/5 have very less or no human intervention, it becomes more crucial to manage CAVs during unexpected events (due to adversarial activities on the IVN). Therefore, malicious actions by active adversaries are more precarious comparatively that may lead to massive damage to the system infrastructure and/or humans.
A passive adversary mainly targets to eavesdrop on exchanged messages over the CAN bus and TIS to capture/learn meaningful information/communications from the collected data. An adversary then uses such eavesdropped data later for illegal purposes (i.e., forge message communications, modify messages, impersonate data transmissions, etc.) to disturb the IVN components of CAVs. This type of adversary is not easily identifiable as passive adversaries do not intercept the AV systems' functionalities directly.

Local and Remote Adversaries
When the manufacturers/service providers install tampered/vulnerable hardware equipment during the device installation or upgrading procedures, adversaries have an opportunity to connect with the automotive system devices (i.e., OBD-II, TIS, and ECUs) to understand on-going operations and other functionalities. Since such entities are overtly involved with the direct access of physical devices, they play a crucial role in the initialization/upgradation. An adversary can thus become more powerful to covertly perform harmful actions in the system, making it difficult to identify such compromises. The risk level in CAVs is therefore disastrous in the presence of compromised hardware components. Hence, it is important to protect CAVs from such local entities to minimize the system exposure.
Malicious code can be implemented in CAV equipments remotely to create backdoor vulnerabilities. This, in turn, enables the adversary to gain unauthorized remote control of the system/device [105], [106]. The remote attacker can then give commands through malware to execute damaging operations in CAVs and extend the scope of affecting areas through various malware vulnerabilities. Thus, adversaries can disrupt the functionalities of the CAN bus system architecture, software programs, and hardware devices/designs.

Possible Attacks in CAV
The conventional CAN and CAN-FD bus architectures are mostly used for real-time IVN communications due to the reduced cost, better efficiency, and simplified installation. However, they are exposed to various security attacks due to system vulnerability possibilities through the common CAN/CAN-FD communication bus, lack of authentication mechanisms, data encryption methods, and wide network connectivity over DSRC, Wi-Fi, LTE, and Bluetooth. As a result, the adversary can launch a variety of attacks over the CAN bus, ECUs, OBD-II, and keyless entry systems [7], [8], [10], [18], [27]. We have considered important attacks based on the significant impact on the IVN. Thereby, the explanation of pivotal attacks is limited to the CAN bus architecture, OBD-II, and ECUs, but we have not considered Light Detection And Ranging (LiDAR), Radio Detection and Ranging (Radar), and Global Positioning System (GPS)-based attacks in the following discussion.

Impersonation
When the adversary gets the CAN bus network access, s/he can obtain all transferred messages due to the broadcast nature. Adversaries can learn the way of ECU behavior, i.e., CAN identity (ID), transmission rate, and payload range. The sender's information is not involved in CAN messages, making it easier to imitate ECU behavior by including the same information with an identical frequency. However, there is a possibility of a Denial of Service (DoS) attack due to the increment in the number of CAN messages, but an adversary can appropriately manage the timings for sending data over the CAN bus and disabling a particular ECU to launch an impersonation attack [2], [7].

Modification/Fabrication
This attack is performed to alter the CAN message payload with bogus information as CAN is enabled with the limited security features [8]. The erroneous data is then sent to the receiver ECUs for misleading and to perform faulty operations in CAVs. Attackers can get a CAN ID of exchanged messages through the CAN bus connectivity, as well as the authentication and integrity properties are not implemented effectively in the CAN bus protocol. Therefore, adversaries can easily launch a modification attack to deliver fallacious information to disrupt vehicle functionalities by obstructing ECUs, TIS, and the CAN bus system. Since the adversary can broadcast incorrect data by injecting malicious messages, it is also difficult to correctly identify a modification attack due to a small amount of payload in CAN messages [2], [7], [27].

Sybil
CAN does not offer robust security features, resulting into the exposure of IVN to the attackers [8]. Authentication mechanisms are thus developed to protect illegal activities over the CAN bus architecture while exchanging CAN messages. However, the system requires computational resources to complete all the verification procedures before proceeding with the received data. All ECUs are connected over the CAN bus to continuously broadcast messages, but such ECUs are resource-constrained in nature [16], [79], [87]. Thus, authentication schemes should be cost-effective; otherwise, they may require more computational resources. Moreover, the receiver ECU takes more time to confirm the legality of received CAN messages, and it is overburdened with many remaining messages (which are required to be verified), including high-priority data, leading to a Sybil attack in IVN. Therefore, minimizing the impact of a Sybil attack is important by designing lightweight authentication protocols for CAN.

Replay
Messages are sent over the common CAN bus and are accessible to all the connected ECUs due to the broadcast nature of data transmission. The purpose of a replay attack is to stop transferred messages and re-transmit them (with or without modifications in data payload) later. Thus, the receiver ECUs cannot receive essential data timely, impacting vehicle services and functionalities provided through an automated vehicle system. Since CAN messages include crucial and real-time information which are used as an input in other operations to perform further executions, the unavailability of CAN messages to the receiver ECUs significantly impacts the overall IVN system. Besides, when adversaries broadcast CAN messages (already captured from the CAN bus) again, it increases the communication overhead on the CAN bus and the computation cost (to authenticate delayed messages) at the receiver ECUs. CAN components thus require more computational resources though ECUs have limited computing power to execute various operations [1], [2]. Hence, detecting a replay attack quickly is indispensable, reducing the additional requirement of computational resources and delivering CAN messages timely to make accurate decisions in CAVs.

Injection
An adversary aims to change the sequence of legal CAN frames, message frequency, the number of CAN frames for transmission on the bus, and message payload through an injection attack. Since CAN has limited security features to support authentication and encryption for transferred messages, adversaries can inject payload over the CAN bus (to fabricate messages) at an abnormal rate with unusual CAN traffic. This situation leads to the generation of simulated events that direct CAV parts to implement automotive operations based on the given instructions by an adversary. Thus, it directly interrupts the execution of crucial operations in the CAN [1], [7], [10]. Therefore, adequate authentication and integrity verification mechanisms are required to confirm exchanged CAN messages' legitimacy and exactness to protect from such attacks.

CAN Bus-off
Connected components to the CAN bus use the arbitration field to find the preference of CAN messages and then decide the occupancy of the CAN bus for delivering priority data first to the receiver ECU(s) before sending less important data to the destination. Since CAN messages are mainly sent without encryption (due to the fixed size of data fields), and a robust authentication mechanism is not available for CAN communications, adversaries can send many CAN messages with the highest attribution identity to dominate the CAN bus. Therefore, the communication link becomes unavailable to deliver crucial CAN messages for legitimate CAV components. Besides, the adversary can send the same CAN messages with a high frequency to overwhelm CAN resources to make the CAN bus unavailable for normal operations and functionalities of CAVs [1], [10].

Side-channel
Adversaries can easily connect with the TIS applications and services and collect pertinent information (e.g., timing, energy consumption, cache, etc.) through connected devices (over wireless connectivity) with the IVN. In CAVs, in-vehicle infotainment systems can provide information, i.e., location, speed, access to related applications, and other data to make better decisions. Adversaries first analyze target systems' activities based on the collected pertinent information and then launch an attack on a specific system/user to disrupt normal operations and functionalities of the CAN. The target system is then exploited through analyzed data [31]. Since the gathered data (based on various TIS applications and services) may include personal information, visited location, and other activities of vehicle users, it may lead to user privacy issues. Hence, protecting the IVN and avert from potential side-channel attacks is also important.

Remote Sensor
Sensors support various functionalities to measure environmental details, detect objects, and share information to effectively perform automotive operations in CAVs. Such delivered information is crucial in IVN as it is used as input to make different decisions. There are vital sensors, i.e., camera, ultrasonic radar, LIDAR, vision, sonar, and GPS [99], [100], which are used in crucial applications of CAVs. When inaccurate values are measured and not sent correct information to the receivers by the installed sensors, the automotive system may lead to spoofing and eavesdropping attacks [1], [2], [7]. Since CAN has limited security features, and demonstrations confirmed that adversaries could remotely access the CAN [8], security risks are significant in the automotive systems as CAVs have very less or no human intervention. Hence, t is essential to regularly check the status of sensors (in terms of faulty, compromised, or damaged) through intrusion detection mechanisms and protect data exchanges between such sensors and other IVN devices with encryption schemes. Figure 2 displays CAV's potential attack surface model. Different CAV components (i.e., IVN, physical ports, wireless interfaces, keyless entry systems, infotainment system, and perception sensors) can be targeted to perform adversarial activities. The attackers can launch various attacks (e.g., impersonation, Sybil, replay, injection, bus-off, sidechannel, and modification) on the automotive driving system to interrupt vehicle operations, get control of CAVs, and steal personal information. Essential security and privacy requirements are thus not satisfied while offering more comfort and intelligent vehicle services, leading to the insecure development of CAVs.

Performance Measurement Parameters in ADPS
It is vital to develop ADPS approaches that can detect abnormal events and seamlessly identify the sources of such situations in real-time. Since designed approaches are used in CAVs for robust results, it is important to measure the performance efficiency of the developed approaches to find anomalies. We describe significant performance parameters as follows, understanding the effectiveness of various ADPS approaches. It is considered that each occurrence that belongs to normal/regular events is considered as the positive sample, and other occurrences are considered as the negative samples [64], [72]. We have used notations (for Equations 1, 2, 3, and 4) as = the number of correctly identified positive samples, = the number of correctly identified negative samples, = the number of wrongly identified positive samples, and = the number of wrongly identified negative samples.

Accuracy
It is measured based on the average of faultless predictions for abnormal and normal events or accurate and erroneous values (occurred in the system) from the total number of occurrences. The accuracy performance parameter for-

Sensitivity
It evaluates the ratio of correctly found abnormal events or erroneous values from the number of the same anomalous/incorrect occurrences. Sensitivity is computed as per

Precision
The proportion of erroneous values or abnormal events (among the forecasted anomalous/erroneous) from the number of the same anomalous/incorrect occurrences is called precision, and it is calculated based on Equation 3.

F1 Score
It is the harmonic mean of precision and sensitivity, and it can be calculated through Equation 4.

Specificity
It is the proportion of the number of correctly found injected packets (represented as ) to the total number of actually injected packets (represented as + ), and its formula is as written in Equation 5, where = true negative and = false positive.

Articles Selection Methodology
We first describe the considered article collection approach to identify related research papers for this survey article. After that, we discuss our results on a keyword searching process (that is carried out to include the most relevant papers for a more comprehensive and precise survey) and then explain how different research papers have been chosen for clear discussions.

Article Collection Approach
To collect relevant papers for the survey scope, we first selected precise keywords that are appropriate for ADPSs in connected and autonomous vehicles. Based on these chosen keywords, we then started keyword searching for the timeline of 2011-2021 on the topmost relevant scientific publication venues. The selected keywords for searching are Autonomous Vehicles/Cars, Connected Vehicles/Cars, Controller Area Networks, In-Vehicle Networks, Automotive Networks as domain keywords, whereas Intrusion Detection is taken into the account as a method keyword. Domain keywords mean the set of networks/services, which are based on the application areas. If a solution-based approach, technique, or mechanism is proposed/introduced toward the specific problem, it is considered a method keyword. We considered the following scientific publication venues to search for relevant papers.

Article Selection Method and its Results
We follow certain criteria to include papers for more discussion in this survey article, and they are as follows: • A paper is included if it introduces/discusses the general concept of ADPS categories is included in it.
• A paper that proposes an ADPS approach, technique, or mechanism for CAVs.
• A set of ADPS performance measurements for CAVs are suggested/introduced.
• We have excluded poster/work-in-progress/demo papers in the process of relevant papers collection.
We performed keyword searching for the selected keywords, and the results are shown in Table 2. While considering the above-stated criteria, all keyword hits resulted in 3295 papers from the chosen scientific publication venues. We then studied all these papers based on their title/content to find relevant papers to the survey scope, resulting in 519 papers. Finally, we did an in-depth study of these articles to select papers for more discussions, and we found the most We also did a query for "Connected and Autonomous Vehicles" and "Attack Detection and Prevention System" into the Web of Science (WoS) database 1 , and it resulted in 2785 and 1500 articles, respectively. In [59], [88], [89], the consideration of road context is taken into account to improve the AV system efficiency. Here, the road context includes the road conditions (i.e., bend/joint/fork of roads, traffic light, and bump), nearby vehicles, pedestrians, weather conditions (i.e., fog, rain, and snow), lights conditions (i.e., the sunrise, sunset, and tunnel lights). Out of 75 papers are survey articles and other relevant papers in which the authors have discussed the ADPS for CAVs. Table 2 displays query results for each keyword and the number of selected papers eventually for this survey, making it more straightforward for better understanding. Based on our literature study of various research articles, we have listed different ADPS categories, such as fingerprints, parameters monitoring, information-theoretic, machine learning, and message authentication. Attack detection and prevention solutions are mainly proposed based on these categories to find security threats and attacks in CAVs. After selecting 49 papers (that proposed ADPS approaches/techniques/mechanis for CAVs), we have classified each paper under the specific ADPS category to understand their solution methodology to detect intrusions in CAVs. Figure 3 shows the number of papers for each ADPS category. These papers are considered for the literature in this survey for a detailed discussion, providing extensive information to the readers.

Attacks Detection and Prevention Systems (ADPS) in CAVs
An IDS is a software application or device that can find real-time incidents (performed by attackers to disrupt routine functionalities of the system) for any policy violations or suspicious actions by monitoring network traffic. An IDS can also act as a resilient protection technology for system security once standard technologies fail in the system [28]. CAVs are enabled with many automated functionalities for a safe, more intelligent, and comfortable journey on the road. However, it is also essential to provide a high level of secu- rity in CAVs to avert infrastructure damages, human losses, and business crises and provide trustworthy services to the users. Thus, it is required to have an ADPS in CAVs that can offer effective identification and protection against attacks using either signature or anomaly-based solutions.
The automotive system architecture includes four stages to perform various activities in CAVs, i.e., (i) perception, (ii) prediction, (iii) planning, and (iv) decision making and control, as shown in Figure 4. The first two stages are classified as data acquisition and modeling, whereas the third and the fourth stages are categorized as action parts. The first stage is to collect meaningful data from the camera, RADAR, LIDAR, and V2X/IVN connections. The second stage performs the detection, prediction, and classification of objects based on the given input data. The planning stage determines behavior and route direction for the classified data and manages the automotive system based on the available resources. The decision-making and control stage provides appropriate automotive instructions to the system to execute them adequately and manage the connected system components [90].  CAN is very limited in protecting various system components due to the unavailability of sufficient security features [7], [10], [76]. CAVs are enabled with the outside world connectivity [16], [17], [18] that allows adversaries for the execution of vulnerable activities in IVN remotely [8]. Since CAVs have considerably less or null human intervention [3], the failure of IVN operations may significantly impact the road infrastructures and people. Thereby, it is important to effectively identify possible security and privacy threats over the IVN that can reduce/avert damages in CAVs. Developing appropriate attack prevention solutions is also necessary to protect the automotive systems against such threats. A limited analysis has been presented on different types of ADPSs for CAVs and analyzed some of related research works in [1], [7], [10], [26], [29]. We thus discuss various ADPS methods that are useful to detect intrusions in CAVs and to defend the automotive systems in such situations. Moreover, an extensive investigation is explicitly discussed on state-of-the-art research works for each ADPS category.

Introduction and Analysis to ADPS Methods
Attack detection and prevention solutions are proposed to detect security attacks to find vulnerabilities and protect the system from various attacks so that the security flaws are identified before they do real damage. In CAVs, there are mainly six types of ADPS categories, i.e., (i) fingerprints, (ii) parameters monitoring, (iii) information-theoretic, (iv) machine learning, (v) message authentication, and (vi) other approaches. We explicitly describe each ADPS category, as they are mainly used in designing attack detection and prevention solutions for CAVs.

Fingerprints
A fingerprint is a group of specific and unique configuration information that can identify devices, just as human fingerprints uniquely identify people. Data analysis can be applied to datasets such as network traffic and device configuration to extract the devices' fingerprints. In general, device fingerprinting can be classified into active or passive techniques; active techniques send specially crafted packets to probe the device, while passive techniques monitor the network traffic to detect patterns in the network traffic. Fingerprint-based IDS performs at the physical layer of the CAN bus, taking advantage of differences in physical properties, such as manufacturing variations, cabling, and aging, which allow ECU to be fingerprinted [26]. The digital fingerprints of the ECUs are then used to uniquely identify the sender of the CAN message. When the IDS detects an anomaly between the observed fingerprint of a CAN message and the profiled fingerprint of the sender's ECU, an alert is raised, and unauthorized or unknown nodes will be flagged.
As the characteristics of CAN signals are hardware-defined, the impersonation of CAN signals is difficult to tamper ECUs for an attacker without physical access. However, fingerprintbased IDS is ineffective against masquerade attacks [38], but this problem can be solved using a behavior-based IDS by analyzing the network traffic to create a signature. Attackers can compromise ECUs and use them to send malicious messages with the same physical fingerprint and remains undetected by fingerprint-based IDS. Although physical properties make excellent fingerprints, they vary with time due to changing environmental factors, especially the temperature and equipment aging of equipment [34]. It will reduce the model's accuracy, which means that the IDS needs to be constantly updated with the latest fingerprints via periodic model retraining. Also, fingerprint-based IDS has a high computational demand due to the high sampling rates required to achieve accurate identification of devices by fingerprinting [35].
Driver style and behavior are affected by individual experiences and habits. In contrast, CAVs' driving behavior depends on the road conditions and driving model and should be less varied, more consistent, and more stable. Therefore, device fingerprinting should better identify devices due to the regularity of CAN traffic patterns and higher device identification accuracy. We describe related fingerprint-based solutions as follows.
A Clock-based IDS (CIDS) [32] is developed to find the intervals of recurring in-vehicle instructional messages, and this helps to estimate the clock skews of ECU transmitters for fingerprinting details of ECUs. Fingerprints are then used to construct a baseline of ECUs' clock behaviors using the Recursive Least Squares (RLS) algorithm. Based on this baseline, CIDS performs a cumulative sum analysis to detect masquerade, fabrication, and suspension attacks over the CAN protocol, enabling fast identification of IVN intrusions (at a low false-positive rate of 0.055%) and not missing any anomalies.
An attacker identification scheme, Viden (Voltage-based attacker identification), is proposed in [33] that finds the adversary ECU in the IVN based on the measurement and utilization of the voltage. Viden first determines the genuineness of the measured voltage signals during the ACK learning phase by checking whether the origin (of these signals) is from the legal message transmitter or not. The transmitter ECUs' voltage profiles are then updated as fingerprints based on the construction of the voltage measurements. Finally, an adversary ECU is detected in the IVN using the voltage profiles of an ECU. Based on the shown results on two actual vehicles and a CAN bus prototype, it is feasible to fingerprint ECUs through voltage measurements by Viden, thereby achieving a low false identification rate (of 0.2%) to detect the adversary ECU in the system.
VoltageIDS is proposed in [34] that aims to secure invehicle CAN networks through unique characteristics of CAN signals as fingerprints of ECUs. Taking masquerade and bus-off attacks for IVN into account, VoltageIDS is designed by observing two ECUs (one legitimate and another malicious) based on the sent identical signals to recognize the electrical characteristics of their messages, which is inherently challenging for the attackers to manipulate fingerprints. Further, VoltageIDS can also distinguish between a bus-off attack and errors in the system. The elevation of VoltageIDS is performed through actual vehicles and a CAN bus prototype setup that confirms the detection of intrusions in the in-vehicle CAN networks.
Scission [35] is proposed using fingerprint details (that can be extracted from CAN frames) to know the sender ECU's identification. Immutable physical characteristics from analog values are used to confirm the authorization of a sender ECU (to send evaluated messages), enabling to detect anoma-lies and the identification of compromised ECUs in the system. Scission's sender identification rate is 99.85 % on average on two series production cars and a prototype setup. The results show that Scission can detect ECU-based attacks from compromised, unmonitored, and other added devices.
CAN is enabled with limited resources, and thereby, the high implementation costs or infringement of backward compatibility inhibits the deployment of CAN protocols in IVN to execute different functions properly. Thus, it has been found through an analysis in [36] that the state-of-the-art CAN ADPSs depend on multiple frames that are used to identify misbehavior of a certain ECU, but these frames are susceptible to a Hill-Climbing-style attack. Therefore, realtime intrusion detection and identification system, SIMPLE is developed to exploit the physical layer features of ECUs through a single frame, and ECUs can be effectively nullified. The results of the real-time vehicle and lab experiments with automotive-grade CAN transceivers show that the average equal error rates in SIMPLE are around 0.8985% and 0%.
The existing approaches offer good results to avert possible security challenges in CAN, but they require high computational effort and sampling rates. EASI [8] is proposed by generating the fingerprint from a single symbol that improves the frame identification rate (of 99.98%) with less computation effort. Further, it is demonstrated that comprehensive signal characteristics can be processed for voltagebased sender identification using machine learning algorithms. The results show that the computational requirements and the memory footprint are reduced by 142 and 168, respectively. Moreover, the classification problem is solved within 100 s with a training time of 2.61 seconds.
The exposure of various real-world attack scenarios is designed to spoof the AV in [37] so that it is possible to coerce the victim to make hazardous driving decisions, leading to a fatal crash. Based on the field experiments, the impacts of different attack scenarios are analyzed through a Lincoln MKZ-based AV testbed, and it confirms the access feasibility of the victim AV that enables the attacker to compromise the security and safety of the AV system. To address these challenges, challenge-response authentication and radio frequency fingerprinting schemes are developed to detect the above-discussed spoofing attacks, and the spoofing detection accuracy is achieved at a higher rate, 98.9%.
A Voltage-based IDS (VIDS) effectively detects masquerade attacks that are launched based on a single attacker. The prior approaches can overcome single attacker-based masquerade attacks. However, a new voltage corruption strategy [38] (based on a novel masquerade attack, named DUET) can be performed using two compromised ECUs to corrupt the bus voltages recorded by the VIDS: it is launched in a two-stage process (i) VIDS retraining mode: manipulate a victim ECU's voltage fingerprint and (ii) VIDS operation mode: impersonate the manipulated fingerprint. The execution of DUET shows the possibility of a novel masquerade attack in VIDS. To avert DUET in addition to other ECU masquerade attacks, a lightweight mitigation mechanism, RAn-  [32] 2016 Find the intervals of recurring in-vehicle messages; Masquerade, Fabrication, Suspension;

ECU;
Low Ineffective during the injection of irregular messages; Cho and Shin [33] 2017 Identify the attacker ECU; Impersonation, Fabrication; ECU; Low Ineffective for passive attacks by compromised ECUs; Choi et al. [34] 2018 Detect intrusions without involving any modifications in the system; Bus-off, Masquerade; ECU, CAN; Low Possibility of potential attacks due to the usage of frequent learning to understand power source condition variations; Kneib et al. [35] 2018 Identify the sender ECUs to assess its legality and detect attacks from additional and unmonitored devices; Modification; ECU, CAN bus; Low Detection of compromised sender ECU for sent frames; Foruhandeh et al. [36] 2019 Attack detection through a single frame with low computational and data acquisition costs; Impersonation; ECU; Low Analysis of other crucial security threats; Kneib et al. [8] 2020 Determine attacks (based on compromised ECUs) with less computing resources; Impersonation; ECU; Low Management of corrupt electrical signals, Detect attacks from malicious ECU only; Sun et al. [37] 2021 Identify security vulnerabilities and enhance the security and reliability in CAVs; Replay, Impersonation; Sensors; -Management of corrupt electrical signals; Bhatia et al. [38] 2021 Propose a novel masquerade attack and identify the source of messages; Masquerade, Modification, Replay; ECU; Low Identification of benign and malicious bimodal distributions of voltage samples; domized Identifier Defense (RAID) is proposed in [38] using a unique protocol dialect (spoken by all ECUs on the CAN during the VIDS retraining mode). RAID is compatible with each ECU in frame format generation during VIDS retraining mode and protects against the corruption of ECUs' voltage fingerprints. Table 3 shows a comparative study of state-of-the-art fingerprints-based ADPS based on different attributes that give a better overview to understand the current scenario for attacks detection and protection using fingerprints.

Parameters Monitoring
Parameters Monitoring-Based ADPSs detect attacks by monitoring parameters at the network and message levels in the IVN. It is a two-step process: First, baseline traffic is established to learn how the system behaves based on the parameters and to understand the regular traffic. Monitored traffic is then compared against the baseline, and the IDS flags for any abnormal traffic using anomaly-based detection. Some potential network-based detection sensors presented in [91] are frequency, formality, location, range, correlation, protocol, plausibility, and consistency. Among the sensors, frequency is commonly used because most ECUs broadcast CAN frames regularly, and their transmission intervals can be easily observed [49].
Frequency-based IDSs are simple to apply and easy to analyze as an intrusion will disrupt the regularity of the CAN network and the frequency of the system [49]. Besides, Parameters Monitoring-based IDSs have low computational requirements as they monitor parameters for abnormal flow or irregular traffic in the real-time network. However, an IDS that uses frequency as a parameter relies on the cyclic nature of CAN messages and is ineffective against non-periodic communications such as the locking and unlocking of door [49]. In addition, the timing information of CAN traffic depends on the priority scheme of CAN, which may significantly change and affect the accuracy of the IDS [48]. Lastly, fingerprint-based IDSs and parameters monitoring-based IDSs are vulnerable to masquerade attacks. The driving style of CAVs is determined by self-driving models and produces a standard network traffic pattern compared to human-monitored vehicles. Disruptions to the regularity of the CAV's CAN network will have a noticeable change from the baseline traffic, and it can be easily detected by parameters monitoringbased IDSs. We discuss relevant parameters monitoring solutions as follows.
The proliferation of ECUs and a wireless connectivity feature in present-day vehicles enable different functions and services, but it also opens the possibility of different security threats in CAN. In [39], the bus-off attack, a new type of DoS, is proposed over the de facto standard IVN protocol, which exploits the error-handling scheme of IVNs aiming to shut down or disconnect uncompromised ECUs. The execution of a bus-off attack over actual IVN traffic on a CAN bus prototype and two real vehicles shows that this attack can be launched with the objectives of making uncompromised ECUs into defective ECUs and/or cessation of the complete automotive network. To address this challenge in IVN, a new defense mechanism is designed with two countermeasures as (i) indication of a bus-off attack: look for consecutive error frames with an active error flag, and (ii) confirmation of a bus-off attack: successful transmission of another message with the same ID. Another countermeasure can also be considered consecutive errors at the same bit position instead of frames.
IVN is enabled with many ECUs for various functions with Internet connectivity, and thereby, it has become a toppriority target point to launch automotive network system attacks. Thus, it is required to have compatible network mapping tools to report present security weaknesses and strengths of automotive networks. An automotive network mapping tool is developed in [40] that supports finding vehicle ECUs and their communications with each other. However, there is a significant challenge in CAN, as CAN messages do not include the sender's information. Therefore, an automotive network mapper tool, CANvas, is designed to know the in-formation of sender ECUs based on a pairwise clock offset tracking algorithm and finds the receiver ECUs using a forced ECU isolation technique. The results confirm that CANvas can precisely identify ECUs in the network and the senders and receivers of CAN messages on the open-source Arduino Due microcontroller.
A Dynamic Identifier Virtualization (VID) mechanism is developed in [41] using random number sharing and substitution table methods to avert the analysis of CAN logs. Thus, generating valid messages by the adversary becomes more difficult. Thus, it reduces the possibility of spurious messages over the CAN bus. Implementing VID on real-time vehicles provides better results and identifies the adversary (attempting reverse engineering) through imposed time constraints.
Attackers should know the CAN message format to carry out suspicious activities in IVN, but this format is owned by Original Equipment Manufacturers (OEMs) and cannot be uniform even in different models of the same vehicle manufacture. Thereby, it is required to manually reverse-engineer the message format of each target vehicle, leading to inappropriate and time-taking procedures. A tool, LibreCAN [42] is developed that automatically translates most CAN messages with the least effort for reverse-engineering a complete CAN communication matrix for any vehicle. Libre-CAN is designed with a three-phase procedure in which the first and second phases use two algorithms (i) signal extraction and alignment and (ii) defining the cut-off point for keeping pertinent signals with a high correlation value. The third phase is executed for snippeting recorded CAN data while performing body-related events. The achieved results through the third phase are highly accurate, and the second phase outcomes relatively outperform. In [42], they also discussed recent steps taken to avert such attacks in IVNs.
An attacker manipulates the transmission time of messages, aiming to spoof CAN messages by adding delays and thereby averting attack detection while launching cloaking attacks on the CAN bus. To combat this new type of masquerade attack, the execution of a cloaking attack is analyzed, and it is then systematically modeled to understand its success probability on the State-Of-The-Art (SOTA) and Network Time Protocol (NTP) IDSs [43]. The evaluation of testbed setup and in an actual vehicle (i.e., UW EcoCAR) shows that the NTP-based IDS is comparatively effectual than the SOTA IDS in detecting masquerade attacks, and the cloaking attack is successful in NTP and SOTA IDSs. Experimental results on the collected data from UW EcoCAR verify that the average area deviation error (ADE) is 3.0% for SOTA IDS and 5.7% for NTP-based IDS.
The evaluation on an actual vehicle is performed in [44] for understanding the capability of the pearson correlation (due to popularity for data exploration) and unsupervised learning techniques, i.e., k-means clustering (as they do not need extended time for the implementation of attack detection mechanisms and may not rely on the context of the data.) as well as hidden Markov model (commonly used for better results). Vehicle's speed and Revolutions Per Minute (RPM) are mainly considered as reading parameters in [44] due to easy observation and safe injection of bogus speed/RPM reading messages on the CAN bus.
The possibility of physical and cyber attacks is highly increased in IVN due to not having security features in wireless connectivity enabled CAN. To tackle these problems, a mechanism is first designed to extract real-time model values by observing the behavior of CAN bus messages. A specification-based automotive IDS based on CAN timing, SAIDuCANT [45] is then developed using anomaly-based supervised learning techniques with the real-time model. Two new metrics, time to detection and false positives before the attack, are introduced to measure the performance of an IDS in terms of timeliness and classifier accuracy. Real-time vehicle implementation results of SAIDuCANT confirm the effective detection of data injection attacks with a low falsepositive rate.
Human interaction modules are installed in CAVs for different functions, e.g., vehicle voice control systems, but the Automatic Speech Recognition (ASR) module may not detect accurate/correct voice commands or may proceed further through forged voice inputs, thereby leading to unexpected consequences. It is a considerable challenge to protect ASR systems from adversarial voice inputs in a hostile driving environment for driverless vehicles [46]. To address this problem, a three steps-based secure in-vehicle ASR mechanism, SIEVE [46] is developed that effectually identifies voice inputs given by the driver, passengers, or electronic speakers. SIEVE first does filtering of voice commands to distinguish the case of receiving the same signal multiple times in a short period from various sources, and it is done through autocorrelation analysis to find out the overlap of signals. In the second step, SIEVE checks whether a singlesource voice input is from electronic speakers or humans based on a dual-domain identification technique through frequency domain-based acoustic characteristic, i.e., low-frequency energy attenuation. However, adversaries may attempt modulated voice inputs to disturb the ASR module. SIEVE uses time-domain parameters to detect non-human voice inputs effectively to detect modulated voice commands. The third step differentiates voice inputs whether given by the driver or the passengers, as it is required to prioritize the driver's voice command over the passengers for the smooth moving of a car. For this, SIEVE is developed by leveraging the directions of voice sources by calculating the time difference of arrivals on a pair of close-coupled microphones. Also, a spectrum-based detection technique is developed for better voice distinction between the driver and passengers.
Localization of spiteful nodes during the node replacement/installation process is a remarkable challenge in CANbased communication mechanisms, and the existing schemes are vulnerable to this issue [47]. New intrusion detection and localization system, TIDAL-CAN [47] is proposed by monitoring the propagation time of physical signals in which the time differences during signal propagation are calculated from the transmission point to the bus end. Furthermore, this variance is used as a location-based characteristic of the sender node to find malicious node installation/replacement and compromised nodes. The implementation results are mainly measured on the testbed setup by taking differential propagation delays into account, and they confirm that TIDAL-CAN can perform correct node classification without false positives even in attacks execution by compromised nodes. TIDAL-CAN can also identify transmitter nodes based on the attack method.
Conventional IDS methods are designed using time and frequency threshold values, and thereby they may result in higher false alert rates [49]. A wavelet-based IDS, WINDS [49] is designed through continuous wavelet transform to get the exact location of frequency components over the time axis, leveraging to first detect anomalies on the CAN bus. The analysis is then performed based on the scale domain to capture long-time and immediate short-time duration attacks. WINDS was evaluated on two datasets (generated through three commercial vehicles). The implementation results confirm that WINDS can reasonably achieve the attack detection rate even if an attack is immediately launched on the system.
Timing parameters of CAN frames can be used to create a secure channel that satisfies authentication, directly averting the requirement of cryptographic mechanisms in resourceconstrained IVN for data transmission. However, this way can achieve a limited security level; thus, an adversary can launch different attacks on the CAN bus. In [50], an improved protocol is proposed through optimization algorithms (binary symmetric, randomized, greedy, and greatest common divisor) to schedule CAN frames cyclically and establish a covert channel for CAN traffic. Moreover, the proposed protocol can achieve higher data rates relatively on the covert channel due to the optimization of CAN traffic, enabling a 24-bit security level with six frames. The effective results can be achieved based on the proposed algorithms, i.e., a minimum inter-frame distance of 500 s and an expected arrival time in the range of ± 5 s.
When a CAN identifier (ID) sequence is configured through the IDs of CAN signals based on their order of occurrence, it will have a definite pattern. However, it is hard to identify the change in the corresponding pattern with a minimal number of attack IDs in a CAN ID sequence. In such cases, conventional IDSs are not effective. In [51], an IDS is developed using two bidirectional Generative Pre-trained Transformer (GPT) networks that allow using past and future CAN IDs. To reduce the Negative Log-Likelihood (NLL) value of the bidirectional GPT network, the proposed mechanism was inculcated for a typical ID sequence that detects an intrusion when the NLL value for a CAN ID sequence is larger than a pre-specified threshold.
Determining spoofing messages is a significant challenge due to the lack of sender identification and authentication in CAN. Thus, a delay-time-based technique, Divider, is previously proposed to find the sender ECU over the CAN bus. However, it is an ineffective solution while having ECUs with similar variations due to coarse time-resolution in Divider's measurement clock, making it challenging to distin-guish ECUs. Moreover, another problem is the adaptability of a delay-time drift, caused by the temperature drift at the ambient buses [52]. To deal with these challenges, a sender identification mechanism, PLI-TDC [52] is developed using a super fine delay-time based Physical-Layer Identification (PLI) with Time-to-Digital Converter (TDC). PLI-TDC accurately identifies launched attacks on unmonitored and compromised ECUs. An accuracy rate of PLI-TDC is effective on a CAN bus prototype (of 99.67%) and in a real vehicle (of 97.04%), whereas a mean accuracy can be achieved around 99% in PLI-TDC.
While considering the number of transferred messages and the importance of on-time message delivery in IVN, CAN-FD is better to satisfy high bandwidth and low latency requirements. However, CAN-FD is susceptible to masquerade attacks due to the unavailability of authentication protocols and adequate defense measures. In [53], a dual-pointer solution, forward-backward exploration is proposed based on three methods, i.e., combination enumeration, forward exploration, and backward exploration for secure transfer of independent CAN-FD messages in IVN. In this solution, the Message Authentication Code (MAC) size of each message is dynamically balanced through dual-pointer movement rules until the total payload no longer increases, providing enhanced security by increasing the total MAC size of CAN messages, and the forward-backward exploration achieves better time efficiency by completing the exploration process. Thereby, this solution can be applied for trustworthy CAN-FD message transmission in IVN. Table 4 displays a comparison outline of state-of-the-art parameters monitoring-based ADPS based on different attributes, making it easier to understand the security severity in CAVs through parameters detail.

Information-Theoretic
Information theory is the mathematical treatment of the concepts, parameters, and rules governing the transmission of messages through communication systems. Entropy is a crucial measure in information theory, which relates to the measure of disorder and the uncertainty associated with a random variable. In computer networks, IDS has applied entropy to detect threats based on anomalous patterns in the network. Entropy-based anomaly detection algorithms characterize the expected behavior of a set of data based on their level of statistical entropy [54]. The two key underlying assumptions of entropy-based anomaly detection are that the entropy of messages generated by the information source exhibits stable statistical characteristics and the anomalies introduce significant deviations in the statistical characteristics of the entropy. Traffic in IVN is mainly cyclic, and the information entropy is low and stable [55], [56], making entropy-based anomaly detection suitable.
Since Information-Theoretic-based IDSs depend on the data information and flow, they are independent of CAN messages' content. Hence, it can be applied to any traffic, even proprietary messages. However, they are ineffective against attacks that target the content of CAN messages, i.e., masquerade attacks. The main limitation of Information-Theoretic-based IDSs that it is ineffective against low-volume attacks, in which the attackers inject only a few packets per second and avoid increasing the entropy of the system [55]. Entropy-based IDS is ineffective against CAN messages with high entropy even during normal operations. Due to CAVs' consistent driving style, the IVN traffic of CAVs should have lower randomness and higher entropy stability than that of human intervention vehicles. Disruptions to the IVN traffic's entropy should be more noticeable and significantly increase the system's entropy. We describe information-theoretic-Based solutions as follows.
To detect the feasibility of modification and replay attacks in CAN, an IDS solution in [57] is designed using Bloom filters (considering its efficient time memory tradeoff) that verifies frame periodicity through message identifiers and contents of the data field. Thus, it effectively detects modified frames by testing the frame's content. In contrast, duplicate frames are identified through an IDS even an attacker attempts to replay frames in the optimal time frame. This work mainly shows the possibility of using Bloom filters in developing CAN-based IDSs to achieve better results in detecting intrusions in the system.
The issues of random cable connectivity for a short duration and the Intermittent Connection (IC) fault are directly linked to the system performance. Therefore, the possibility of system-level failures and system performance degradation can be increased if these problems are not addressed effectively in CAN. Thus, it is essential to precisely detect and localize the IC fault for better health management of CANbased network systems. To address this problem, a systematic and practical IC fault diagnosis framework [58] is developed for CAN-based on the collected error event pairs from the data link layer. The scheme extracts the positive and negative information from these error event pairs to combine them for diagnosing the IC faults. The results of the proposed framework in [58] can be used as insights into the characteristics of IC faults for quick diagnosing during different circumstances that provide better system maintenance, improving the system reliability.
Considering only color/textural information of images is valuable for semantic reasoning. However, combining semantic information and depth information of images can substantially enhance scene parsing performance, especially in wrongly categorized based on only RGB features. Therefore, the Built-in Depth-Semantic Coupled Encoding (BD-SCE) [59] module is proposed by integrating Red Green Blue (RGB) and depth features that present important depth-discriminative features selectively. The BDSCE is congruent with existing CNN-based mechanisms and can offer better scene pars- ing results to address misclassification. The Depth-Semantic Coupled Encoding Network (CEncNet) framework is developed using the BDSCE module to extend the conventional deep scene parsing. The implementation results on the datasets, Cityscape [60] and KITTI Vision Benchmark Suite [61], confirm that CEncNet achieves better performance than the traditional mechanisms. The extensive experiments also show the effectuality of the BDSCE module for vehicle detection and road segmentation in city areas. Extensibility plays a significant factor in the automotive network, as it is developed based on the Electrical/Electronic (E/E) architectures. However, this optimization objective should be extensively considered in the design of IVN for the implementation of new functionality or modification in the existing functionality. To consider this problem in IVN, a new extensibility model [62] is developed for CAN using the Mixed-Integer Linear Programming (MILP) algorithm for mid-sized signal sets and the simulated annealing-based heuristic algorithm for industry-sized signal sets. Moreover, the corresponding extensibility metric for CAN-FD is designed. The results (extensive implementations through synthetic signal sets) show the effectiveness of the proposed approaches in [62].
A comparative description of state-of-the-art information theoretic-based ADPS is given in Table 5 that makes it easier to understand the importance and effectiveness of using information-theoretic approaches in CAVs.

Machine Learning
Machine Learning (ML)-based IDSs have been deployed extensively in network security due to their ability to detect unknown attacks via anomaly detection through Artificial Intelligence (AI). The learning process starts by analyzing provided data set to identify patterns, learn automatically using mathematical models, and extract useful information to make better predictions. Machine learning can be classified mainly into supervised and unsupervised machine learning. Unsupervised learning algorithms can understand and model the typical profiles of the network and report anomalies without any labeled data set [7]. On the other hand, supervised learning algorithms learn from labeled training data and predict future events based on the past.
Most machine learning-Based IVN IDSs can be classified into the machine learning techniques applied; traditional machine learning and deep learning. Traditional machine learning techniques, including Support Vector Machine (SVM), Decision Tree (DT), Random Forest (RF), and Multi-Layer Perceptron (MLP), can be applied to IVN IDSs for understanding the pattern of CAN network data to learn the expected behavior of the system [71]. Deep learning techniques use artificial or deep neural networks, algorithms inspired by the human brain. It works by repeatedly learning, understanding, and tweaking the model to achieve the best outcome, similar to how a human would conclude. A multilayered structure of algorithms is applied to identify patterns and classify different types of information. The individual layer of the neural networks acts as a filter that increases the likelihood of detecting and predicting a correct outcome [63].
The main advantage of ML-based IVN IDSs is their strength in detecting unknown attacks by reviewing large volumes of data and discovering trends and patterns that would not be apparent to humans. Furthermore, the model continuously improves accuracy and efficiency as more data is fed into the model. Deep learning also avoids the complex feature extraction step compared to traditional ML. The main disadvantage of ML-based IVN IDSs is the high computational requirement compared to the previous categories of IDSs [71]. In addition, a large data set is required to train the model and valuable data set is rare, especially those with attacks or abnormal traffic. The ensemble method is a technique that combines several base models in order to produce one optimal predictive model. It has been shown to achieve the desired accuracy and robustness [65] and to overcome the limitation of machine learning techniques.
Compared to a typical vehicle, CAV relies on multiple sensors, including cameras, radars, and LIDARs. These CAV sensors and ECUs produce large quantities of highly relevant data for analysis with machine learning techniques. It also helps to enhance the accuracy and performance of the existing training models. In addition, data could be collected remotely for CAVs, which increases the ease of data collection and the volume of available training data. Related machine learning-based solutions are discussed as follows.
The number of CAVs will increase in the near future, and it is vital to detect abnormalities and discern their sources to provide a seamless experience for driverless vehicles in realtime. Therefore, anomaly detection and identification tech-niques are developed by effectively integrating a Convolutional Neural Network (CNN) and Kalman Filtering (KF) to find CAV systems' abnormal activities. CNN is first applied to time-series data (acquired from various sensors), and images are then generated from real-time raw sensor data to classify them as abnormal. After that, a general framework is proposed using CNN and KF with a 2 -detector (named CNN-KF) to detect anomalies in CAVs. The experimental results of proposed approaches (only CNN, only KF, and CNN-KF) are evaluated based on accuracy, sensitivity, precision, and F1 score. CNN-KF framework collectively outperforms in these performance parameters for anomaly detection and identification [64].
For a compelling and comfortable journey, CAN is used in automotive systems (e.g., CAVs) to execute different functions without/less human interaction. However, such automated systems are vulnerable to known and unidentified security threats, so it is necessary to detect such incidents early to avert infrastructure damage and loss of human life on the road. A Dynamic Ensemble Selection System (DESS) [65] is developed for anomaly detection in which the system includes two-class and one-class classifiers to identify fault types (from the training data set) and unknown fault types. Moreover, the network features are extracted from the physicallayer information, and the base classifiers are then trained based on these network features. The implementation was carried out on the data set, and the analysis confirms that anomaly detection robustness and adequate accuracy can be achieved through DESS with better results than other methods, even in different fault types.
Different types of sensors in modern vehicles collect data from a vehicle and nearby objects to provide meaningful information to the vehicular communication system, enabling it to make better decisions while moving. However, this collected data from sensors are susceptible to different inconsistencies (caused by errors, cyberattacks, and/or faults), and thereby, the direct usage of sensor-generated data may lead to accidents on the road [66]. A Multi-Stage Attention scheme with a Long Short-Term Memory-based CNN (MSALSTM-CNN) [66] is developed to detect anomalies from sensor-generated data, helping to avoid fatal casualties by CAVs. In MSALSTM-CNN, multi-source sensor readings are first classified as either ordinary or abnormal data, and it then concentrates on different values of streaming readings to understand their importance. A weight-adjusted finetuned ensemble, WAVED, is also proposed through the optimal weight vector of classifiers to set a unique voting weight to anticipate each classifier and identify anomalous actions. The experimental results demonstrate that the MSALSTM-CNN can achieve a better anomaly detection rate in the case of single and mixed anomaly types. Thus, fatal casualties (caused due to anomalous data) can be reduced through MSALSTM-CNN.
A communication network in CAVs is vulnerable due to the unavailability of security features in CAN and connectivity with the outside network for meaningful data exchanges, resulting in different types of suspicious activities. To deal with such a situation, a deep learning-based IDS is designed in [67] to find out malicious network activities from IVN, V2V, and V2I networks of autonomous vehicles. A Long-Short Term Memory (LSTM) autoencoder algorithm is developed using deep learning architecture to detect intrusive incidents from the gateways of AVs. On the UNSW-NB15 dataset [68], the proposed IDS can achieve 98% accuracy in detecting different types of attacks, whereas 99% accuracy is achieved on the database of car hacking for in-vehicle communications.
IVN is susceptible to various network-based attacks due to the lack of security features in CAN and V2X connectivity with associated ECUs through the gateway ECU. Therefore, a CAN Bus message Attack Detection Framework (CAN-ADF) [69] is proposed to generate abnormality, detect anomalies, and validate the system performance for the CAN bus architecture. A rule-based method is designed from different network traffic characteristics and Recurrent Neural Networks (RNNs) for anomaly detection. A large number of CAN packets are collected from different vehicles to analyze the performance of CAN-ADF, showing an average accuracy of 99.45%. A visualization tool is designed to monitor the CAN bus traffic status, and it displays found attacks in the IVN system. CAN-ADF can be combined with other attack detection methods to identify a range of anomalies effectively.
The automotive system should have a trustworthy environment for reliable communications, as information plays a significant role in CAVs. In [70], a graph-based four-stage IDS is proposed to detect various attacks in CAN in which a graph-based technique first finds abnormal patterns in the dataset. After that, the median test and chi-squared methods are applied to differentiate the two data distributions. The experiments exhibit that the misclassification rate is comparatively low for the proposed IDS in [70], i.e., 4.76% for replay, 5.26% for DoS, and 10% for fuzzy attacks detection. All spoofing attacks can accurately be detected through the proposed method in [70], and it can achieve better accuracy up to 13.73%.
To deal with the problem of unavailability of sender information (in sent messages over the CAN bus), an IDS is developed by using various machine learning approaches, i.e., Support Vector Machine (SVM), Decision Tree (DT), Random Forest (RF), and Multi-Layer Perceptron (MLP) for CAN [71]. The proposed IDS is applied to the KIA Soul car dataset to detect intrusions and the type of attacks based on a set of classifiers. The implementation results state that the RF classifier can achieve better results than DT, SVM, Recurrent Neural Network (RNN), Hierarchical Temporal Memory (HTM), and Hidden Markov Model (HMM) classifiers in the same context. Moreover, the precision result of SVM, MLP, RF, and DT is superior to HMM and RNN, but it is moderately poor than HTM.
In [72], a Histogram-based Intrusion Detection and Filtering (HIDF) mechanism is developed by combining a windowbased IDS and filtering approach to identify intrusions based on windows and do the filtration of regular CAN packets Low Requirement of the prediction votes above 50% Ashraf et al. [67] 2020 Discover susceptible actions over IVN, V2V, and V2I networks; DoS, replay, and impersonation attacks; V2X and IVN connectivity;

Low
Require to improve an IDS for accurate attacks categorization; Tariq et al. [69] 2020 Detect CAN bus attacks; Replay, injection, and bus-off attacks; CAN bus; Low Able to detect specific attacks; Islam et al. [70] 2020 Detect attacks in CAN; Replay, impersonation, injection, and bus-off attacks;

CAN;
Low Possibility to reduce the misclassification of attacks; Moulahi et al. [71] 2021 Comparative study of machine learning approaches for attacks detection; Replay, injection, and impersonation attacks; CAN; -High computational resources and enough data; Derhab et al. [72] 2021 Find intrusions by assembling the CAN packets into windows to classify the traffic; Impersonation, replay, and injection attacks; CAN; Low More efficient and lightweight IDS; Liu et al. [73] 2021 Protect CAVs against perception error attacks;

Impersonation and injection attacks;
Sensors; Low Need to improve for optimization results; Han et al. [74] 2021 Detection and identification of anomalies through the periodic event-triggered interval; Modification, replay, injection, bus-off attacks; ECU, CAN bus; Low Required to design a method for better intrusion detection time; from an attack window. An intrusion detection model is first developed using histograms of CAN traffic to understand a distinctive structure for different CAN traffic classes. Furthermore, a one-class SVM attack model is developed using regular CAN traffic and implemented with four attack variants, i.e., Gear, RPM, Fuzzy, and DoS. The experimental results based on two datasets demonstrate that the HIDF can accurately classify through a window, and the filtering system is capable of filtering out standard packets from abnormal windows with more than 95% correctness. CAVs are enabled with multiple sensors to collect relevant data and use it as inputs in various vehicle driving decisions. Thus, it is vital to ensure the reliability of this sensory information for errorless execution of different operations in CAVs. A Perception Error Attack (PEA) can fail sensors to perceive the surrounding driving environment accurately, and thereby, captured data may be faulty, leading to unexpected consequences. To address this issue for AVs, a countermeasure approach is proposed, LIDAR and Image data Fusion for detecting perception Errors (LIFE) [73] that identifies PEAs by evaluating the data consistency between LIDAR and camera image through object matching and corresponding point techniques. Thus, LIFE can detect various sensory data anomalies, i.e., LIDAR spoofing, camera blinding, false positives/negatives during object identification, LIDAR/camera rotation error, and LIDAR saturation/distance measurement error. Since anomalies are detected through LIFE, they can be forwarded to the driving system to make appropriate decisions. The evaluation results on the KITTI dataset show that LIFE provides average performance. However, LIFE can be improved for better performance results, i.e., reduce the number of false alarm instances for high intrusion detection efficiency and minimize the requirement of additional settings in existing autonomous vehicles.
To protect against maleficent packet attacks in CAVs, it is required to find anomalies effectively; otherwise, the automated system may lead to unexpected situations, resulting in risky commute and infrastructure damages. Thus, an eventtriggered interval-based mechanism is proposed using machine learning to identify abnormalities and detect attacks in IVN [74]. Four attack scenarios are first defined based on CAN messages to understand normal and malicious driving data in the context of IVN. The event-triggered interval of CAN identities is then analyzed and measured in their statistical instants by considering the fixed time window. The results of the experiment over actual driving data demonstrate that the proposed method in [74] can quickly identify anomalies and achieve better performance in attack type identification, time, and anomaly detection. Table 6 shows an analogical study of state-of-the-art machine learning-based ADPS. It compares recent ADPS solutions to know their efficacy in various attributes.

Message Authentication
Message authentication is used widely in information security to ensure that data integrity and authenticity are preserved while in transit and allow the receiver to verify the source of messages. Common message authentication mechanisms include MACs, Authenticated Encryption (AE), and digital signatures. CAN does not have a built-in authentication process, making it vulnerable to masquerade attacks. However, the deployment of cryptographic methods is complex due to the CAN protocol's low throughput and limited bandwidth. Researchers have looked into several ways, including message authentication and covert channels, to meet the specific deployment criteria in IVNs.
The most important benefit of message authentication is the protection against masquerade attacks, as CAN is a broadcast protocol without authentication. However, most message authentication solutions require modifications of the CAN protocol or the introduction of additional information on the CAN frame. In addition, generating MACs and checksums increases the computational workload of the already resource-constrained ECUs. As compared to IDSs, message authentication is harder to deploy on existing vehicles as it requires either the manipulation of the CAN hardware or the addition of new hardware such as key server and Trusted Platform Module (TPM). We discuss relevant message authentication mechanisms as follows.
CAN control messages are crucial in IVN, but the sender information is unavailable in CAN messages, leading to denial of service, impersonation, and data alteration challenges. A security protocol is proposed in [16] to deal with such challenges using authentication and data encryption mechanisms. The proposed scheme is designed with a MAC (to remedy the fixed data payload size of CAN data frames) and key management approach to provide secure exchanges between in-vehicle ECUs and external devices. The experimental results based on a manufactured ECU demonstrate the possibility of an attack over wireless connectivity through a malicious smartphone app. Performance analysis shows that the proposed protocol in [16] takes less computational resources, but it is susceptible to encryption key compromising, authentication attacks, and session key leakage.
A compromised Compact Disk (CD) player can execute crucial operations, i.e., accelerate in CAVs. A LIghtwEight Authentication scheme for CAN, LEIA [75] is proposed to verify ECUs and protect them from compromised vehicle components. LEIA runs under the exact time and bandwidth constraints of automotive applications, and it is designed using unidirectional authentication in which a method of signaling technique is applied with the session key to check whether any of the subscribed ECUs follows the synchronization/authentication process or not. Security analysis of LEIA confirms the protection against chosen-plaintext attacks.
Present-day automobile systems are susceptible to various security threats, compromising vehicle travelers' physical safety. A new ECU architecture is proposed in [76] for automotive cyber-physical systems to satisfy security and performance attributes effectively. It is implemented on the Xilinx Automotive Spartan-6 field-programmable gate array and NXP iMX6Q SABRE automotive board. The results confirm lower computation time and response time in [76].
Sharing a secret key in CAN is a challenging task due to the broadcast nature of the CAN bus architecture. A protocol suite [77] is suggested for the secure exchange of keys over the CAN bus, and it is a combination of time-triggered mini-max and randomized delay key negotiation, which allows piggybacking frames with the keys' portions for secure computation of a session key. Moreover, CAN frames can be sent through the Diffie-Hellman (DH) version of the Encrypted Key Exchange (EKE) and Simple Password Exponential Key Exchange (SPEKE) protocols. The implementation was carried out on high-end controllers over Infineon Aurix cores (i.e., TC297 and TC277), and the outcome achieves reasonable results based on simple bus-based key negotiation and EKE/SPEKE-DH key sharing approaches. A keyless entry system is more convenient for CAV users, but it is susceptible to signal-relaying and network range attacks, making it difficult to distinguish an authorized door unlock request from a spiteful signal. An RF-fingerprinting technique, HOld the DOoR (HODOR) [78] is proposed to identify attacks in the keyless entry systems. HODOR is developed as a sub-authentication mechanism based on ultrahigh frequency band RF signals to implement on existing authentication processes (of keyless entry systems) without any modifications. The implementation results show that HODOR provides satisfactory results as the average false positive rate of 0.27% and the false-negative rate of 0% while considering the detection of simulated attacks. HODOR achieves the false-positive rate of 1.32% to detect legal key determination under the non-line-of-sight conditions.
CAN communications are unprotected in IVN, leading vehicles towards adversarial activities based on wired/wireless attacks. An efficient authentication protocol suite is proposed in [79] to provide a secure connection for transmitting remote frame requests and updating session keys between invehicle ECUs and external devices through entity authentication and key management using ECC. The proposed protocol in [79] achieves better security and performance results than [16], but it is vulnerable to encryption key compromising and authentication attacks.
Modern cars are configured with different ECUs, including safety-critical, and the possibility of remote access is demonstrated to perform malicious activities in the CAN, allowing an attacker to control a vehicle. The existing message authentication protocols for CAN are either vulnerable to masquerade attacks or require hardware modification to protect against such attacks. A new Mutual AUTHentication scheme, MAuth-CAN [80] is proposed using a unique session authentication key (computed through its seed value of an ECU) for each ECU to resist masquerade and bus-off attacks. The performance of MAuth-CAN was evaluated over embedded devices and using the CANoe software tool for simulation, and it is noticed that it relatively takes more computation time. However, it is required to reduce the computation time during the authentication process, as CAN is used in CAVs and other safety-critical applications.
A significant problem of session key agreement over AU-Tomotive Open System ARchitecture (AUTOSAR) compliance is not resolved effectively, even though various message authentication protocols are proposed for CAN communications. An AUTOSAR-compliant key management architecture is proposed in [81] by considering practical requirements for the automotive system. Further, a baseline Session Key Distribution protoCol (SKDC) is designed to provide various security functionalities, and a new Secret Sharing key Transfer (SSKT) protocol is proposed to achieve better communication efficiency results. The implementation of Arduino IDE and the CAN Bus Shield library confirms that SSKT provides better computation and communication results.
CAN FD is advantageous for data transmission in IVN because of its bit-rate capacity (of 8 Mbps) and payload size (of 64 bytes). However, it is vulnerable to masquerade attacks due to the unavailability of adequate authentication protocols. In [82], a two-stage scheme is proposed with two algorithms for security improvements for CAN FD communications. The first stage is performed to get the lower bound of an in-vehicle application by omitting most sequences through a quick sequence abandoning algorithm. Moreover, the laxity interval values are obtained from the lower bound to the deadline. In the second stage, the round accumulation algorithm is executed to improve the security by using MACs to CAN FD messages. The performance analysis results show that the proposed scheme is suitable for enhancing IVN communications security.
In CAVs, it is necessary to protect the TIS, ECUs, and OBD-II ports against message spoofing attacks due to their importance in IVN. A CAN bus authentication scheme is proposed in [83] that uses message physical layer features, i.e., message arrival intervals and signal voltages, applying a reinforcement learning approach to select the authentication mode and parameter. The proposed scheme achieves better authentication accuracy without modifying the CAN bus protocol's ECU parts. Moreover, a deep learning-based authentication scheme is proposed using a hierarchical structure and two deep neural networks, reducing the exploration time and compressing the high-dimensional state space with fully exploiting physical layer features. Thus, it provides superior authentication efficiency over the CAN bus, as it is verified through a test-bed setup with embedded devices.
Recent security experiments demonstrated the possibility of illegal access to car functionalities and vehicle theft, making modern vehicles vulnerable in different ways. To deal with these challenges, secure access and feature activation scheme is proposed in [84] based on TPM 2.0 (acting as a trust anchor in a vehicle), and thereby, it provides a fine-granular authorization mechanism. Moreover, this proposed system can protect against potential security attacks in automotive scenarios. The experimental results on Raspberry Pi show that it can achieve good performance results, but it could be improved for better performance efficiency to enable superior performance in automotive systems.
The secure exchange of cryptographic keys between ECUs is a significant challenge for secure IVN communications. In [85], authors evaluated the key exchange protocol based on a standardized National Institute of Standards and Technology (NIST) elliptic curve and Four curve of the Diffie-Hellman. The implementation results of these protocols over Infineon and ARM core processor platforms show effective performance for CAN and CAN FD. It is also noticed that the computation time is more crucial than bandwidth, as the execution time of the elliptic curve is relatively high.
Attackers can launch masquerade, suspension, and injection attacks on the CAN bus architecture due to the lack of appropriate built-in authentication and encryption mechanisms, resulting in life-damaging consequences. A Transmitter Authentication scheme in CAN (TACAN) is proposed in [86] to offer secure authentication between deployed ECUs over the CAN bus architecture through three different covert channels (inter-arrival time-based, least significant bit-based, and hybrid). Further, TACAN can be implemented without CAN protocol modifications and communication overheads. The extensive experimental results on Chevrolet Camaro 2016 and Toyota Camry 2010 datasets demonstrate that TACAN effectively detects CAN bus attacks and achieves better results when evaluating bit error and throughput performance parameters. Table 7 presents a comparative study of state-of-the-art message authentication-based ADPS. This table gives a better overview of relevant ADPS solutions to understand their efficacy in various features.

Other Approaches
Some other approaches are helpful in detecting various security attacks and providing protection against them. Anti Analysis: Attestation is the mechanism in which software verifies the authenticity and integrity of the hardware and software of a device. In today's CAVs, ECUs use flash memory that allows authorized entities to update or flash a new version of the firmware. Although firmware updates, especially common in CAVs, fix known bugs and security holes in the software, it increases the attack surface. Therefore, knowing when the system's integrity has been compromised is crucial, which can be achieved by using cryptographically secure techniques such as firmware attestation, MAC, and hash-value authentication. The firmware attestation scheme is a challenge and response type of protocol. Two main entities are involved in the attestation process, a challenger (the attester) and a respondent (the ECU being attested) [92].
The most important feature of anti-analysis-based ADPS is the integrity of the firmware, which allows each ECU to learn about the security stance of other ECUs in the vehicle. Furthermore, a decentralized attestation process is more robust and can independently attest to the state of the whole vehicle. However, anti-analysis-based IDS is ineffective against attacks on the program without affecting the state of the firmware. It includes attacks in the current memory program and on the trusted hardware, affecting the attestation process's trustability. Post Protection: Firmware Over-The-Air (FOTA) update is the process of distributing new firmware via the wireless medium (i.e., Wi-Fi and cellular network) to update the application that runs on top of the operating system. The updates usually come with software fixes, new features, and enhancements for the vehicles. This process updates the whole software stack and replaces the operating system and application. FOTA is especially critical for CAVs, as they are constantly connected to the external networks and need to be updated fast to deal with new threats and environments regularly. A secure firmware over-the-air update can prevent the firmware from compromising [10]. Fuzzing: Fuzzing is a security testing technique that attempts to find software bugs by injecting randomly generated valid and invalid inputs into a program. A fuzzer software is usually used to automatically create a set of test values. A nor- mal program would expect to receive structured inputs, and fuzzing stress tests the application to create unexpected behavior or crashes. CAN can expose unknown vulnerabilities in the ECU software while fuzzing is applied on CAN traffic [93]. Fuzzing on ECUs is more challenging due to car manufacturers' different proprietary CAN databases. The CAN database is specified in the Database Container (DBC) format file, a text file containing information for decoding raw CAN bus data to "physical values." While black-box methods such as brute-force and random search can work without the CAN database, they are inefficient due to the infinite number of possible inputs. Fuzzing detects loopholes in software reliably without false positives, increasing the robustness of car software. With the advent of CAVs, fuzzing will be more important as more software is deployed and the connected vehicles suffer similar security vulnerabilities to other computer-based network systems. In addition, fuzzing can help discover vehicle system functions that car manufacturers may not know [94]. Figure 5 displays potential adversarial activities (at the first level) that can be carried out to damage CAVs. Various attack detection and prevention categories are linked to specific malicious exploits that help to understand their effectiveness in identifying intrusions and prevent against them.
Different autonomous vehicle components are presented under each ADPS category to protect them from system damage. This graphical presentation gives a better understanding of the association among adversary interests, ADPS, and relevant vehicle components. This, in turn, helps researchers in developing security solutions. Researchers have developed various security solutions using different ADPS categories to improve the automotive system's strengths against vulnerable activities. However, technological development imposes advanced threats on the automotive systems, leading to new security and performance challenges.

Research Directions for CAVs
Modern vehicles are connected with external interfaces, several software modules, and many ECUs via OBD-II. That exposes CAVs to malicious activities with conventional and new security threats. The market for CAVs is rapidly increasing to provide more advanced transportation services and comfortable journeys. Hence, it has become essential to detect security vulnerabilities and faults in CAVs; otherwise, it can create chaos on the road, causing undesired consequences, human life risk, or infrastructure damage. Besides, there are other approaches (i.e., keyless entry system, telematics, DSRC/Bluetooth/LTE/Wi-Fi communication technolo-  gies, and Global Positioning System) through which adversaries can target the automotive system for susceptible activities in CAVs. The keyless entry system has received the highest attention from adversaries for malicious actions by performing signal relay attacks. We, therefore, discuss key research problems and open challenges for ADPS of CAVs.

Systematic Fuzz Testing Methodologies
Datasets with normal and attack scenarios are commonly used to identify security threats and validate novel attack detection techniques. However, limited research works are available on the collection and validation of the attacks data [7]. Such realistic datasets are valuable assets to the research community to continuously improve the resilience of security assessment solutions for CAVs and accurately measure the performance of attack detection strategies. Since the market of CAVs is increasing rapidly to enable society with advanced transportation services and applications, there is an immediate need to develop systematic fuzzing-based security testing techniques. Such fuzz testing methodologies may facilitate continuous testing for a variety of attacks to realize the resilience of CAV systems and evaluate the effectiveness of attack detection and prevention approaches in a real-time environment based on different performance measurement parameters, e.g., accuracy, timing, sensitivity, etc. Moreover, the progress in fuzzing methodologies has opened new avenues to discover unforeseen (zero-day) attacks on CAVs. Such is crucial to fine-tune the automotive security systems before deployment.
Fuzzing approaches can be classified into Blackbox, Greybox, and Whitebox. It is not feasible to use any form of Greybox fuzzing approaches [95], as such approaches require instrumenting the ECU code. Whitebox approaches, e.g., symbolic execution [96] is also not applicable for fuzzing commercial ECUs, as commercial ECUs are closed source. Existing Blackbox fuzzing approaches [97], [98] are unlikely to be effective, as such techniques (i) do not learn from previ-ous fuzzing campaigns, or (ii) are limited in terms of structured input generation, and these are important aspects for effective protocol fuzzing. Systematic Blackbox fuzzing, which will generate structured inputs according to the targeted protocol and learn from the fuzzing campaigns to automatically evolve the fuzzing process, is likely to be effective and practical for fuzzing components of CAVs. This can be accomplished by maximizing the explored protocol features to uncover new vulnerabilities.

Device-based Novel Attack Detection Mechanisms
CAV relies on a large number of multiple sensors, including cameras, radars, and LIDARs, enabling more accurate data results for worry-free journeys. However, these sensors enable adversaries for additional attack surfaces to launch sensor-based attacks (such as spoofing, eavesdropping, and jamming) on the vehicle's self-driving automated control system [27]. Such additional attack surfaces may lead to information leakage, false sensory data injection, DoS, and transmission of malicious commands in the IVN [99]. Since CAVs are highly mobile nodes and gather data from various sensors to perform different operations with limited resources, detecting malicious or faulty sensor nodes is challenging. Advanced attack detection systems that combine groundbreaking techniques (such as sensor fusion and machine learning with the abundance of information generated by CAVs) should be developed to detect sensor-based attacks effectively.

Compromised ECU Identification
Current security solutions can provide a specific level of security robustness over the CAN bus architecture to protect from forgery attacks (that are launched to disrupt the communication channel or automotive data). Available solutions are limited in scope (for data protection and communication channel) and can withstand specific security at-tacks only. Thus, it is difficult to identify susceptible activities when a compromised part (i.e., ECU) launches attacks on the CAN bus architecture. To find the source of attacks, protocols based on electrical signal characteristics of ECUs are proposed [8], [33], [34], [42], [46]. Such solutions may not realize whether the source is already compromised or not due to the change in IVN environmental circumstances. ECUs can be compromised in two ways: (i) exposed ECU is mounted, and (ii) ECU is compromised after the installation. Zero-trust-based multi-factor authentication protocols should be implemented by involving multiple entities during the deployment of ECUs to avert the first possibility of ECU compromising. For effective attack identification from compromised ECUs, lightweight security protocols should be developed to protect the system from compromised ECUs quickly.

Lightweight Security Protocols for IVN
CAN is not enabled with an in-built authentication and encryption mechanism to protect from forgery attacks over the CAN bus architecture. Therefore, researchers have focused on addressing the issue of forged communications by developing cryptographic-based security solutions. Hardwarebased cryptography methods can improve the security level to meet the real-time needs of CAVs. However, the high implementation cost, the compatibility with the existing infrastructure, and system modifications are important challenges in satisfying security requirements. Software-based cryptography methods can be applied and do not require changes in the CAN bus architecture. However, the computation and communication overhead on the payload increase the requirement of additional computing capabilities on resource-constrained automotive systems, leading to a time-consuming process [7], [8], [16], [79]. Researchers have developed various security schemes to provide security using different cryptographic primitives, but most of them require more computation cost and communication overhead. To reduce the network delay in ITS applications and services, it is required to upgrade the vehicular network with the latest communication technology. 6G-enabled vehicular networks can offer better network connectivity to minimize the communication latency, but the system consumes more energy in performing computing and communication operations [101], [102]. Therefore, the key challenge is to design lightweight security protocols for CAN-based communications with low latency. This is to perform necessary operations quickly with limited computing power and provide an adequate level of security to protect the automated system from various security attacks.

Malware Code Resilient CAVs
CAVs are configured with IoT and embedded devices to execute in-vehicle and outside network operations to make better decisions. These devices are very limited in security features to avert various threats [103], and thereby they are the major targets of adversaries to launch traditional and new security attacks through malware codes [104]. Since ECUs are connected to external sources through a gateway, realtime malware scanning can be applied at the gateway. However, the need for excessive computing power is raised for a gateway, which might not detect all malware codes with its limited on-board resources. Furthermore, it is tough to identify malware amongst the high number of associated ECUs in CAVs [105], [106]. Thus, it opens an opportunity for adversaries to send malicious payloads (through SQL injection vulnerability) to perform susceptible activities over the IVN, leading the automotive system to unanticipated situations and severe consequences. Hence, it is adequate to design the automotive system with malware code detection and protection to reduce the impact of security exposures and vulnerabilities.

Control-Oriented Techniques for 6G-enabled Infrastructure
CAVs communicate and transfer high-cost computations to the infrastructure through V2X communication technology for rich data inputs and minimizing the requirement of computational resources at the CAV level, thus improving the effectiveness of CAVs with more accurate operations. Integrating 6G communication technology with the vehicular network for high throughput, better decision-making abilities, and reduced latency is necessary to exchange various computations productively and their outcomes between the infrastructure and vehicles [102]. Vehicular infrastructure is susceptible to cyber threats, including malware, weak access control, and limited security features over the firmware process [107]. Blockchain, molecular/Terahertz/quantum/Visible light communications, and AI technologies are important in 6G communications. However, they are vulnerable to malicious behavior, access control/authentication/integrity attacks, eavesdropping, and data transmission exposure, creating security and privacy issues [108]. Thus, an adversary can launch replay, bogus message, modification, blackhole, and wormhole attacks in the IVN. Thus, automated driving system operations are significantly impacted, disrupting the overall performance of a platoon of CAVs. To improve the safety and security of autonomous driving systems, advanced and robust vehicular control frameworks should be developed to withstand traditional and new cyberattacks [7]. Current research has mainly focused on the prevention and defense techniques for CAVs, but it is also required to emphasize control and recovery strategies that can support damaged infrastructure (i.e., RSUs and cloud servers) to recover from unexpected incidents effectively and security vulnerabilities [109]. CAVs automatically execute various vehicle operations (considering the available information (from invehicle components) or obtained data from the infrastructure) without (or minor) human intervention while on the move. It is thereby necessary to quickly restore the system from damaged conditions and perform different operations by following legal system procedures. Control-oriented techniques manage the automated control and recovery from attacks that can reduce the damage level in CAVs. Hence, the research area of control-oriented techniques should be explored to create effective resilient and recovery strategies that can mitigate such network attacks in the IVN.

Recognition of Adversarial AI Attacks
Researchers suggested various machine learning-based models to detect security attacks in CAVs, and these models mainly work based on the collected data through installed devices. However, there are demonstrations that if pixel values of an input image are altered, then the model can produce erroneous results, and the understanding of images is successful under certain conditions only [110], [111]. Besides, various mechanisms are trained to understand "patches", and they can be imposed on an object to mislead detectors and classifiers [112], [113], [114], [115]. In such cases, the trained model cannot detect objects even though they are available on the way to CAVs, or they can come closer to CAVs [116]. Thus, an attacker may cause significant damage by launching adversarial attacks on reinforcement learning mechanisms. Therefore, it is essential to develop reliable machine learningbased attack detection systems for CAVs.

Trustworthy Fog-enabled Vehicular Networks
Autonomous vehicles produce around 20 GB of data per hour, and they are required to collect, analyze, process, and aggregate the gathered data before using relevant information in vehicular applications and services that may delay emergency and navigation services [117]. The concept of vehicular fog computing was introduced to reduce the computational overhead at resource-constrained devices (i.e., vehicles) by executing high-cost operations at fog devices (i.e., edge servers and/or RSUs). In this, vehicles collect relevant data from sensors (installed in a vehicle) and transfer gathered data to the fog devices for data analysis (to provide better ITS services to vehicle travelers). Fog devices can then deliver such information to CAVs, which can be used to make timely, on-road decisions [118], [119]. Though fog-enabled vehicular frameworks minimize the computational resource requirements at CAVs, there are still significant security and privacy challenges: trustworthiness of delivered data (from vehicles to fog devices), secure data transfer, off-loading of tasks, and on-time information availability (to CAVs) in highly mobile environments [120], [121], [122]. Connected vehicle technology is focused to enable CAVs safer, faster, and more efficient, but the availability of erroneous information to CAVs may lead to accidental consequences [123], [124], [125]. Therefore, developing reliable and efficient attack detection and prevention mechanisms for fog-based vehicular networks is vital.

Dependable Digital Twin-based Automated Driving Systems
Digital Twin (DT) is one of the most cutting-edge technologies of Industry 4.0 that is developed as a virtual representation of physical entities with simulation proficiency to predict and optimize states, functionality, and configurations. DT synchronizes the mapping with the physical object that is useful in real-time monitoring, object management, data analytics, maintenance strategies, and risk estimation [126]. Therefore, the integration of DT with CAVs is worthwhile to identify potential issues in automotive driving systems, get real-time feedback on automated operations, control vehicles in uncertain situations, and realize performance improvements [127], [128], which is beneficial in the development of accurate attacks detection and prevention systems for CAVs. As DT modeling depends on the data (received from the synchronized physical object over V2X connectivity), it is important to securely and efficiently deliver data between digital and physical spaces [129]. However, providing security over V2X technology is challenging due to the shared communication link [104]. Besides, the communication delay is a vital factor for DT-enabled CAVs as the unavailability of necessary data on-time can put CAVs in unexpected situations, creating user and road safety issues [130]. It is essential to develop dependable DT-based mechanisms for CAVs for effective services on the road. Figure 6 shows a graphical presentation of important security and privacy research directions in connected and automated driving systems. As these research gaps are crucial in the development of reliable CAVs for the benefit of society, it is required to focus on these challenges to enable vehicle travelers with safe, secure, and intelligent vehicles in the near future. Figure 6 also displays that developing adequate solutions for these research problems can offer various features to improve the states, operations, and functionality of CAVs.

Conclusions
This survey article gives an overview of CAVs in different aspects. Considering the significance, important applications, and mobility nature of CAVs, we have discussed vital security and privacy properties as well as performance evaluation parameters to understand their importance in CAVs. Moreover, a variety of attacks are briefly explained, and their possible countermeasures are discussed. Such potential attacks significantly impact the automotive system of CAVs and can produce unexpected consequences. We have extensively reviewed different categories of ADPS and have systematically studied recent IVN solutions to classify them under the category of attack detection and protection. To quickly provide in-depth knowledge about the current research status on ADPS approaches, we present a comparative summary of relevant methods under each category by providing their key contributions, features, and scope for enhancement. We hope this survey will provide a strong base to study recent ADPS solutions and research directions for new and more appropriate techniques to achieve better security and performance efficiency.