Reproducible synthetic multilingual threat-intelligence datasets (EN/RU/ZH/DE) with risk labels and ground-truth IOCs. By Muhammed Shazin Sadhik Kunhi Parambath.
Project description
synthreat
Reproducible synthetic threat-intelligence datasets, in four languages — by Muhammed Shazin Sadhik Kunhi Parambath.
Labeled multilingual security-text corpora barely exist. synthreat generates
them on demand: threat-intel sentences in English, Russian, Chinese, and
German, each tagged with a risk label (CRITICAL / HIGH / MEDIUM /
LOW), named entities, and — optionally — ground-truth indicators of
compromise. Seed it and the output is byte-for-byte reproducible.
import synthreat
ds = synthreat.generate(samples_per_language=1000, seed=42, inject_iocs=0.3)
len(ds) # 4000
ds.stats() # {'by_language': {...}, 'by_label': {...}, 'with_iocs': ~1200}
ds.save("threats.jsonl")
Zero runtime dependencies — pure Python.
pip install synthreat
Why it's different
Most synthetic-data tools are generic (faker, mimesis) and know nothing
about security text. synthreat is purpose-built for threat intelligence, and
it's multilingual by construction — not English translated after the fact.
Because injected IOCs are known at generation time, every enriched sample
carries its indicators as ground truth, so the same dataset benchmarks both
a risk classifier and an IOC extractor.
Ground-truth IOCs
With inject_iocs, a fraction of samples get a synthetic IP / email / SHA-256 /
CVE embedded in the text and recorded on the sample:
ds = synthreat.generate(samples_per_language=10, seed=1, inject_iocs=1.0)
s = ds[0]
s.text # "...LEAKED... Contact admin@example.com; C2 at 192.0.2.77; sample 9f...; ref CVE-2021-4242."
s.iocs # {'ipv4': ['192.0.2.77'], 'email': ['admin@example.com'], 'sha256': ['9f...'], 'cve': ['CVE-2021-4242']}
Every value is synthetic and safe: IPs come from RFC 5737 documentation ranges and domains from RFC 2606 reserved names, so nothing resolves to a real host.
Pairs with osintlens
synthreat produces training/eval data in the exact shape osintlens consumes:
from synthreat import generate
from osintlens.ml import train
ds = generate(samples_per_language=2000, seed=0)
train(ds.as_training_data(), output_path="risk_model.joblib")
And with IOC injection you can measure extractor recall directly, comparing
osintlens.extract_iocs(sample.text) against sample.iocs.
Customize
from synthreat import ThreatDataGenerator
gen = ThreatDataGenerator(
seed=7,
languages=["en", "de"],
inject_iocs=0.5,
vocab_overrides={"ACTORS": {"en": ["MyActor"], "de": ["MeinAkteur"]}},
)
ds = gen.generate(
samples_per_language=500,
distribution={"CRITICAL": 0.25, "HIGH": 0.25, "MEDIUM": 0.25, "LOW": 0.25},
)
Command line
synthreat generate -n 5000 --seed 42 -o threats.jsonl
synthreat generate -n 100 --languages en ru --inject-iocs 0.4 --format json
cat <(synthreat generate -n 10 --seed 1) # prints JSON to stdout
Output schema
Each sample:
{
"text": "LEAKED: database dump - Fortune 500 company admin credentials exposed",
"label": "CRITICAL",
"language": "en",
"entities": [{"text": "LockBit", "type": "ORG"}, {"text": "Fortune 500 company", "type": "ORG"}],
"iocs": {}
}
A note on use
The data is fabricated for training, testing, and benchmarking. It is not real intelligence and should never be presented as genuine threat reporting.
Author
Created and maintained by Muhammed Shazin Sadhik Kunhi Parambath.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synthreat-0.1.1.tar.gz.
File metadata
- Download URL: synthreat-0.1.1.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
289f6ae6908b44be8343afea4f60eddda47944d16ce78159086e11028c045e22
|
|
| MD5 |
c17ed8321b90373c09642d28d6c2327d
|
|
| BLAKE2b-256 |
fe51a3e3241d069b9b7e1cd8e3c6afcf06ac02a8f559547b9c369c6a0ded01a1
|
Provenance
The following attestation bundles were made for synthreat-0.1.1.tar.gz:
Publisher:
publish-packages.yml on shaz-in-dev/intel-platform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synthreat-0.1.1.tar.gz -
Subject digest:
289f6ae6908b44be8343afea4f60eddda47944d16ce78159086e11028c045e22 - Sigstore transparency entry: 2166697223
- Sigstore integration time:
-
Permalink:
shaz-in-dev/intel-platform@1f166346a4699e8cefe690faf866614b702d538c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shaz-in-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-packages.yml@1f166346a4699e8cefe690faf866614b702d538c -
Trigger Event:
push
-
Statement type:
File details
Details for the file synthreat-0.1.1-py3-none-any.whl.
File metadata
- Download URL: synthreat-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd7bba142a7a265f67a6e3fa4274c0861a6a353d5b6fe021dc8e079c6bd8147c
|
|
| MD5 |
84d905fd3faf8faea76e6ff0e5251397
|
|
| BLAKE2b-256 |
5191313f0a94a1f95a3ca0519a3e55ebc9d8236a34cac5c04fc9e7fa176167f6
|
Provenance
The following attestation bundles were made for synthreat-0.1.1-py3-none-any.whl:
Publisher:
publish-packages.yml on shaz-in-dev/intel-platform
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synthreat-0.1.1-py3-none-any.whl -
Subject digest:
cd7bba142a7a265f67a6e3fa4274c0861a6a353d5b6fe021dc8e079c6bd8147c - Sigstore transparency entry: 2166697230
- Sigstore integration time:
-
Permalink:
shaz-in-dev/intel-platform@1f166346a4699e8cefe690faf866614b702d538c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shaz-in-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-packages.yml@1f166346a4699e8cefe690faf866614b702d538c -
Trigger Event:
push
-
Statement type: