The dataset viewer is not available for this split.
Error code: FeaturesError Exception: ArrowInvalid Message: JSON parse error: Invalid value. in row 91 Traceback: Traceback (most recent call last): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 160, in _generate_tables df = pandas_read_json(f) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 38, in pandas_read_json return pd.read_json(path_or_buf, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 815, in read_json return json_reader.read() File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1025, in read obj = self._get_object_parser(self.data) File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1051, in _get_object_parser obj = FrameParser(json, **kwargs).parse() File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1187, in parse self._parse() File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1403, in _parse ujson_loads(json, precise_float=self.precise_float), dtype=None ValueError: Trailing data During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 228, in compute_first_rows_from_streaming_response iterable_dataset = iterable_dataset._resolve_features() File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 3357, in _resolve_features features = _infer_features_from_batch(self.with_format(None)._head()) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 2111, in _head return next(iter(self.iter(batch_size=n))) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 2315, in iter for key, example in iterator: File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1856, in __iter__ for key, pa_table in self._iter_arrow(): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1878, in _iter_arrow yield from self.ex_iterable._iter_arrow() File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 476, in _iter_arrow for key, pa_table in iterator: File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 323, in _iter_arrow for key, pa_table in self.generate_tables_fn(**gen_kwags): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 163, in _generate_tables raise e File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 137, in _generate_tables pa_table = paj.read_json( File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: JSON parse error: Invalid value. in row 91
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YARA Rules Dataset for Ransomware Detection and Benign Software Classification Overview This dataset contains 700 YARA rules (R001–R700) designed for detecting ransomware variants and identifying benign software. It is curated for cybersecurity professionals, machine learning (ML) engineers, and data scientists to support threat detection, malware analysis, and ML model training for binary classification (malicious vs. benign). The dataset balances 350 malicious rules targeting ransomware and 350 benign rules for common software, ensuring robust training data. Dataset Structure The dataset is provided in JSONL format (yara_rules_dataset.jsonl), with each entry representing a single YARA rule. The fields are:
rule_id: Unique identifier (e.g., R001, R002, ..., R700).
rule_name: Descriptive name (e.g., WannaCry2, Benign_Nagios).
rule_text: YARA rule with metadata, strings, and conditions.
category: Type (Ransomware or Benign).
label: Classification (malicious or benign).
severity: Risk level (critical for ransomware, none for benign).
target_os: Affected platforms (Windows for ransomware, Linux for benign).
hash: Unique sample hash for reference.
Example Entry
{"rule_id": "R621", "rule_name": "Rakhni2", "rule_text": "rule Rakhni2 { meta: description = \"Detects Rakhni ransomware variant\" author = \"CyberSecTeam\" date = \"2032-03-10\" strings: $s1 = \"rakhni2\" nocase $s2 = \"ransom_v51\" condition: $s1 or $s2 }", "category": "Ransomware", "label": "malicious", "severity": "critical", "target_os": ["Windows"], "hash": "w1x2y3z4a5b6c7d8e9f0"}
Features
Malicious Rules: 350 rules targeting ransomware variants (e.g., WannaCry, Ryuk, Conti, LockBit) based on real-world TTPs from MITRE ATT&CK, CrowdStrike, and FireEye. Benign Rules: 350 rules for common Linux tools (e.g., Nagios, Grafana, Htop) to reduce false positives in ML models. YARA Syntax: Rules use case-insensitive (nocase) string matching, simple conditions (or for malicious, and for benign), and consistent metadata. ML Compatibility: Balanced labels and structured JSONL format for training binary classifiers. Platforms: Malicious rules target Windows; benign rules target Linux.
Use Cases
Threat Detection: Deploy YARA rules in SIEM or EDR systems for ransomware detection. ML/AI Training: Use as a labeled dataset for training supervised models to classify malicious vs. benign files. Pentesting: Validate detection capabilities in red team exercises. Malware Analysis: Study ransomware signatures and benign software patterns.
Install dependencies (e.g., YARA):sudo apt-get install yara
Parse the JSONL file using Python:
import json
with open('yara_rules_dataset.jsonl', 'r') as f:
rules = [json.loads(line) for line in f]
Usage
Running YARA Rules Compile and scan files with YARA:
yara -r rules.yar target_directory
To extract rules from JSONL: import json with open('yara_rules_dataset.jsonl', 'r') as f, open('rules.yar', 'w') as out: for line in f: rule = json.loads(line) out.write(rule['rule_text'] + '\n')
ML Training Use the dataset to train a binary classifier:
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
# Load dataset
df = pd.read_json('yara_rules_dataset.jsonl', lines=True)
# Extract features (e.g., rule_text) and labels
X = df['rule_text'] # Feature engineering needed
y = df['label'].map({'malicious': 1, 'benign': 0})
# Split data
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Train model (example)
model = RandomForestClassifier()
# model.fit(X_train, y_train) # Requires feature extraction
Sources
MITRE ATT&CK: https://attack.mitre.org CrowdStrike Adversary Universe: https://www.crowdstrike.com FireEye Threat Research: https://www.fireeye.com CISA Alerts: https://www.cisa.gov YARA Rules Repository: https://github.com/Yara-Rules/rules Kaspersky APT Reports: https://securelist.com Trend Micro Research: https://www.trendmicro.com
Contributing We welcome contributions to expand the dataset or improve rules. To contribute:
Fork the repository. Add new YARA rules in JSONL format, ensuring unique rule_id and valid syntax. Submit a pull request with a clear description of changes.
Please adhere to the following:
Validate YARA rules with yara -C rules.yar. Ensure balanced malicious/benign entries. Cite sources for new rules.
License This dataset is licensed under the MIT License. See LICENSE for details. Contact For issues or inquiries, open a GitHub issue or contact [email protected]
Last updated: June 8, 2025
- Downloads last month
- 16