A Cyber-Physical System (CPS) refers to a physical system that integrates control, computational and communication capabilities. Indeed, CPSs find applications in various domains, including autonomous vehicles, water distribution systems and the Internet of Things (IoT). While CPSs offer potential for enhancing traditional engineering systems, security concerns regarding cyberattacks have become prominent. A key objective for potential attackers is to remain stealthy. In this dissertation, we focus on the development of detection methods to detect intelligent and malicious adversaries in CPS. The detection methods entail intelligently designing and altering the system’s architecture to hinder adversaries from executing stealthy attacks. First, a novel architecture aimed at detecting replay cyberattacks is introduced. This solution is implemented by integrating a virtual auxiliary system and detection filters into the automated control system. The incorporated filters effectively isolate replay cyberattacks from other forms of adversaries. Furthermore, our solution demonstrates proficiency in maintaining the closed-loop performance of the system. Second, a novel method for detecting Pole Dynamic Attack (PDA), is proposed. The adverse effects of PDA attacks on a CPS are analyzed. To tackle this issue, the physical system is enhanced by adding an auxiliary system on the plant side and its duplicate, along with incorporating detection filters into the command and control Center. Furthermore, our novel defense mechanism exhibits robustness in detecting PDA attacks across diverse levels of attacker knowledge and capabilities. In conclusion, the exploration of enhancing the security of CPS by intelligently adjusting the system’s architecture to hinder an adversary’s ability to carry out stealthy attacks is presented in this thesis.