Smart transportation, powered by IoT, transforms mobility with interconnected sensors and devices collecting real-time data on traffic, vehicle locations, and passenger needs. This fosters a safer and more sustainable transportation ecosystem, optimizing traffic flow and enhancing public transit efficiency. However, security and privacy challenges emerge in smart transportation systems. Our proposed solution involves a deep neural network (DNN) model trained on extensive datasets from sustainable cities, incorporating historical information like traffic patterns and sensor readings. This model identifies potential malicious nodes, achieving a 90% accuracy rate in predicting threats such as Denial of Service 88%, Whitewash attacks 80%, and Brute Force attacks 75%. This high precision ensures the security and privacy of passenger vehicle data and routes.