Automatic identification of integrity attacks in cyber-physical systems