Saumy02/Domain_Threat_Intelligence_System-DTIS-

GitHub: Saumy02/Domain_Threat_Intelligence_System-DTIS-

一款基于五层分类引擎的域名威胁情报系统,能够对海量域名进行自动化安全分类、威胁打标和关键词发现,并提供实时Web可视化仪表盘。

Stars: 0 | Forks: 0

# 🛡️ 域名威胁情报系统 (DTIS)
![Version](https://img.shields.io/badge/Version-4.0%20Pro-blueviolet?style=for-the-badge) ![Python](https://img.shields.io/badge/Python-3.10%2B-blue?style=for-the-badge&logo=python) ![Framework](https://img.shields.io/badge/Framework-Flask%20%2F%20SSE-green?style=for-the-badge&logo=flask) ![Security](https://img.shields.io/badge/Security-DoH%20%2F%20Threat%20Intel-red?style=for-the-badge) ![License](https://img.shields.io/badge/Developer-Sam%20(Demon)-00ff41?style=for-the-badge) **一款高性能、多层次的威胁情报、域名分类和关键词发现引擎,配备高级网络安全 Web 仪表板。**
## 🚀 系统概述 **域名威胁情报系统 (DTIS)** 是一款先进的安全套件,旨在接收、分类、分析和丰富大量的域名或 URL 列表。它利用高速的 **5 层分类 Pipeline**,采用模糊逻辑、DNS 遥测 (Cloudflare DoH) 以及可选的 LLM 后备机制,将域名精确无误地归类为基于功能和威胁的类别(例如:*钓鱼、恶意软件、成人内容、金融、政府*)。 ### ⚡ 作者与完整性信息 ## 🎨 仪表板预览 以下是 DTIS 控制面板和分析仪表板的视觉概览。 ``` ┌────────────────────────────────────────────────────────────────────────┐ │ 🛡️ DOMAIN THREAT INTELLIGENCE SYSTEM [ONLINE] │ ├────────────────────────────────────────────────────────────────────────┤ │ [⚡ CLASSIFY DOMAINS] [🔍 DISCOVER BY KEYWORD] [🌍 CATEGORY EXPLORER] │ ├────────────────────────────────────────────────────────────────────────┤ │ ┌───────────────────────┐ ┌────────────────────────────────────────┐ │ │ │ ⚙️ CONTROL PANEL │ │ 💻 LIVE INTEGRITY ENGINE LOGS │ │ │ │ │ │ │ │ │ │ File: [my_domains.csv]│ │ [SCAN] Initiating scan on 10,000... │ │ │ │ Fuzzy Limit: [ 72 ] │ │ [SYS] Loading category keywords... │ │ │ │ DNS Telemetry: [ ON ] │ │ [DoH] Cloudflare Secure Shield active │ │ │ │ LLM Fallback: [ ON ] │ │ [LIVE] Checked: secure-login-web.in │ │ │ │ │ │ │ │ │ │ [ INITIATE SCAN ] │ │ Speed: 1,450/sec Processed: 48% │ │ │ └───────────────────────┘ └────────────────────────────────────────┘ │ │ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ 📊 ANALYTICS & THREAT BREAKDOWN │ │ │ │ TOTAL DOMAINS: 10,000 | THREAT SCORE: 84/100 [CRITICAL] │ │ │ │ Categories Hit: 14 | Avg Confidence: 94.2% │ │ │ └───────────────────────────────────────────────────────────────────┘ │ └────────────────────────────────────────────────────────────────────────┘ ``` ![DTIS Dashboard Screenshot](https://raw.githubusercontent.com/Saumy02/Domain_Threat_Intelligence_System-DTIS-/main/assets/dashboard.png) ## 🛠️ 核心功能 * **5 层分类引擎**:包含从确定性 TLD 映射到模糊匹配、DNS 查询记录和生成式 AI 分析的后备层级体系。 * **实时 Web UI**:完全响应式的赛博朋克控制台风格、详细的日志控制台、动态进度遥测以及自动刷新的 Chart.js 可视化图表。 * **主动 DNS 覆盖 (DoH)**:查询 Cloudflare 安全 DoH (`security.cloudflare-dns.com`) 和家庭版 DoH (`family.cloudflare-dns.com`),以自动标记已知的恶意软件分发点、钓鱼网站和成人内容。 * **针对性关键词发现**:旨在扫描被动 DNS 数据库、WAYBACK 索引、SSL 证书日志 (`crt.sh`) 和 RapidDNS 以发现包含自定义关键词的活跃域名的子系统。 * **自动关键词丰富器**:类似于机器学习的反馈循环,从已分类的域名中提取新的、高置信度的关键词,并将其保存回数据库。 * **批量导出与多线程**:快速的 CSV 生成和按类别划分的独立文本输出,动态打包成一个统一的 `.zip` 下载文件。 ## 🧬 分类 Pipeline 架构 ``` graph TD A[Input Domain / URL List] --> B[Layer 1: TLD Heuristics] B -- Match (e.g., .gov, .edu) --> H[Classified: 100% Confidence] B -- No Match --> C[Layer 2: Scored Token Matching] C -- High Confidence Match --> H C -- Low/No Match --> D[Layer 3: Weighted Fuzzy Matching] D -- Score >= Threshold --> H D -- Score < Threshold --> E{DNS Telemetry Enabled?} E -- Yes --> F[Layer 4: Cloudflare DoH Security Check] F -- Threat Blocked (Malware/Adult) --> H F -- No Threat Signature --> G{LLM Fallback Enabled?} E -- No --> G G -- Yes --> I[Layer 5: Claude LLM Classifier] G -- No --> J[Marked as "Other" / Unclassified] I --> H J --> H H --> K[Output: Category + Score + Method Breakdown] ``` ## 📁 仓库结构 ``` Domain-Threat-Intelligence-System/ ├── assets/ │ └── dashboard.png # Put your UI screenshot here ├── templates/ │ └── index.html # Cyberpunk Web Frontend UI ├── app.py # Flask SSE Streaming Server & Backend ├── domain_classifier_pro.py # Core 5-Layer Classifier Module ├── domain_discovery.py # Passive DNS & SSL Scan Engine ├── category_explorer.py # Target Category Website Explorer ├── keyword_auto_enricher.py # Automated Keyword Extractor ├── category_keywords_enhanced_v3.json # Keyword Database ├── category_seeds.json # Manually curated starting seeds ├── requirements.txt # Python Library Dependencies └── README.md # Documentation (This file) ``` ## ⚡ 快速入门指南 ### 1. 设置虚拟环境 为了避免与系统级别的包管理器发生冲突,本项目配置为在本地 Python 虚拟环境 (`venv/`) 中运行。 ``` # 克隆 repository 并导航到该目录 cd "URL Categories" # 安装所有必需的 Python 包 venv/bin/pip install -r requirements.txt ``` ### 2. 启动 Web 服务器 启动 Flask 后端服务器: ``` venv/bin/python app.py ``` 一旦运行起来,打开你的 Web 浏览器并访问: 👉 **[http://localhost:5000](http://localhost:5000)** ## 💻 CLI 用法 (无头模式) 如果你希望直接通过终端执行分类或发现任务: ``` # 在 dataset 上进行基本分类 python domain_classifier_pro.py my_domains.csv # 针对特定 TLD 对结果进行分类和过滤 python domain_classifier_pro.py domains.xlsx --tld .in --output results/ # 启用 DNS telemetry 和 LLM fallback 运行分类 export ANTHROPIC_API_KEY="your-anthropic-key-here" python domain_classifier_pro.py domains.csv --dns --llm # 在 crt.sh 和 Wayback engine 上运行关键字发现 python domain_discovery.py my-keyword --verify --sources crtsh wayback ``` ## 🛡️ 许可证与鸣谢 本软件由 **Sam (Demon)** 开发并发布。保留所有权利。 嵌入在 UI 模板、JavaScript 事件观察器和 Python 启动验证 daemon 内部的签名标签 `made by Sam (Demon)` 代表具有约束力的代码完整性块。移除或替换这些签名将违反开发者署名条件,并导致软件停止运行。
标签:DNS解析, Flask, Python, Web仪表盘, 域名分类, 威胁情报, 开发者工具, 开源项目, 恶意活动检测, 无后门, 逆向工具