comp agent
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,74 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
# CompRealVul_Bin Dataset
|
| 5 |
+
|
| 6 |
+
[](https://huggingface.co/datasets/compAgent/CompRealVul_Bin)
|
| 7 |
+
|
| 8 |
+
## Dataset Summary
|
| 9 |
+
|
| 10 |
+
**CompRealVul_Bin** is a **binary-level dataset** derived from the [CompRealVul_C](https://huggingface.co/datasets/compAgent/CompRealVul_C) dataset, designed for training and evaluating machine learning models on **vulnerability detection in compiled binaries**. This dataset contains **cross-compiled `.exe` binaries** corresponding to each C function in the source dataset, packaged as a single `.zip` archive.
|
| 11 |
+
|
| 12 |
+
The dataset bridges the gap between source-level vulnerability datasets and practical binary-level learning pipelines.
|
| 13 |
+
|
| 14 |
+
## Key Features
|
| 15 |
+
|
| 16 |
+
- ✅ **Cross-compiled `.exe` binaries** (Windows format) for each function
|
| 17 |
+
- ✅ Matches samples from the original `CompRealVul` dataset
|
| 18 |
+
- ✅ Labeled with **vulnerability information** (CWE ID and binary class label)
|
| 19 |
+
- ✅ Suitable for binary-focused tasks such as **vulnerability detection**, **similarity learning**, and **binary classification**
|
| 20 |
+
- ✅ Provided as a **ZIP archive** for efficient download and storage
|
| 21 |
+
|
| 22 |
+
## Dataset Structure
|
| 23 |
+
|
| 24 |
+
- `CompRealVul_Bin.zip`: Contains all compiled `.exe` binary files
|
| 25 |
+
- `metadata.csv`: Metadata file with the following fields:
|
| 26 |
+
|
| 27 |
+
| Column | Description |
|
| 28 |
+
|-----------------|-----------------------------------------------------------------------------|
|
| 29 |
+
| `name` | Identifier of the function (matches CompRealVul) |
|
| 30 |
+
| `binary_path` | Relative path to the `.exe` file inside the ZIP archive |
|
| 31 |
+
| `cwe` | CWE identifier for the vulnerability (or `-1` if unknown or non-vulnerable) |
|
| 32 |
+
| `target` | Vulnerability label (`1.0` = vulnerable, `0.0` = non-vulnerable) |
|
| 33 |
+
| `split` | Dataset split (currently only `train`) |
|
| 34 |
+
|
| 35 |
+
**Example:**
|
| 36 |
+
```csv
|
| 37 |
+
name,binary_path,cwe,target,split
|
| 38 |
+
func_123,bin/func_123.exe,CWE-120,1.0,train
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## Usage
|
| 42 |
+
|
| 43 |
+
You can load the dataset directly using the `datasets` library from Hugging Face:
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
import pandas as pd
|
| 47 |
+
import zipfile
|
| 48 |
+
|
| 49 |
+
# Load metadata
|
| 50 |
+
df = pd.read_csv("metadata.csv")
|
| 51 |
+
|
| 52 |
+
# Access the ZIP archive
|
| 53 |
+
with zipfile.ZipFile("CompRealVul_Bin.zip", "r") as zip_ref:
|
| 54 |
+
# Extract a specific binary
|
| 55 |
+
binary_path = df.iloc[0]["binary_path"]
|
| 56 |
+
zip_ref.extract(binary_path, "extracted_binaries/")
|
| 57 |
+
|
| 58 |
+
# Read binary data
|
| 59 |
+
with open(f"extracted_binaries/{binary_path}", "rb") as f:
|
| 60 |
+
binary_data = f.read()
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
## License
|
| 64 |
+
This dataset is released under the Apache 2.0 License.
|
| 65 |
+
|
| 66 |
+
## Citation
|
| 67 |
+
```cite
|
| 68 |
+
@misc{comprealvul_bin,
|
| 69 |
+
author = {comp agent},
|
| 70 |
+
title = {CompRealVul_Bin: A Binary Dataset for Vulnerability Detection},
|
| 71 |
+
howpublished = {\url{https://huggingface.co/datasets/compAgent/CompRealVul_Bin}},
|
| 72 |
+
year = {2025}
|
| 73 |
+
}
|
| 74 |
+
```
|