## 2 Literature Review  
The connected vehicles are susceptible to different types of attacks in the vehicular environment. An effective mechanism is needed to detect and prevent these attacks to ensure the safety of the individuals. The work that has been carried out in this regard is discussed in this section. Table 1 lists some of the network attacks and the detection algorithms used for the respective attacks. [PERSON] et al. [10] worked on the detection of network anomalies, e.g., DDoS, by implementing their proposed scheme on the link layer. They also worked on the deployment of an SDN controller for reconfiguring the network when an attack is being carried out or in the case of an incident, conveying the information to a cloud infrastructure. It has been seen that connected vehicles are vulnerable to many attacks when it comes to a realistic vehicular environment by exploiting messages that are injected into the controller area network (CAN) bus. In [11], [PERSON] et al. proposed a mechanism that could detect whether the vehicle is under attack or not by using the revolutions per minute (RPM) and speed reading. They used the k-means clustering method and HMM to characterize the  
Figure 1: RSU detecting an attacker and forwarding information to other connected RSUs and vehicles. vehicles as either under attack or no attack. They had acceptable detection and accuracy rate but also a high false-positive rate. In today's era, 5G helps in improving the data transmission between vehicles in a connected environment, but with the increase in the exchange of information, there is also a rise in the attacks on the network. [PERSON] et al. [12] explored the conceivable attacks that could be initiated in a vehicular network regarding 5G and came up with intrusion detection mechanisms to counter such attacks by comparative study. [PERSON] et al. [13] used an algorithm that detects anomalies in BSMs by monitoring the inconsistencies in position and speed with which the vehicles generate packets. The detection algorithm runs at RSUs. The investigation of in-vehicle communication is a gap that needs to be filled with extensive research, and researchers are improving daily to detect and prevent the network attacks that are carried out in the connected vehicles. [PERSON] et al. [14] proposed a mechanism for intrusion detection whose main goal is to recognize the hostile messages that are targeted at the CAN bus. The proposed algorithm was developed and administered with low-end electronic control units (ECUs). Connected vehicles play a vital role in the uprising of the intelligent transportation system, and the connectivity is increasing on a daily basis. Such connectivity does not require elaborate attacks to disturb the flow of the traffic, just some misleading data would be enough for the job. [PERSON] et al. [25] proposed traffic flow theory to improve the detection of anomalous data which can lead to attacks in the vehicular environment. Their results displayed uniform and reliable foresight, while in [PERSON] et al. [24], the 5G-enabled wireless RSUs employ the proof-of-location technique, which in turn utilizes the node-positioning capabilities of the RSUs. The safety of the vehicles in a connected environment is ensured by the continuous exchange of information between the vehicles themselves and the RSUs. Thus, the exchange of information needs to be clear and free of misleading data. A filtering scheme is required to block out fake and misleading information to ensure the safety of individuals in the vehicular network. [PERSON] et al. [26] proposed a filtering scheme (EDFS) that is established \begin{table}
\begin{tabular}{c} OMNeT++, SUMO, \\ VEINS \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of different attacks and proposed algorithms in connected vehicles. on detection and clustering-based algorithm to detect counterfeit information which relies on the characteristics of the data and context without the help of RSUs.