Cyber physical systems which integrate physical system dynamics with digital cyber infrastructure are envisioned to transform our core infrastructural frameworks, such as the smart electricity grid, transportation networks, and advanced manufacturing. This integration, however, exposes the physical system functioning to the security vulnerabilities of cyber communication. Both scientific studies and real-world examples have demonstrated the impact of data injection attacks on complex systems, including the Internet, the smart electricity grid, and air traffic systems. In this paper, an abstract theoretical framework is proposed to study data injection/modification attacks on Markov modeled dynamical systems from the perspective of an adversary. Typical data injection attacks focus on one shot attacks by adversary and the non-detectability of such attacks under static assumptions. In this paper, we study dynamic data injection attacks where the adversary is capable of modifying a temporal sequence of data and the physical controller is equipped with prior statistical knowledge about the data arrival process to detect the presence of an adversary. The goal of the adversary is to modify the arrivals to minimize a utility function of the controller while minimizing the detectability of his presence as measured by the K–L divergence between the prior and posterior distribution of the arriving data. The tradeoff between these two metrics—controller utility and the detectability cost—is studied analytically for different underlying dynamics. The proposed framework is then applied to a practical problem in data networks where a router tries to hide the path of traffic flow from timing analysis by an active adversary who can modify the timing of an incoming packet stream. This problem is studied from the adversary perspective wherein the goal is to balance two costs—the adversary’s detectability cost measured by the K–L divergence and the network privacy cost measured by the maximum length of the packet stream whose paths can be hidden by a memory limited router.