# FSCB-IDS: Feature Selection and Minority Class Balancing for Attacks Detection in VANETs
## 1 Introduction  
VANET is a subclass of MANET that enables wireless communication among vehicles and infrastructure devices to improve traffic safety and efficiency [1, 2]. VANET comprisestwo types of nodes: on-board units (OBUs) that are installed in vehicles; and roadside units (RSUs) that are deployed along the roads. The vehicular communication module (VCM) is responsible for routing the traffic data from other VANET nodes to the vehicle devices, facilitating effective vehicle monitoring and management [3].  
Even though VANET has achieved significant improvements in its domain, the security challenge still remains the biggest challenge. This problem is a direct threat to the quality of human life and constitutes one of the major difficulties faced by VANETs. Various types of attacks may impact VANETs as the vehicles are linked over a wireless medium. There are many dangers, such as flooding, SQL injection, DoS, DDOS, Sybil, and Jamming attack [4; 5], which injects undesired traffic to a network and blocks the legitimate users from accessing the resources. Furthermore, malicious software is a kind of code that takes control by exploiting vulnerabilities in the network system [6]. Consequently, the security of vehicles against intrusion became an important point, since traditional models of vehicles do not include this aspect of safety. Since VANETs provide different forms of communication, as V2V and V2I are linked to the Internet, they are vulnerable to different types of attacks, which not only degrade the quality of traffic but also threaten human lives. Consequently, the use of classical security mechanisms, such as encryption techniques or access control, are not relevant to modern vehicles. Reactive systems, in particular intrusion detection systems (IDSs), have been the subject of much attention these days, as they are able to detect any possibility of cyberattacks on VANETs in order to improve their usability.  
The objective of the present work is to develop and implement an intrusion detection model for VANETs. To realize this model, we will use the RF classifier and several techniques to improve the quality of the dataset usage and to have better results. Mainly, the mutual information is used for the selection of the group of best features to build an efficient model, the Synthetic Minority Over-sampling Technique (SMOTE) which is an oversampling technique that helps to overcome the overfitting problem due to the random oversampling. This technique is used in our case to deal with the imbalance problem between the classes and the one-hot encoding technique to convert the categorical information into numerical data. We evaluated and compared the results obtained with the following ML techniques: DT, KNN, LR, and SVM. The model was evaluated and compared using three datasets--NSL-KDD, TON-IOT, and CICID2017--in order to validate the accuracy and the efficiency of our system. These results confirm the performance and accuracy of the proposed model.  
The rest of the paper is structured as follows: Section 2 presents the background and related work of VANETs architecture, services, network security, and intrusion detection methods. It also covers the relevant literature related to intrusion detection based on machine learning, deep learning, and ensemble learning techniques. Section 3 details the design of the proposed model. A discussion of the results and evaluation study of the system is presented in Section 4. The conclusion and future work are presented in Section 5.