The rise of malware in the Internet of Things (IoT) realm exploits sensitive IoT devices that lead to extensive malicious attacks that pose a significant danger to the integrity of the Internet ecosystem. Addressing this threat effectively requires a robust system for classifying and attributing IoT malware, serving as vital initial steps toward implementing countermeasures for attack prevention and mitigation. So, in this work, a new malware classification technique using deep learning is developed for solving different kinds of malware in IoT. The required images for the malware classification process are gathered from online databases and given to the developed Adaptive Multi-scale and Dilated ResneXt with Gated Recurrent Unit (AMDR-GRU)-based malware classification process. Here, the last layer of the ResneXt is modified with GRU, and several parameters are optimized in the suggested AMDR-GRU model with the support of the designed Intensified Random Parameter-based Chameleon Swarm Algorithm (IRPCSA) to enhance the classification performance. Finally, the developed AMDR-GRU model offered the classified outcome and the obtained classification results are compared with different existing malware classification models to prove the effectiveness of the developed model over others. The developed model offered 99.59 % of precision. The result proved that the developed model is used to classify different malware without reverse engineering, binary code analysis, and feature engineering. Moreover, by effectively classifying malware, this technique can contribute to enhancing the security of IoT devices, protecting them from potential threats and vulnerabilities. This has significant implications for ensuring the privacy, integrity, and overall safety of IoT systems.