asgroi commited on
Commit
9f0e5e3
·
verified ·
1 Parent(s): 96fb060

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +271 -3
README.md CHANGED
@@ -1,3 +1,271 @@
1
- ---
2
- license: bsd-2-clause
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pretty_name: BODMAS Cleaned
5
+ task_categories:
6
+ - tabular-classification
7
+ tags:
8
+ - cybersecurity
9
+ - malware
10
+ - static-analysis
11
+ - pe-files
12
+ - malware-detection
13
+ - malware-family-classification
14
+ - concept-drift
15
+ - temporal-analysis
16
+ - tabular
17
+ - ai-ready
18
+ - tabular-classification
19
+ size_categories:
20
+ - 100K<n<1M
21
+ ---
22
+
23
+ # BODMAS Cleaned
24
+
25
+ BODMAS Cleaned is a cleaned and analysis-ready version of the original **BODMAS (Blue Hexagon Open Dataset for Malware Analysis)** dataset.
26
+
27
+ The original BODMAS dataset was introduced for machine-learning-based static malware analysis on Windows Portable Executable (PE) files, with support not only for binary malware detection but also for **temporal analysis** and **malware family studies**. This cleaned release preserves that analytical value while making the data easier to load, validate, and reuse.
28
+
29
+ Compared with the original source asset, this release removes duplicate samples, drops constant features, standardizes metadata, and preserves both timestamp and family information. Each sample is represented as a fixed-length numerical vector extracted statically from the original PE file, without executing the binary.
30
+
31
+ ## Original dataset
32
+
33
+ This dataset is a cleaned derivative of the original BODMAS dataset:
34
+
35
+ - **Original name:** BODMAS (Blue Hexagon Open Dataset for Malware Analysis)
36
+ - **Original providers:** University of Illinois at Urbana-Champaign (UIUC) / Blue Hexagon
37
+ - **Original paper:** Yang et al. (2021). *BODMAS: An Open Dataset for Learning based Temporal Analysis of PE Malware*
38
+ - **Original paper link:** https://liminyang.web.illinois.edu/data/DLS21_BODMAS.pdf
39
+ - **Original website/repository:** https://whyisyoung.github.io/BODMAS/
40
+
41
+ Please cite the original BODMAS paper when using this cleaned release in research.
42
+
43
+ ## Files
44
+
45
+ | File | Description |
46
+ |---|---|
47
+ | `bodmas_clean.npz` | Index file with row/feature counts and file references |
48
+ | `bodmas_clean_X.npy` | Feature matrix (`float32`), raw memmap, shape `(134428, 2326)` |
49
+ | `bodmas_clean_y.npy` | Label vector (`int32`), `0 = benign`, `1 = malware` |
50
+ | `bodmas_clean_metadata.parquet` | Per-sample metadata: SHA-256, timestamps, family fields, and quality flags |
51
+ | `manifest.json` | Versioned manifest with checksums and artifact references |
52
+ | `BODMAS_cleaned_notebook.ipynb` | Exploration and usage notebook |
53
+
54
+ ## What’s in the dataset?
55
+
56
+ This cleaned release contains a fully labeled static malware dataset derived from the original BODMAS collection.
57
+
58
+ ### Core contents
59
+
60
+ - **134,428 labeled samples**
61
+ - **2,326 numerical features**
62
+ - feature dtype: `float32`
63
+ - label dtype: `int32`
64
+ - labels:
65
+ - `0` = benign
66
+ - `1` = malware
67
+
68
+ ### Label distribution
69
+
70
+ - **77,138 benign samples**
71
+ - **57,290 malware samples**
72
+
73
+ ### Metadata retained
74
+
75
+ The cleaned metadata preserves the fields that make BODMAS especially useful for temporal and family-aware analysis, including:
76
+
77
+ - `sha256`
78
+ - `timestamp`
79
+ - `family`
80
+ - `record_id`
81
+ - `sample_id`
82
+ - `label_int`
83
+ - `label_str`
84
+ - `timestamp_raw`
85
+ - `hash_type`
86
+ - `bodmas_family`
87
+ - `flag_sha256`
88
+ - `flag_timestamp_missing`
89
+ - `flag_family_missing`
90
+ - `flag_is_benign`
91
+ - `feature_hash`
92
+
93
+ ### Family information
94
+
95
+ - **580 unique malware families** are present in the cleaned dataset
96
+ - the family distribution is skewed:
97
+ - top 5 families cover **35.5%** of malware samples
98
+ - top 20 families cover **69.4%** of malware samples
99
+
100
+ ### Feature representation
101
+
102
+ Samples are not raw executables. Each file is represented as a **fixed-length static feature vector** extracted from the original PE file. These features describe structural and statistical properties of the binary, such as:
103
+
104
+ - PE headers
105
+ - sections
106
+ - imports
107
+ - entropy-related information
108
+ - histogram-based characteristics
109
+
110
+ ## Cleaning summary
111
+
112
+ This release is the output of a quality-control and harmonization pipeline applied to the original BODMAS artifacts.
113
+
114
+ Main processing steps:
115
+
116
+ 1. **Duplicate removal**
117
+ 2. **Constant-feature filtering**, reducing the feature space from 2,381 to **2,326**
118
+ 3. **Metadata standardization**
119
+ 4. **Missing-value normalization and quality flagging**
120
+ 5. **Family/label consistency checks**
121
+ 6. **Manifest generation** for reproducibility and integrity checks
122
+
123
+ Summary of the cleaned release:
124
+
125
+ - original source size: **134,435 labeled samples**
126
+ - final cleaned size: **134,428 samples**
127
+ - final feature space: **2,326 features**
128
+ - **no separate unlabeled split**
129
+ - timestamps and malware family metadata preserved
130
+
131
+ In the cleaned metadata, family-label consistency is also checked using the BODMAS convention that empty family values correspond to benign samples, while non-empty family values correspond to malware samples.
132
+
133
+ ## File structure
134
+
135
+ ```text
136
+ bodmas_cleaned/
137
+ ├── bodmas_clean.npz
138
+ ├── bodmas_clean_X.npy
139
+ ├── bodmas_clean_y.npy
140
+ ├── bodmas_clean_metadata.parquet
141
+ └── manifest.json
142
+ ```
143
+
144
+ The `.npz` index stores `_rows` and `_features` for reliable loading.
145
+ The feature matrix is a raw memmap-backed array and should be loaded with explicit dtype and shape.
146
+
147
+ Unlike EMBER Cleaned, there is **no separate unlabeled split** in BODMAS Cleaned.
148
+
149
+ ## Requirements
150
+
151
+ To run the quickstart examples, install the minimum required dependencies:
152
+
153
+ ```bash
154
+ pip install numpy pandas pyarrow
155
+ ```
156
+
157
+ For notebook-based exploration and basic visualization, you may also install:
158
+
159
+ ```bash
160
+ pip install jupyter matplotlib seaborn scikit-learn
161
+ ```
162
+
163
+ ## Quickstart
164
+
165
+ This example loads the labeled BODMAS Cleaned dataset and checks that features, labels, and metadata are consistent and ready for supervised use.
166
+
167
+ ```python
168
+ import numpy as np
169
+ import pandas as pd
170
+
171
+ idx = np.load("bodmas_clean.npz", allow_pickle=True)
172
+ n_rows = int(idx["_rows"])
173
+ n_features = int(idx["_features"])
174
+
175
+ X = np.fromfile("bodmas_clean_X.npy", dtype=np.float32)
176
+ assert X.size == n_rows * n_features, (
177
+ f"Unexpected X size: got {X.size}, expected {n_rows * n_features}"
178
+ )
179
+ X = X.reshape(n_rows, n_features)
180
+
181
+ meta = pd.read_parquet("bodmas_clean_metadata.parquet")
182
+ y = meta["label_int"].to_numpy(dtype=np.int32, copy=False)
183
+
184
+ print(
185
+ f"Dataset: {X.shape[0]} samples, {X.shape[1]} features | "
186
+ f"labels: {len(y)} | metadata columns: {meta.shape[1]}"
187
+ )
188
+
189
+ assert X.shape[0] == len(y) == len(meta)
190
+ assert set(np.unique(y)) == {0, 1}
191
+
192
+ print("Unique labels:", np.unique(y))
193
+ print("Metadata columns:", meta.columns.tolist())
194
+ print("All checks passed.")
195
+ ```
196
+
197
+ ## Notebook
198
+
199
+ The repository also includes an exploration notebook in `.ipynb` format, designed to provide additional context on the cleaned dataset, its structure, and its main analytical use cases.
200
+
201
+ The notebook can be used to:
202
+
203
+ - inspect the labeled dataset
204
+ - explore metadata fields, timestamps, and family distributions
205
+ - validate dataset consistency
206
+ - review temporal and family-aware analyses
207
+ - explore example downstream use cases
208
+
209
+ To open it locally, run:
210
+
211
+ ```bash
212
+ jupyter notebook BODMAS_cleaned_notebook.ipynb
213
+ ```
214
+
215
+ or, if you use JupyterLab:
216
+
217
+ ```bash
218
+ jupyter lab BODMAS_cleaned_notebook.ipynb
219
+ ```
220
+
221
+ Make sure to open the notebook from the dataset root directory so that relative file paths resolve correctly.
222
+
223
+
224
+ ## Typical use cases
225
+
226
+ BODMAS Cleaned supports:
227
+
228
+ - binary malware detection
229
+ - malware family classification
230
+ - temporal analysis
231
+ - concept drift studies
232
+ - time-aware validation
233
+ - family distribution analysis
234
+ - feature importance analysis
235
+
236
+ The accompanying notebook includes loading, exploratory data analysis, temporal and family analysis, and example use cases focused on discriminative signal and model evaluation.
237
+
238
+ ## Notes and limitations
239
+
240
+ - This is a **static-analysis** dataset only.
241
+ - The cleaned release contains **derived features**, not raw PE binaries.
242
+ - Family names are dataset-specific and should not be treated as a universal malware ontology.
243
+ - Temporal metadata should be respected during evaluation to avoid leakage.
244
+ - Family distribution is concentrated, so downstream family-level evaluation should account for skew.
245
+ - The dataset is intended for defensive research, benchmarking, and education.
246
+
247
+ ## License
248
+
249
+ This cleaned release is derived from BODMAS. The original BODMAS data files are associated with the BSD-2 License. Please verify that your downstream redistribution and reuse remain aligned with the original BODMAS terms.
250
+
251
+ ## References
252
+
253
+ If you use this dataset, please cite the original BODMAS paper:
254
+
255
+ ```bibtex
256
+ @inproceedings{yang2021bodmas,
257
+ title={BODMAS: An Open Dataset for Learning based Temporal Analysis of PE Malware},
258
+ author={Yang, Limin and others},
259
+ booktitle={Proceedings of the 2021 ACM Workshop on Data-Limited Security Research},
260
+ year={2021}
261
+ }
262
+ ```
263
+
264
+ APA:
265
+
266
+ Yang, L., et al. (2021). *BODMAS: An Open Dataset for Learning based Temporal Analysis of PE Malware*. In *Proceedings of the 2021 ACM Workshop on Data-Limited Security Research*.
267
+
268
+ ## Contacts
269
+
270
+ - **Shared by:** ACN
271
+