The increasing amount of IoT devices increases the size of network traffic data, causing an increase in the incidence of security breaches in IoT networks. Cybercriminals have developed malware to compromise the security of sensitive data, among other cyber threats. In the presence of inadequate and robust security mechanisms, sensitive data is prone to vulnerability. Hence, protecting data in the IoT environment is becoming a mandatory task. Various approaches have addressed malware detection using network data features. However, there is still room for improvement in developing superior techniques and utilizing more comprehensive datasets. This paper presents a novel lightweight ensemble voting classifier to detect malware traffic by deploying the best possible network data. The merits of the correlation coefficient and Opposition-Based Crow Search Algorithm (OCS) have been leveraged to compute the best possible features. Another advantage of this proposed experiment is its focus on a dataset tailored to malware traffic features. This focus enables highly accurate malware detection. After feature selection using OCS, the proposed malware classifier is trained and validated with both 5-fold and 10-fold cross-validation techniques. The tested results confirm that the presented malware classifier performs best using a minimal feature set, which is highly advantageous for IoT networks due to resource constraints.