This paper investigates the problem of attack detection for cyber–physical systems (CPSs) with disturbances, measurement noises, and false data injection (FDI) attacks. A classical linear discrete-time system attack model is constructed and a robust attack detector based on the mixed H_/H is designed. Firstly, a system with an actuator that suffered a malicious attack is modeled. Then, a robust attack detector based on the mixed H_/H is designed in which the H_ index and H index are used to characterize the sensitivity to attacks and robustness to disturbances and measurement noises, respectively. And an adaptive detection threshold with a compensation term is proposed. Besides, the designed robust attack detector enables the attack detection dynamic system to be asymptotically stable and to guarantee the H_/H performance, and the robust attack detector gains are solved from a convex optimization. Finally, the obtained theoretical results are validated through a numerical simulation and a three-area power system simulation.