--- license: mit --- # SMU_MalwareDetection PE Assembly Dataset This dataset consists of assembly code fragments extracted from malicious and benign Portable Executable (PE) files. It was created to support deep learning-based malware classification. Assembly code was segmented using a sliding window technique to preserve contextual information. ## ⚠️ Note: Class Imbalance This dataset has a **class imbalance**, with fewer benign samples (`0` label) compared to malware samples (`1` label). While the difference is not extreme, users should be aware of this imbalance and consider applying appropriate techniques (e.g., class weighting, sampling strategies) during training or evaluation. ## Dataset Description The dataset includes assembly code segments derived from two types of PE files: - **Malware Samples** Malicious PE files were downloaded from [MalwareBazaar](https://bazaar.abuse.ch/), specifically focusing on samples uploaded in **2020**. Each file was disassembled into assembly code using the `objdump` command on Ubuntu. - **Benign Samples** Benign PE files were collected from regular executable files stored on a PC using PowerShell. These files were also disassembled using `objdump` to extract assembly code in the same manner. ## Sliding Window Preprocessing To prepare the data for machine learning: - Assembly code was segmented using a sliding window approach: - **Window Size:** 350 lines - **Stride:** 175 lines (50% overlap) - This setup ensures that the segments preserve contextual relationships between instructions. - Importantly, **all segments generated from a single file are kept together** to maintain file-level grouping and avoid mixing across files. - No tokenization was applied; the raw assembly code was used as-is during segmentation. ## Data Format Each entry in the dataset includes: - `assembly`: A segment of assembly code extracted via sliding window - `label`: A binary classification label indicating `malware` or `benign` ## Intended Use This dataset is suitable for the following tasks: - Malware classification using NLP-based models (e.g., Transformer-based models) - Research on malware detection using sliding window context segmentation ## Tools Used - `objdump` (for extracting assembly code) - PowerShell (for collecting benign files) - Python scripts (for sliding window segmentation and maintaining per-file chunk structure)