Currently, in many purposes machine and deep learning methods were utilized to identify bot net threats in IoT networks. On the other hand, highly imbalanced network traffic information in the training set frequently humiliates the classification. A novel method is proposed called Joined Bi-Model RNN with Spatial Attention (JBiRSA). In this work, feature generation and classification is the two major processes. For feature generation process, Generative Adversarial Network (GAN) is applied. GAN consist of two neural networks, namely Generator and Discriminator. In GAN, loss is also calculated to enhance accuracy In this model GAN with Traffic Encoder loass is proposed along with an effective generator especially suited for network traffic. Two data sets are used, namely N-BaIoT and IoT-23. N-BaIoT data set is formed by adding bot net attacks such as Bashlite and Mirai. IoT-23 data set is formed with 20 malware confines from various IoT devices and 3 precincts for benign anomalies. JBiRSA with GAN has proven to be efficient and has the potential to differentiate between benign and malicious traffic data in IoT attacks. JBiRSA with GAN provides an overall accuracy of 98.75%.