###### Abstract  
A cyber-physical system (CPS) integrates various interconnected physical processes, computing resources, and networking units, as well as monitors the process and applications of the computing systems. Interconnection of the physical and cyber world initiates threatening security challenges, especially with the increasing complexity of communication networks. Despite efforts to combat these challenges, it is difficult to detect and analyze cyber-physical attacks in a complex CPS. Machine learning-based models have been adopted by researchers to analyze cyber-physical security systems. This paper discusses the security threats, vulnerabilities, challenges, and attacks of CPS. Initially, the CPS architecture is presented as a layered approach including the physical layer, network layer, and application layer in terms of functionality. Then, different cyber-physical attacks regarding each layer are elaborated, in addition to challenges and key issues associated with each layer. Afterward, deep learning models are analyzed for malicious URLs and intrusion detection in cyber-physical systems. A multilayer perceptron architecture is utilized for experiments using the malicious URL detection dataset and KDD Cup99 dataset, and its performance is compared with existing works. Lastly, we provide a roadmap of future research directions for cyber-physical security to investigate attacks concerning their source, complexity, and impact. cyber-physical security; network security; deep learning; Internet of Things +
Footnote †: journal:  
by adopting CPS which helps in managing complex and mega industrial systems [3]. Interconnected components of CPS have the ability to sense the surroundings and process the IoT-based objects remotely. It has the resilience to change the processes in runtime with real-time computing [4]. Moreover, CPS is embedded in various systems and is being utilized in diverse fields like communication, transport, health care, military, and various autonomous systems, as shown in Figure 1.  
CPS-based train control systems exchange control signals between the ground stations and trains wirelessly in real-time and provide more safety than traditional systems against accidents [5]. An increase of connectivity in the complex networks also gives rise to the invading paths of the attackers in CPS [6]. Controlling networks and software are vulnerable to attackers that try to infiltrate and malfunction CPS-based systems [7]. When a network is accessed by an attacker, it disturbs the execution of control software in the cyber system and gets hold of the physical system to cause power failure or other manipulation on the attacker's detection system [8]. These attacks on cyber and physical systems can cause substantial economic loss by launching havoc on industrial processes and equipment. For example, in 2014, blast furnaces were damaged in a German steel mill by a cyber-attack and in 2015 a huge outage of power was caused by malware in Ukraine due to the malfunctioning of the plant [7]. Therefore, the security of the cyber-physical system against adversarial attacks is an emerging research area. In CPS security, physical processes are considered an addition and come up as an extended form of cybersecurity. For instance, cracking a password due to personal information leakage is a main security issue of cybersecurity. However, in CPS security, there is no adverse effect of such information leakage on the system. However, if unauthorized access affects the system process, it may damage the physical dynamics of the system. Therefore, researchers emphasize controlling the physical dynamic of the CPS. Various factors that affect CPS are unpredicted events and quick environmental changes. In addition, one of the major problems with CPS security is the false alarms on the detection of cyber-physical attacks. Due to the exceedingly large CPS and complexity among its components, accuracy degrades in real CPS [9].