Cooperative Intelligent Transport Systems (C-ITS) is an advanced technology for road safety and traffic efficiency over Vehicular Ad Hoc Networks (VANETs) allowing vehicles to communicate with other vehicles or infrastructures. The security of VANETs is one of the main concerns in C-ITS because there may be some attacks in such type of network that may endanger the safety of the passengers. Intrusion Detection Systems (IDS) play an important role to protect the vehicular network by detecting misbehaving vehicles. In general, the works in the literature use the same well-known features in a centralized IDS. In this paper, we propose a Machine Learning (ML) mechanism that takes advantage of three new features, which are mainly related to the sender position, allowing to enhance the performances of IDS for position falsification attacks. Besides, it presents a comparison of two different ML methods for classification, i.e. k-Nearest Neighbor (kNN) and Random Forest (RF) that are used to detect malicious vehicles using these features. Finally, Ensemble Learning (EL) which combines different ML methods, in our case kNN and RF, is also carried out to improve the detection performance. An IDS is constructed allowing vehicles to detect misbehavior in a distributed way, while the detection mechanism is trained centrally. The results demonstrate that the proposed mechanism gives better results, in terms of classification performance indicators and computational time, than the best previous approaches on average.INDEX TERMS misbehavior detection, machine learning, vehicular ad hoc network, intelligent transport systems, dataset.