Malicious attacks in wireless cyber-physical systems have become more frequent in recent years. With the development of attack methods used by attackers, security in wireless cyber-physical systems needs to progress to match various attacks. Deep learning is a field that has developed rapidly in recent years, and generative adversarial network (GAN) is a deep learning model that has shown promising results. GAN has two interlocking subsystems, one to generate fake samples and another to classify the generated fake samples. Finally, the system has two well trained subsystems that are capable of both generating convincing samples and classifying generated samples. In this article, we propose a self-training powered GAN (ST-GAN) system to detect attacks in wireless cyber-physical systems. At the same time, the proposed ST-GAN system solves the issue of limited data in the field of security for wireless cyber-physical systems, which is caused by confidentiality as well as the number of attacks. Our experiments have shown that the proposed system can effectively detect attacks in wireless cyber-physical systems.