Every day the innovative IoT technology is expanding further and further in our environment, with applications deployed in various contexts including cities. Communities can indeed address problems linked to urbanization thanks to this technology through the Smart City concept and thus support a sustainable development of their cities. Artificial intelligence and namely its machine learning branch is expected to reinforce this trend by making smart cities even smarter. However, smart cities can only be successful if they can be trusted and, with this in mind, machine learning can potentially be an efficient tool to mitigate cyberattacks. This paper can be divided into two main parts. In the first part the ability of Gradient Boosting and Deep Learning to make long-term predictions of noise level is studied based on noise data collected in the suburb of an English city. In the second part, we proposed an approach for detecting noise levels anomalies based on predictions. Two types of injections were taken into consideration namely punctual noise level attacks and gradual noise level attacks. Specifically, for the punctual attacks, when the difference between the actual sensed and predicted noise levels is greater than a given threshold, we considered that there is an anomaly in the data. For the gradual attacks, we used a criterion comparing the mean absolute error of predictions in the attacked set of data to statistics of the absolute error in the training set. The obtained results show that our approach, which uses a Convolutional Neural Network-Long Short-Term Memory (CNN-LSTM) hybrid network for the noise level prediction, can effectively be used to detect the aforementioned types of anomalies. In the case of punctual attacks an increase in sound intensity of 5 dB was detected, while for gradual attacks, smaller changes can be detected.