Recently, the integration of electric vehicles (EVs) and their associated electric vehicle supply equipment (EVSE) has increased significantly in smart grids. Due to the cyber vulnerabilities of this EV ecosystem, such integration makes the entire grid prone to cyberattacks, which can result in the outage of generators or even blackouts. On this basis, this paper leverages a data-enabled predictive attack model (DeeP-AM) to design an EV-based dynamic load-altering attack (EV-DLAA) that targets the frequency stability of the grid. Subsequently, a robust localization framework for the developed EV-DLAAs is proposed using power system measurements obtained from phasor measurement units (PMUs). First, frequency measurements in the transmission grid are used to develop an optimal EV-DLAA without having perfect knowledge of the grid's topology. Such an optimal attack model ensures that the targeted frequency deviation is reached by utilizing the least number of EVs and a minimized time of instability (ToI). Then, a PMU-based real-time localization framework is developed based on the sparse identification of nonlinear dynamics (SINDy) method, which simultaneously estimates the magnitude and location of EV-DLAAs. The equations obtained from the SINDy method are effectively solved using a modified basis pursuit de-noising (MBPDN) approach. This approach enhances the accuracy and robustness of the localization framework, particularly when confronted with noise. The attack implications and the localization performance are evaluated using the New England 39-bus and Australian power systems.