Abstract
Security and privacy are the major parameters needed to work upon in a variety of applications. The most widely used infrastructure known as cyber-physical system (CPS) is used for solving different types of challenges. In today's world of growing technology, decision-making should be very much fast. The Internet of Things or CPS brings changes into many industrial or manufacturing fields, thus taking many applications to the extreme level. But there exists the most important security issue in the network system where lots of personal or sensitive information resides and is at stake. To solve security and privacy matters different machine learning and deep learning approaches are being used. Our paper consists of various CPS layers along with the possible attacks on each layer and also the steps to detect attacks in CPS. Various machine learning (ML) and deep learning (DL) models are being discussed in the following paper to detect the attacks using datasets along with the accuracies.