mjbommar commited on
Commit
af97273
·
verified ·
1 Parent(s): 5922e9e

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +89 -107
README.md CHANGED
@@ -13,84 +13,7 @@ tags:
13
  - cross-platform
14
  size_categories:
15
  - 10K<n<100K
16
- pretty_name: 'Binary-30K: A Large-Scale Multi-Platform Binary Dataset'
17
- dataset_info:
18
- features:
19
- - name: file_id
20
- dtype: string
21
- - name: file_path
22
- dtype: string
23
- - name: file_name
24
- dtype: string
25
- - name: sha256
26
- dtype: string
27
- - name: md5
28
- dtype: string
29
- - name: file_size
30
- dtype: int64
31
- - name: platform
32
- dtype: string
33
- - name: os_family
34
- dtype: string
35
- - name: os_version
36
- dtype: string
37
- - name: distribution
38
- dtype: string
39
- - name: file_format
40
- dtype: string
41
- - name: architecture
42
- dtype: string
43
- - name: binary_type
44
- dtype: string
45
- - name: is_stripped
46
- dtype: bool
47
- - name: is_packed
48
- dtype: bool
49
- - name: is_signed
50
- dtype: bool
51
- - name: sections
52
- struct:
53
- - name: name
54
- list: string
55
- - name: size
56
- list: int64
57
- - name: entropy
58
- list: float32
59
- - name: num_sections
60
- dtype: int32
61
- - name: code_size
62
- dtype: int64
63
- - name: data_size
64
- dtype: int64
65
- - name: imports
66
- list: string
67
- - name: num_imports
68
- dtype: int32
69
- - name: exports
70
- list: string
71
- - name: num_exports
72
- dtype: int32
73
- - name: entropy
74
- dtype: float32
75
- - name: tokens
76
- list: int32
77
- - name: token_count
78
- dtype: int32
79
- - name: compression_ratio
80
- dtype: float32
81
- - name: unique_tokens
82
- dtype: int32
83
- splits:
84
- - name: train
85
- num_bytes: 49491992359
86
- num_examples: 38395
87
- download_size: 21623507474
88
- dataset_size: 49491992359
89
- configs:
90
- - config_name: default
91
- data_files:
92
- - split: train
93
- path: data/train-*
94
  ---
95
 
96
  # Dataset Card for Binary-30K
@@ -124,13 +47,13 @@ configs:
124
 
125
  ### Dataset Summary
126
 
127
- Binary-30K is a comprehensive, multi-platform binary executable dataset designed for machine learning research in binary analysis, malware detection, and program understanding. The dataset contains **30,745 records** representing **22,278 unique binary executables** totaling **12.90 GB**, collected from diverse sources including Linux distributions, Windows operating systems, and the SOREL-20M malware dataset.
128
 
129
- **Note on Duplicates:** The dataset includes 30,745 total records but 22,278 unique SHA256 hashes. The duplicates (8,467 records) are primarily due to:
130
  - **BusyBox binaries** (~1,827 records): Single multi-call binary with different command names (e.g., `ls`, `cp`, `mv` are hardlinks to the same BusyBox binary)
131
  - **Hardlinked system utilities**: Multiple names pointing to identical binaries across different Linux distributions
132
 
133
- This structure reflects real-world binary collections where utilities share implementations, and is valuable for studying binary deduplication and identifying multi-purpose executables.
134
 
135
  Each binary in the dataset has been pre-processed with:
136
  - **Pre-computed BPE tokenization** using the `mjbommar/glaurung-binary-tokenizer-001` tokenizer
@@ -140,19 +63,23 @@ Each binary in the dataset has been pre-processed with:
140
  - **Binary analysis** via LIEF library (ELF/PE parsing)
141
 
142
  The dataset is stratified across:
143
- - **Linux binaries** (50.8%): Alpine 3.18/3.19, Debian 11 (Bullseye)/12 (Bookworm), Ubuntu 20.04/22.04/24.04, BusyBox 1.37.0
144
- - **Windows binaries** (48.0%): Windows 8 Pro, Windows 10, Windows 11, Windows Update Catalog
145
- - **Malware samples** (1.2%): From SOREL-20M dataset
 
 
146
 
147
- This dataset enables research in malware detection, architecture recognition, function boundary detection, compiler identification, binary similarity analysis, and cross-platform binary understanding.
 
 
148
 
149
  ### Supported Tasks
150
 
151
  **Binary Malware Detection**
152
- - Task: Binary classification (benign vs malicious)
153
  - Metrics: Accuracy, Precision, Recall, F1-score, AUC-ROC
154
  - Suggested Models: Transformer-based sequence models, CNN-based models
155
- - Use Case: Detect malicious executables using token sequences and metadata features
156
 
157
  **Architecture Recognition**
158
  - Task: Multi-class classification (x86, x86-64, ARM, ARM64, etc.)
@@ -315,9 +242,16 @@ test = train_test['test'] # ~4,627 samples (15%)
315
  ```
316
 
317
  **Distribution Statistics:**
318
- - Linux binaries: ~15,659 (51%)
319
- - Windows binaries: ~14,815 (48%)
320
- - Malware samples: ~367 (1%)
 
 
 
 
 
 
 
321
 
322
  ## Dataset Creation
323
 
@@ -337,17 +271,21 @@ This dataset provides:
337
  5. **Open access**: CC-BY-4.0 license with public availability
338
 
339
  The dataset enables research in:
340
- - Cross-platform malware detection
341
- - Architecture-agnostic binary analysis
342
- - Transfer learning between platforms
343
  - Tokenization-based binary understanding
344
  - Large-scale binary similarity analysis
 
 
 
 
345
 
346
  ### Source Data
347
 
348
  #### Initial Data Collection and Normalization
349
 
350
- **Linux Binaries (51% of dataset)**
351
 
352
  Collected from official package repositories:
353
  - **Alpine Linux 3.18** and **3.19**: Lightweight distribution, musl libc-based static binaries
@@ -357,7 +295,7 @@ Collected from official package repositories:
357
 
358
  Binaries extracted from .deb packages and Alpine APK packages using standard package management tools.
359
 
360
- **Windows Binaries (48% of dataset)**
361
 
362
  Collected from multiple Windows versions to capture compiler evolution:
363
  - **Windows 8 Pro (x64)**: System binaries and common applications
@@ -367,9 +305,11 @@ Collected from multiple Windows versions to capture compiler evolution:
367
 
368
  Binaries extracted from official Microsoft sources using update catalog and system file extraction.
369
 
370
- **Malware Samples (1% of dataset)**
 
 
371
 
372
- Drawn from SOREL-20M dataset:
373
  - **SOREL-20M**: Sophos-ReversingLabs 20 million sample malware dataset
374
  - Source: [https://github.com/sophos/SOREL-20M](https://github.com/sophos/SOREL-20M)
375
  - License: [SOREL-20M License Agreement](https://github.com/sophos/SOREL-20M/blob/main/LICENSE)
@@ -379,6 +319,28 @@ Drawn from SOREL-20M dataset:
379
 
380
  All samples handled in isolated environment following malware analysis best practices.
381
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  #### Source Language Producers
383
 
384
  The binaries were originally compiled from source code written by:
@@ -469,14 +431,19 @@ The dataset contains compiled binary executables. Potential sensitive informatio
469
  ### Discussion of Biases
470
 
471
  **Platform Bias:**
472
- - Linux (51%) and Windows (48%) are balanced, but represent only two major platforms
473
- - MacOS, mobile platforms (iOS/Android), and embedded systems not represented
474
- - This may limit generalization to other platforms
 
 
475
 
476
  **Architecture Bias:**
477
- - Dominated by x86-64 architecture
478
- - Limited ARM samples despite ARM's growing importance (mobile, IoT, Apple Silicon)
479
- - Other architectures (MIPS, RISC-V) minimally represented
 
 
 
480
 
481
  **Temporal Bias:**
482
  - Windows samples span Windows 8-11 (2012-2023)
@@ -489,9 +456,14 @@ The dataset contains compiled binary executables. Potential sensitive informatio
489
  - May not capture distribution-specific toolchain differences
490
 
491
  **Malware Bias:**
492
- - Malware samples only 1% of dataset (class imbalance)
493
- - Malware from SOREL-20M (2020 collection) may not represent current threats
494
- - Geographic/language bias in malware samples from original SOREL-20M
 
 
 
 
 
495
 
496
  **Size Bias:**
497
  - File sizes vary widely; very large binaries may be underrepresented
@@ -576,13 +548,23 @@ This dataset contains binary executables from multiple sources, each subject to
576
  - Users are responsible for compliance with Microsoft terms and applicable laws in their jurisdiction
577
  - Consider consulting legal counsel for commercial applications
578
 
579
- 3. **Malware Samples**: From SOREL-20M dataset (Sophos-ReversingLabs)
580
  - Source: [SOREL-20M GitHub Repository](https://github.com/sophos/SOREL-20M)
581
  - License: [SOREL-20M License Agreement](https://github.com/sophos/SOREL-20M/blob/main/LICENSE)
582
  - Users must comply with SOREL-20M's terms of use
583
  - No copyright claimed on malware samples themselves
584
  - Malware samples should only be used in secure, isolated research environments
585
 
 
 
 
 
 
 
 
 
 
 
586
  **Recommendations for Users:**
587
  - **Academic/Research Use**: Generally covered under fair use/fair dealing in most jurisdictions, but verify compliance with institutional policies
588
  - **Commercial Use**: Consult legal counsel regarding Microsoft binary licenses and other proprietary software
 
13
  - cross-platform
14
  size_categories:
15
  - 10K<n<100K
16
+ pretty_name: "Binary-30K: A Large-Scale Multi-Platform Binary Dataset"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ---
18
 
19
  # Dataset Card for Binary-30K
 
47
 
48
  ### Dataset Summary
49
 
50
+ Binary-30K is a comprehensive, multi-platform binary executable dataset designed for machine learning research in binary analysis, malware detection, and program understanding. The dataset contains **38,467 records** representing **~30,000 unique binary executables** totaling **~33.41 GB**, collected from diverse sources including Linux distributions, Windows operating systems, SOREL-20M malware dataset, and Malware Bazaar collection.
51
 
52
+ **Note on Duplicates:** The dataset includes 38,467 total records representing ~30,000 unique SHA256 hashes. Among the benign binaries, there are approximately 8,467 duplicate records primarily due to:
53
  - **BusyBox binaries** (~1,827 records): Single multi-call binary with different command names (e.g., `ls`, `cp`, `mv` are hardlinks to the same BusyBox binary)
54
  - **Hardlinked system utilities**: Multiple names pointing to identical binaries across different Linux distributions
55
 
56
+ This structure reflects real-world binary collections where utilities share implementations, and is valuable for studying binary deduplication and identifying multi-purpose executables. The malware samples from SOREL-20M and Malware Bazaar are deduplicated and contribute unique binaries to the dataset.
57
 
58
  Each binary in the dataset has been pre-processed with:
59
  - **Pre-computed BPE tokenization** using the `mjbommar/glaurung-binary-tokenizer-001` tokenizer
 
63
  - **Binary analysis** via LIEF library (ELF/PE parsing)
64
 
65
  The dataset is stratified across:
66
+ - **Linux binaries** (47.2%): Alpine 3.18/3.19, Debian 11 (Bullseye)/12 (Bookworm), Ubuntu 20.04/22.04/24.04, BusyBox 1.37.0, plus Linux malware from Malware Bazaar
67
+ - **Windows binaries** (44.5%): Windows 8 Pro, Windows 10, Windows 11, Windows Update Catalog, plus Windows malware from Malware Bazaar
68
+ - **macOS binaries** (1.5%): macOS malware from Malware Bazaar (x86-64, ARM64, Universal binaries)
69
+ - **Android binaries** (0.6%): Android malware APKs from Malware Bazaar
70
+ - **Other/Diverse formats** (6.2%): Scripts, archives, and diverse formats from SOREL-20M and Malware Bazaar
71
 
72
+ **Malware Representation**: The dataset includes 8,089 malware samples (21.0% of dataset) from SOREL-20M (367 samples) and Malware Bazaar (7,722 samples), providing strong class balance for malware detection research across Linux, Windows, macOS, and Android platforms.
73
+
74
+ This dataset enables research in cross-platform malware detection, architecture recognition, function boundary detection, compiler identification, binary similarity analysis, mobile malware analysis, and multi-platform binary understanding.
75
 
76
  ### Supported Tasks
77
 
78
  **Binary Malware Detection**
79
+ - Task: Binary classification (benign vs malicious) and cross-platform malware detection
80
  - Metrics: Accuracy, Precision, Recall, F1-score, AUC-ROC
81
  - Suggested Models: Transformer-based sequence models, CNN-based models
82
+ - Use Case: Detect malicious executables across Linux, Windows, macOS, and Android platforms using token sequences and metadata features. Strong class balance (21% malware) enables effective training.
83
 
84
  **Architecture Recognition**
85
  - Task: Multi-class classification (x86, x86-64, ARM, ARM64, etc.)
 
242
  ```
243
 
244
  **Distribution Statistics:**
245
+ - Linux binaries: ~18,165 (47.2%)
246
+ - Windows binaries: ~17,125 (44.5%)
247
+ - macOS binaries: ~568 (1.5%)
248
+ - Android binaries: ~242 (0.6%)
249
+ - Other/Diverse: ~2,367 (6.2%)
250
+
251
+ **Malware Representation:**
252
+ - Total malware samples: ~8,089 (21.0%)
253
+ - Sources: SOREL-20M (367) + Malware Bazaar (7,722)
254
+ - Cross-platform: Linux, Windows, macOS, Android
255
 
256
  ## Dataset Creation
257
 
 
271
  5. **Open access**: CC-BY-4.0 license with public availability
272
 
273
  The dataset enables research in:
274
+ - Cross-platform malware detection across Linux, Windows, macOS, and Android
275
+ - Architecture-agnostic binary analysis including exotic architectures (MIPS, RISC-V, ARCompact, m68k)
276
+ - Transfer learning between platforms and architectures
277
  - Tokenization-based binary understanding
278
  - Large-scale binary similarity analysis
279
+ - Mobile malware detection (Android APKs)
280
+ - IoT and embedded systems malware analysis
281
+
282
+ Binary-30K is one of the few publicly available datasets with comprehensive cross-platform malware coverage at scale, including mobile platforms and exotic architectures, with strong class balance (21% malware) suitable for effective malware detection research.
283
 
284
  ### Source Data
285
 
286
  #### Initial Data Collection and Normalization
287
 
288
+ **Linux Binaries (47.2% of dataset)**
289
 
290
  Collected from official package repositories:
291
  - **Alpine Linux 3.18** and **3.19**: Lightweight distribution, musl libc-based static binaries
 
295
 
296
  Binaries extracted from .deb packages and Alpine APK packages using standard package management tools.
297
 
298
+ **Windows Binaries (44.5% of dataset)**
299
 
300
  Collected from multiple Windows versions to capture compiler evolution:
301
  - **Windows 8 Pro (x64)**: System binaries and common applications
 
305
 
306
  Binaries extracted from official Microsoft sources using update catalog and system file extraction.
307
 
308
+ **Malware Samples (21% of dataset)**
309
+
310
+ Drawn from two sources - SOREL-20M and Malware Bazaar:
311
 
312
+ **SOREL-20M subset (367 samples)**:
313
  - **SOREL-20M**: Sophos-ReversingLabs 20 million sample malware dataset
314
  - Source: [https://github.com/sophos/SOREL-20M](https://github.com/sophos/SOREL-20M)
315
  - License: [SOREL-20M License Agreement](https://github.com/sophos/SOREL-20M/blob/main/LICENSE)
 
319
 
320
  All samples handled in isolated environment following malware analysis best practices.
321
 
322
+ **Malware Bazaar Samples (20% of dataset)**
323
+
324
+ Strategically sampled from Malware Bazaar collection using Platform-First Stratified Sampling:
325
+ - **Source**: [https://bazaar.abuse.ch/](https://bazaar.abuse.ch/)
326
+ - **Sampling strategy**: Platform-First Stratified Sampling approach
327
+ - ALL macOS samples (568): Fills critical platform gap, includes x86-64, ARM64 (Apple Silicon), and Universal binaries
328
+ - ALL Android samples (242): Enables mobile malware research, APK format with ARM/ARM64 native libraries
329
+ - Windows samples (2,356): Stratified by file size for diversity (small scripts, medium tools, large packed binaries)
330
+ - Linux samples (2,556): Stratified by architecture, includes exotic architectures (MIPS, RISC-V, ARCompact, m68k, SH, PowerPC)
331
+ - Other formats (2,000): Diverse file types including scripts, archives, and obfuscated payloads
332
+ - **Total**: 7,722 samples selected from 20,499 available (37.7% sampling rate)
333
+ - **Selection criteria**: Maximize platform and architecture diversity to reach 30,000 unique binaries
334
+ - **License**: Research use only, proper attribution required
335
+ - **Sampling methodology**: Detailed documentation available at [SAMPLING_METHODOLOGY.md](https://github.com/mjbommar/binary-bpe-paper/blob/master/paper/dataset-paper/SAMPLING_METHODOLOGY.md)
336
+
337
+ The Malware Bazaar samples provide:
338
+ 1. **Cross-platform malware detection**: Supports Linux, Windows, macOS, and Android malware analysis
339
+ 2. **Mobile malware research**: 242 Android APKs with ARM/ARM64 architectures
340
+ 3. **macOS malware analysis**: 568 samples including x86-64, ARM64 (Apple Silicon), and Universal binaries
341
+ 4. **Exotic architecture coverage**: 1,000+ samples with MIPS, RISC-V, ARCompact, m68k, SH, PowerPC enabling IoT/embedded malware research
342
+ 5. **Platform and architecture diversity**: Stratified sampling ensures representation across malware types, platforms, and architectures
343
+
344
  #### Source Language Producers
345
 
346
  The binaries were originally compiled from source code written by:
 
431
  ### Discussion of Biases
432
 
433
  **Platform Bias:**
434
+ - Linux (47.2%) and Windows (44.5%) are the dominant platforms
435
+ - **macOS represented** (1.5%, 568 samples) including x86-64 and ARM64 (Apple Silicon) binaries
436
+ - **Android represented** (0.6%, 242 samples) enabling mobile malware research
437
+ - iOS not represented (future work)
438
+ - Embedded systems represented via exotic Linux architectures (MIPS, RISC-V, ARCompact, m68k, SH, PowerPC)
439
 
440
  **Architecture Bias:**
441
+ - x86-64 is dominant but dataset includes diverse architectures:
442
+ - **ARM64**: macOS (Apple Silicon) and Android (64-bit) samples included
443
+ - **ARM**: Android (32-bit) samples included
444
+ - **Exotic architectures**: MIPS, RISC-V, ARCompact, m68k, SH, PowerPC from Malware Bazaar Linux samples (~1,000 samples)
445
+ - Suitable for cross-architecture research across common and exotic architectures
446
+ - IoT/embedded device architectures represented, enabling specialized malware detection research
447
 
448
  **Temporal Bias:**
449
  - Windows samples span Windows 8-11 (2012-2023)
 
456
  - May not capture distribution-specific toolchain differences
457
 
458
  **Malware Bias:**
459
+ - Malware samples represent 21% of dataset (strong class balance for classification tasks)
460
+ - **Cross-platform malware** representation: Linux, Windows, macOS, Android
461
+ - Malware from two sources:
462
+ - SOREL-20M (2020): 367 Windows PE samples
463
+ - Malware Bazaar (2020-2025): 7,722 samples spanning multiple years, platforms, and malware families
464
+ - **Platform-stratified sampling** ensures diverse malware families and attack vectors across all major platforms
465
+ - Geographic/language bias may exist due to collection sources
466
+ - **Exotic architecture malware** (MIPS, RISC-V, ARCompact, m68k, SH, PowerPC) enables IoT/embedded malware detection research
467
 
468
  **Size Bias:**
469
  - File sizes vary widely; very large binaries may be underrepresented
 
548
  - Users are responsible for compliance with Microsoft terms and applicable laws in their jurisdiction
549
  - Consider consulting legal counsel for commercial applications
550
 
551
+ 3. **SOREL-20M Malware Samples**: From SOREL-20M dataset (Sophos-ReversingLabs)
552
  - Source: [SOREL-20M GitHub Repository](https://github.com/sophos/SOREL-20M)
553
  - License: [SOREL-20M License Agreement](https://github.com/sophos/SOREL-20M/blob/main/LICENSE)
554
  - Users must comply with SOREL-20M's terms of use
555
  - No copyright claimed on malware samples themselves
556
  - Malware samples should only be used in secure, isolated research environments
557
 
558
+ 4. **Malware Bazaar Samples**: From Malware Bazaar (abuse.ch)
559
+ - Source: [https://bazaar.abuse.ch/](https://bazaar.abuse.ch/)
560
+ - License: Research use only, proper attribution required
561
+ - 7,722 samples strategically selected via Platform-First Stratified Sampling
562
+ - Users must comply with Malware Bazaar's terms of use
563
+ - No copyright claimed on malware samples themselves
564
+ - Malware samples should only be used in secure, isolated research environments
565
+ - Attribution: Must acknowledge Malware Bazaar (abuse.ch) as source
566
+ - See [SAMPLING_METHODOLOGY.md](https://github.com/mjbommar/binary-bpe-paper/blob/master/paper/dataset-paper/SAMPLING_METHODOLOGY.md) for sampling details
567
+
568
  **Recommendations for Users:**
569
  - **Academic/Research Use**: Generally covered under fair use/fair dealing in most jurisdictions, but verify compliance with institutional policies
570
  - **Commercial Use**: Consult legal counsel regarding Microsoft binary licenses and other proprietary software