mohithackz/credential-leak-detector

GitHub: mohithackz/credential-leak-detector

面向任意域名的自动化凭据泄露检测工具,整合邮箱采集、泄露数据库查询和暗网搜索,输出带威胁等级的 JSON 报告。

Stars: 0 | Forks: 0

# 🔓 凭据泄露检测器 ## 🎯 功能介绍 该工具可自动化整个凭据泄露检测流程: ``` Domain (e.g., example.com) │ ▼ ┌──────────────────────────────────┐ │ Phase 1: Email Harvesting │ ← theHarvester │ Passive OSINT to find emails │ └──────────────┬───────────────────┘ │ emails found ▼ ┌──────────────────────────────────┐ │ Phase 2: Breach Detection │ ← SpiderFoot │ Check emails against breach DBs │ └──────────────┬───────────────────┘ │ breach data ▼ ┌──────────────────────────────────┐ │ Phase 3: Dark Web Investigation │ ← Darkdump + Tor │ Search .onion sites for leaks │ └──────────────┬───────────────────┘ │ ▼ ┌──────────────────────────────────┐ │ 📊 JSON Report │ │ Emails + Breaches + Dark Web │ │ Threat Level Assessment │ └──────────────────────────────────┘ ``` ## ⚡ 快速开始 ``` # Clone 仓库 git clone https://github.com/mohithackz/credential-leak-detector.git cd credential-leak-detector # 运行 setup(创建 venv,安装 dependencies) chmod +x setup.sh ./setup.sh # 激活 virtual environment source venv/bin/activate # 启动 Tor(用于 dark web 扫描) sudo service tor start # 运行该 tool python3 main.py ``` ## 🛠️ 前置条件 | 工具 | 用途 | 安装 | |------|---------|---------| | **Python 3.8+** | 运行环境 | `sudo apt install python3 python3-pip python3-venv` | | **theHarvester** | 邮箱发现 | `sudo apt install theharvester` | | **SpiderFoot** | 泄露检测 | `pip3 install spiderfoot` | | **Tor** | 暗网路由 | `sudo apt install tor` | | **Darkdump** | 暗网搜索 | 由 `setup.sh` 自动安装 | ## 📁 项目结构 ``` credential-leak-detector/ ├── main.py # Entry point — run this ├── modules/ │ ├── env_check.py # Auto-detects installed tools │ ├── __init__.py # Makes the folder a Python module │ ├── harvester.py # theHarvester wrapper │ ├── spiderfoot_scan.py # SpiderFoot breach scanner │ ├── darkdump_scan.py # Dark web scanner via Tor │ └── report_generator.py # JSON report builder ├── tools/ │ └── darkdump/ # Darkdump (auto-cloned by setup.sh) ├── config/ │ └── api_keys.json # Optional API keys ├── output/ # Scan results saved here ├── setup.sh # One-command setup ├── requirements.txt # Python dependencies ├── LICENSE # MIT License └── README.md # You are here ``` ## 📊 输出示例 该工具会生成如下的 JSON 报告: ``` { "scan_info": { "tool": "Credential Leak Detector", "domain": "example.com", "timestamp": "2026-04-28T23:30:00", "duration_seconds": 145.2 }, "summary": { "emails_harvested": 12, "breach_sources_found": 3, "darkweb_mentions": 2, "threat_level": "HIGH", "critical_breaches": true }, "results": [ { "email": "admin@example.com", "breaches": { "sources": ["cit0day.in", "collection-1"], "count": 2, "is_critical": true }, "darkweb": { "mentions": [...], "count": 1 } } ] } ``` **威胁等级:** - 🔴 `CRITICAL` — 在已知的大型泄露数据库中发现凭据 - 🔴 `HIGH` — 检测到泄露来源或暗网提及 - 🟡 `MEDIUM` — 发现邮箱但未检测到泄露 - 🟢 `LOW` — 未发现邮箱,仅执行了域名扫描 - ⚪ `NONE` — 扫描完成,未发现任何内容 ## 🔧 工作原理 ### 阶段 1:邮箱收集 使用 **theHarvester** 被动发现与目标域名关联的邮箱地址。来源包括 Bing、DuckDuckGo、crt.sh 和 VirusTotal。 ### 阶段 2:泄露检测 提取已发现的邮箱,并使用专注于泄露检测的模块(Citadel、HaveIBeenPwned、LeakIX)通过 **SpiderFoot** 对其进行扫描。识别哪些邮箱出现在已知的数据泄露事件中。 ### 阶段 3:暗网调查 通过 **Tor** 路由查询,并使用 **Darkdump** 搜索 `.onion` 站点,查找任何关于目标邮箱或域名的提及。 ### 报告生成 将所有发现汇总到一个带有威胁等级评估的 JSON 报告中。 ## ⚠️ 免责声明 此工具仅用于**教育和授权的安全测试目的**。 - 仅扫描您拥有或已获得明确测试权限的域名 - 作者不对本工具的任何滥用行为负责 - 请始终遵守适用的法律法规和道德准则 ## 🧠 展示技能 - **OSINT (开源情报)** — 被动侦察 - **Python 自动化** — 多工具流水线编排 - **网络安全** — 泄露检测,暗网监控 - **Tor 网络** — 用于暗网访问的匿名路由 - **模块化设计** — 简洁、可扩展的代码架构 - **并行处理** — 使用 ThreadPoolExecutor 进行并发扫描 ## 📜 许可证 MIT 许可证 — 详见 [LICENSE](LICENSE)。
标签:Darkdump, ESC4, IP 地址批量处理, JSON报告, OSINT, Python, SpiderFoot, theHarvester, Tor, 凭证泄露, 域名安全, 威胁情报, 实时处理, 开发者工具, 数据展示, 数据泄露, 无后门, 暗网, 红队, 网络安全, 网络调试, 自动化, 逆向工具, 邮箱收集, 隐私保护, 黑盒测试