Recent advancements in the Vehicular Ad-hoc Network (VANET) have tremendously addressed road-related challenges. Specifically, Named Data Networking (NDN) in VANET has emerged as a vital technology due to its outstanding features. However, the NDN communication framework fails to address two important issues. The current NDN employs a pull-based content retrieval network, which is inefficient in disseminating crucial content in Vehicular Named Data Networking (VNDN). Additionally, VNDN is vulnerable to illusion attackers due to the administrative-less network of autonomous vehicles. Although various solutions have been proposed for detecting vehicles' behavior, they inadequately addressed the challenges specific to VNDN. To deal with these two issues, we propose a novel push-based crucial content dissemination scheme that extends the scope of VNDN from pullbased content retrieval to a push-based content forwarding mechanism. In addition, we exploit Machine Learning (ML) techniques within VNDN to detect the behavior of vehicles and classify them as attackers or legitimate. We trained and tested our system on the publicly accessible dataset Vehicular Reference Misbehavior (VeReMi). We employed five ML classification algorithms and constructed the best model for illusion attack detection. Our results indicate that Random Forest (RF) achieved excellent accuracy in detecting all illusion attack types in VeReMi, with an accuracy rate of 100% for type 1 and type 2, 96% for type 4 and type 16, and 95% for type 8. Thus, RF can effectively evaluate the behavior of vehicles and identify attacker vehicles with high accuracy. The ultimate goal of our research is to improve content exchange and secure VNDN from attackers. Thus, our ML-based attack detection and prevention mechanism ensures trustworthy content dissemination and prevents attacker vehicles from sharing misleading information in VNDN.