This paper addresses the mean square stabilization for a network control system with DoS (denial of service) type of cyber-attack. The DoS attack is assumed to be Markovain, and switching control strategy is proposed to cope with this attack. Firstly, a model of dual switched linear system is presented to describe the aforementioned system. To fulfill mean square stabilization, the minimal switching rules as well as the method for computing the state-feedback controllers are then given in terms of linear matrix inequalities. Finally, a numerical example is provided to show the effectiveness of the proposed method.