## 1 Introduction  
Vehicular networks that form on-the-spot VANETs play a crucial role in the development and applications of self-driving and moderately automotive cars [1]. In autonomous as well as semi-autonomous vehicles, both internal communication systems and external communication systems are critical components. As can be seen in Figure 1, VANETs in radio coverage areas represent exchange of messages among cars (V2R) and roadside units (RSUs) or in-vehicle (V2V). External communication in intelligent transport system (ITS) between self-driving cars and highway infrastructure depends largely on the wireless transmission standard IEEE 802.11p [2]. The communication uses Cooperative Awareness Messages (CAMs) or basic safety, which are exchanged between RSUs and automobiles or between vehicles in the region [3]. The major purpose of ITS communication is to ensure the safety of drivers and passengers on the road. Because previous networks lacked a set safety infrastructure, such as cables network, VANETs [4] are movable nodes that enable communication with the RSU and in a certain zone [5]. Many researchers view VANETs as a Mobile ad hoc Network Subclass or Subtype (MANETs) [3]. They immediately influence the ITS by providing drivers and passengers with comfort and safety applications. The main objective of VANETs is to maintain the protection of both road operators and automobiles. As mentioned above, such systems could reach their targets as well as provide assistance and relief reports to drivers as well as passengers, including emergency alarms, warnings or accident alerts, by transmitting warning and control data [5, 6, 7, 8]. In vehicular ad hoc networks, there are three types of routing techniques used: (1) the pre-emptive, (2) reactive, and (3) the hybrid [7]. The routing protocol employed by demand vectors is an important routing protocol that is frequently used in outside messages for self-driving automobiles. The protocol known as ad hoc On-Demand Distance Vector (AODV) was chosen because of its higher performance and lower latency [7]. The use of sequence numbers empowers AODV to run further, effectively in contrast to other routing protocols. In autonomous and semi-autonomous cars, message and car authentication in supportive vehicle ad hoc systems is essential to provide security, as well as notification messages and threatening notices along with control information. Traditional safety mechanisms such as encryption/decoding methods can prevent external assaults from reaching their objective of stealing vital data and information monitoring among roadside units and autonomous vehicles. These cars, still, are incapable of protecting external communication from internal threats. Moreover, each VANET layer is subject to attacks [8; 9], making its protection one of the biggest challenges [9]. The focus of this article is denial of service, Black Hole, Gray Hole, and rush attacks [10]. The Gray Hole and rush occurrences can halt collaboration and cause cars to be disconnected from the roadside [10]. The development of an appropriate security system is essential for network layer routing protocols. Perhaps, malevolent nodes displace or discard packets instead of delivering packets to the right target node. Most packets received are discarded and are not forwarded to their target node for such assaults. Other difficulties may occur with such an assault, such as overhead rise and the packet delivery rate (PDR) for network decrease [10]. Attack detection is challenging since data packets are dropped selectively [11]. A network with a Gray Hole attack transmits packets as a 'true' behavior to the target node during the process discovery phase, and then when the network acts badly, they are discarded [9; 10; 11; 12; 13]. Denial of Service (DoS) and Black Hole attacks are the most virulent types of cyber-attacks available. In VANETs, this kind of assault is known as a full packet drop attack.