In recent decades, the Internet of Things (IoT) is a growing technology in smart applications, where it is highly susceptible to security breaches and the resources are constrained in nature. Hence, the growth of IoT devices allows the hackers to take benefit of the communication capabilities to detect different types of attacks such from NSL-KDD such as Denial of Service (DoS), Probe, Remote to Local (R2L) and User to Root (U2R) attacks. The existing deep networks used larger data in training because the size of non-predictive parameters for learning required huge potential to attack detection. In order to overcome the problem occurred in the existing models, an efficient Post Pruning Decision Tree-Synthetic Minority Over-Sampling Technique (PPDT-SMOTE) is proposed in the research work. The proposed PPDT-SMOTE eliminates or pruned the non-predictive parameters from the huge data samples and SMOTE solves the data imbalance problems as they use the prominent samples from the non-pruned regions. Thus the PPDT models improves the learning rate of the system for huge data and SMOTE will overcome the problem of class imbalance problem as the learning rate is improved. The results obtained from the proposed PPDT-SMOTE approach effectively detects the DoS, Probe, U2R, and R2L attacks in terms of accuracy as 98.04% better when compared to the existing shallow models of 95.22%, Routing Protocol for Low Power and Lossy Networks (RPL) of 91.5 % and Multi-Convolution Neural Network (CNN) fusion model of 64.81% in the IoT environment.