Cloud computing environments are increasingly popular due to their flexibility and scalability, but they also present significant security challenges, particularly in the form of malware attacks. These malicious attacks exploit weaknesses within cloud infrastructures, which can result in serious repercussions like data breaches, unauthorized system access, and identity theft. In this paper, we introduce an innovative malware detection classifier specifically designed to overcome the shortcomings of conventional machine learning algorithms, such as K-Nearest Neighbor (KNN) and Support Vector Machine (SVM), in the unique context of cloud environments. Our proposed method relies on Log-spectral distance as a fundamental metric, which enables a more precise and effective approach to detecting malware. Through rigorous and extensive experimentation, our findings demonstrate that this novel classifier achieves an outstanding accuracy rate of 97