IMPORTANT: This repo is fully vibe coded.
Automated threat-intelligence feed aggregator that generates Clash / Mihomo rule-sets, YARA rules, and MalwareBazaar SHA-256 block-lists — updated automatically every 2 hours via GitHub Actions.
- Domain & IP blocklists for Clash / Mihomo in
clash/generated/ - YARA rules for network IOCs in
yara/ - MalwareBazaar SHA-256 hashes in
intel/ - Build statistics in
meta/stats.json - IOC retention window (default 360 days) to prevent short-term feed dropouts from immediately removing active indicators
- Automatic allowlisting via
inputs/allowlist_domains.txtandinputs/allowlist_ips.txt - Optional manual PUA entries via
inputs/pua.manual.txt - Optional VirusTotal enrichment for additional confidence scoring
| Category | File | Description |
|---|---|---|
malware |
clash/generated/malware.txt |
General malware domains & IPs (URLhaus + ThreatFox) |
pua |
clash/generated/pua.txt |
Potentially Unwanted Applications |
privacy |
clash/generated/privacy.txt |
Tracking & telemetry domains |
ads |
clash/generated/ads.txt |
Advertising domains |
Enable by setting ENABLE_ALL_CATEGORIES = true in clash/merge-ti.js.
| Category | File | Examples |
|---|---|---|
stealer |
stealer.txt |
RedLine, Lumma, Vidar, StealC, Raccoon |
ransomware |
ransomware.txt |
LockBit, BlackCat, Clop, Ryuk, STOP/Djvu |
c2 |
c2.txt |
CobaltStrike, Sliver, BruteRatel, Havoc |
rat |
rat.txt |
AsyncRAT, Remcos, njRAT, QuasarRAT, XWorm |
botnet |
botnet.txt |
Emotet, QakBot, BumbleBee, PikaBot |
backdoor |
backdoor.txt |
ShadowPad, BPFDoor, Winnti |
miner |
miner.txt |
XMRig, CoinMiner |
loader |
loader.txt |
GuLoader, GootLoader, Latrodectus, FakeBat |
banker |
banker.txt |
ZLoader, DanaBot, Grandoreiro, SharkBot |
keylogger |
keylogger.txt |
AgentTesla, FormBook, SnakeKeylogger |
rootkit |
rootkit.txt |
Rootkits & bootkits |
worm |
worm.txt |
RaspberryRobin |
exploit |
exploit.txt |
Exploit kits |
phishing |
phishing.txt |
Phishing & credential harvesting |
Copy the contents of clash/merge-ti.js into the Merge script field of Clash Party or any Clash Meta frontend that supports merge scripts.
The script will:
- Register a
rule-providerfor each enabled category (auto-updated every 15 minutes). - Create a
proxy-groupfor each category so you can choose how to handle blocked traffic (REJECTorDIRECT). - Insert the corresponding
RULE-SETrules before theMATCHcatch-all.
To enable all 14 granular threat categories, open clash/merge-ti.js and change:
const ENABLE_ALL_CATEGORIES = false;
// → change to:
const ENABLE_ALL_CATEGORIES = true;Reference the raw rule files directly in your Clash / Mihomo configuration:
rule-providers:
ti-malware:
type: http
behavior: classical
format: text
url: "https://raw.githubusercontent.com/Fadouse/clash-threat-intel/main/clash/generated/malware.txt"
path: ./ruleset/ti-malware.txt
interval: 900
ti-ads:
type: http
behavior: classical
format: text
url: "https://raw.githubusercontent.com/Fadouse/clash-threat-intel/main/clash/generated/ads.txt"
path: ./ruleset/ti-ads.txt
interval: 900
rules:
- RULE-SET,ti-malware,REJECT
- RULE-SET,ti-ads,REJECT
- MATCH,DIRECT| Source | Feed | Categories |
|---|---|---|
| URLhaus | Host-file & text feed | malware |
| ThreatFox | IOC API (last 3 days, confidence ≥ 90) | malware + all granular types |
| MalwareBazaar | Recent SHA-256 export | SHA-256 intel |
| Blocklistproject | ads.txt, tracking.txt |
ads, privacy |
| PUP filter | DNSCrypt blocked-names list (optional) | pua |
| VirusTotal | Domain/IP enrichment (optional) | malware + granular types |
The build pipeline is controlled by environment variables (set in the GitHub Actions workflow or locally):
| Variable | Default | Description |
|---|---|---|
THREATFOX_AUTH_KEY |
(empty) | ThreatFox API key (required for IOC lookups) |
THREATFOX_DAYS |
3 |
How many days of ThreatFox IOCs to fetch |
THREATFOX_CONFIDENCE |
90 |
Minimum confidence score (0–100) to include a ThreatFox IOC |
VT_API_KEY |
(empty) | VirusTotal API key (optional enrichment) |
VT_ENRICH_LIMIT |
20 |
Maximum number of IOCs to enrich per run |
VT_MIN_SCORE |
5 |
Minimum VirusTotal detection count to include an IOC |
PUP_FILTER_URL |
(empty) | URL of a PUP/adware DNSCrypt block-list for the pua category |
IOC_RETENTION_DAYS |
360 |
Keep IOCs seen within this many days; older items are purged |
Files in inputs/ are committed to the repository and let you fine-tune the pipeline without code changes:
| File | Purpose |
|---|---|
inputs/allowlist_domains.txt |
Domains that will never be blocked (one per line) |
inputs/allowlist_ips.txt |
IP addresses that will never be blocked (one per line) |
inputs/pua.manual.txt |
Extra PUA domains to add to the pua category (one per line) |
Lines beginning with # are treated as comments and ignored.
# No external dependencies required — pure Python stdlib
THREATFOX_AUTH_KEY=<your-key> \
THREATFOX_DAYS=3 \
THREATFOX_CONFIDENCE=90 \
python scripts/build_ti.pyGenerated files are written to:
clash/generated/— Clash rule-set text filesyara/network_iocs_auto.yar— YARA rule fileintel/malwarebazaar_recent_sha256.txt— MalwareBazaar SHA-256 hashesmeta/stats.json— Build statisticsmeta/ioc_history.json— IOC last-seen cache used for retention / anti-flap behavior
Retention behavior:
- If an IOC is observed again, it remains and its
last_seentimestamp is refreshed. - If an IOC temporarily disappears from upstream feeds, it is kept until it has not been seen for more than
IOC_RETENTION_DAYS. - Duplicate entries are automatically deduplicated via set-based aggregation.
┌─────────────────────────────────────────────────────────────────────┐
│ build_ti.py │
│ │
│ URLhaus hostfile ──┐ │
│ URLhaus text ──┤ │
│ ThreatFox API ──┼──► categorise ──► deduplicate │
│ BlocklistProject ──┤ ──► allowlist filter │
│ PUP filter ──┘ ──► write rule-set files │
│ │
│ MalwareBazaar SHA-256 ──► intel/ │
│ (VT enrichment optional) │
│ Network IOCs ──► YARA rules ──► yara/ │
└─────────────────────────────────────────────────────────────────────┘
│
▼ (GitHub Actions: every 2 hours)
clash/generated/*.txt meta/stats.json
│
▼ (merge-ti.js in Clash client)
rule-providers + proxy-groups injected into running config
This project is licensed under the GNU General Public License v3.0.
Intelligence data is provided by third-party feeds under their respective terms of service. See each source's website for details.