In recent years, billions of smart gadgets have been connected by the Internet of Things (IoT) to enhance people's quality of life. However, abnormalities or malevolent attacks create security weaknesses, resulting in a risk to data safety and an impairment in performance for IoT operations. Therefore, IoT security solutions must monitor and prevent undesired activities within the IoT network. The security requirements of IoT applications cannot be satisfied by traditional intrusion detection systems (IDS) since these methods require a lot of processing power, storage space, and training time. As a result, IDS with low weights, quick training times, and excellent detection accuracy must be created for IoT. Therefore, this article developed a deep-learning IoT security framework based on a hybrid TResNet-MiXNet architecture that can identify and anticipate vulnerabilities. This model consists of multiple phases. The first step uses a Conditional Tabular Generative Adversarial Networks (CTGAN) based method to solve the imbalanced data issue in the dataset. After that, the TResNet-based deep learning approach is used to extract the key features of each class from the dataset. Lastly, a classifier based on MiXNet is implemented to identify each attack separately. This study examines three distinct datasets, namely N-BaIoT, ToN-IoT and IoTID20. The empirical inquiry reveals that the presented methodology attains correspondingly remarkable accuracy of 99.38% and 99.45%, 99.41% on IoTID20, N-BaIoT and ToN-IoT datasets. Additionally, it demonstrates notable benefits over existing state-of-the-art models, as demonstrated by multiple evaluation measures.