In Cyber-Physical Systems (CPSs), physical processes, computational resources and communication capabilities are tightly interconnected. Traditionally, the physical components of a CPS are described by means of differential or difference equations, while the cyber components are modeled by means of discrete dynamics. Therefore, hybrid systems, that are heterogeneous dynamical systems characterized by the interaction of continuous and discrete dynamics, are a powerful modeling framework to deal with CPSs. Motivated by the great importance of security issues for CPSs, we characterize the observability and diagnosability properties for hybrid systems in the general case where the available information may be corrupted by an external attacker. Then, as CPSs are found in a wide range of applications, we demonstrate how to estimate the continuous state by simulating two scenarios: the control of a Direct Current (DC) Microgrid, and the control of a network of Unmanned Aerial Vehicles (UAVs) cooperatively transporting a payload.