TL;DR
This paper introduces CSMC, a novel malware classification method that leverages compressed sensing and deep learning to efficiently and securely process malware samples. By compressing samples before analysis, CSMC significantly reduces data volume and prevents the reconstruction of original malware, addressing critical security and efficiency challenges in IoT environments.
What Problem Does This Paper Address?
The proliferation of the Internet of Things (IoT) has led to a surge in intelligent sensors, which, while increasingly vital, are also vulnerable to sophisticated malware attacks. Traditional malware classification methods struggle with the sheer volume of data, limited bandwidth in IoT devices, and the risk of exposing sensitive malware samples during sharing and analysis. Existing compressed sensing (CS) methods, while efficient, often lack the ability to extract meaningful features during compression, and their security against sample exploitation is not always guaranteed. This paper aims to bridge this gap by proposing a method that not only compresses malware efficiently but also extracts crucial family features during compression, enhancing classification accuracy and security.
Methods
The core of the proposed method, CSMC (Compressed Sensing Malware Classification), is a two-step process:
- Sample Compression: Unlike traditional CS methods that rely on deterministic measurement matrices, CSMC employs a convolutional layer to sample and compress malware samples. This deep learning-based approach allows the compression process to simultaneously extract malware family features. The compression is achieved using a novel convolutional layer that acts as both left and right measurement matrices, effectively sampling the input signal. This process is designed to be irreversible, preventing the reconstruction of original malware samples.
- Malware Classification: The compressed malware samples are then fed into a 30-layer convolutional neural network, specifically a Deep Residual Shrinkage Network (DRSN). This network is trained to classify the malware families based on the compressed, feature-rich data. The DRSN incorporates an attention mechanism and dynamically generated soft thresholds to improve classification performance, especially under noisy conditions.
Datasets
The experiments were conducted using two publicly available datasets:
- Malimg Dataset: This dataset contains 9435 Windows PE malware samples from 25 malware families, already transformed into grayscale images.
- Drebin Dataset: This dataset comprises 5184 malicious Android software samples from 179 families. For this dataset, the authors processed APK files using
apktoolsto extract opcodes and then transformed them into images.
The authors selected families with more than 10 samples to ensure sufficient data for training and testing, resulting in 54 families for the Drebin dataset after trimming.
Key Insights and Ideas
- Feature Extraction During Compression: The most significant insight is the integration of feature extraction directly into the compression phase. This deviates from traditional CS methods and allows for more efficient and informative compressed representations.
- Security Through Irreversibility: By making the compression process difficult to reverse, CSMC inherently protects original malware samples from being reconstructed and exploited by malicious actors, a critical concern in collaborative analysis.
- Robustness to Noise: The method demonstrates a notable ability to maintain classification accuracy and reconstruction quality even when subjected to Gaussian noise, which is crucial for real-world IoT environments prone to interference.
- Visualized Frequency Domain Analysis: The frequency domain analysis of compressed signals reveals that CSMC, unlike traditional CS methods, adapts its focus from low-frequency (overall structure) to high-frequency (detailed features) as the compression ratio increases, mimicking human visual perception and capturing more intricate malware characteristics.
Key Results
- Classification Accuracy: CSMC consistently outperformed classical compressed sensing methods (Gaussian, Logistic, Tent matrices) in malware classification accuracy on both the Malimg and Drebin datasets, especially at higher compression ratios. For instance, on the Malimg dataset, CSMC achieved an accuracy of 0.97867 at a 0.05 compression ratio, significantly higher than the classical methods (around 0.41-0.44).
- Reconstruction Quality (PSNR): CSMC achieved substantially higher PSNR values compared to classical CS methods, indicating superior reconstruction quality. At a 0.05 compression ratio on Malimg, CSMC's PSNR was 19.02935 dB, nearly double the average of other methods. This advantage became even more pronounced at higher compression ratios.
- Noise Robustness: CSMC maintained significantly higher classification accuracy under increasing noise levels compared to other methods. For example, with a noise standard variance of 0.05, CSMC's accuracy remained above 90%, while other methods dropped to 20-75%.
- Malware Code Reverting: Experiments showed that reconstructed operation code sequences from compressed samples had a significant difference proportion (e.g., 35.40% at 0.05 compression ratio) compared to original sequences, confirming the method's ability to prevent accurate code restoration.
Limitations and Future Work
- Imprecise Reconfigurability: The paper acknowledges that the primary focus is on the security of the classification process through imprecise reconfigurability, meaning the exact original sample cannot be perfectly reconstructed.
- Future Work: The authors suggest exploring associated learning and training using sensors to further refine the method's reconstruction performance. They also envision its application in new fields like medical image classification for remote healthcare, leveraging advanced sensor capabilities. The paper also notes that while CSMC performs well, the Drebin dataset's complexity and variability led to less statistically significant superiority in classification accuracy compared to other methods, suggesting potential areas for further investigation.
Summary updated