Zero-dynamics attack (ZDA) is a model based cyber attack. It is stealthy in the sense that the existence of attack signal cannot be determined by monitoring the system output, and it is effective to systems that have unstable zero-dynamics. Several countermeasures against ZDA have been introduced, and the one employing the generalized hold (GH) is considered in this paper. The GH is a generalized version of zero-order hold that is commonly used in the digital control systems. In this paper, the lethality of ZDA and the effectiveness of GH as a countermeasure are demonstrated on a control system that involves a DC-DC converter. Through extensive simulations and experiments, the design of the proposed scheme is presented in detail and relevant practical issues are discussed.INDEX TERMS Cyber-physical system, generalized hold, sampled-data system, system security, zero-dynamics attack.