Wizbisy/twilight-orbit

GitHub: Wizbisy/twilight-orbit

一款模块化的自动化 OSINT 侦察工具,通过多源情报和并行模块快速发现目标域名的隐藏资产与威胁信息。

Stars: 0 | Forks: 0

# 🌑 Twilight Orbit ### 自动化 OSINT 侦察工具 | 洞察隐匿于阴影之中 [![Python 3.10+](https://img.shields.io/badge/Python-3.10%2B-blue?style=for-the-badge&logo=python&logoColor=white)](https://python.org) [![License: MIT](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen?style=for-the-badge)](CONTRIBUTING.md) [![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey?style=for-the-badge)](#) 一款功能强大、模块化的 OSINT 侦察工具,专为 Bug Bounty 猎人和安全研究人员设计。 由**真实的免费 API** 驱动:AlienVault OTX、URLScan.io、Internet Archive、ThreatFox、Shodan、SecurityTrails 等。🔍 *(ASCII Art placeholder)* ``` ████████╗██╗ ██╗██╗██╗ ██╗ ██████╗ ██╗ ██╗████████╗ ╚══██╔══╝██║ ██║██║██║ ██║██╔════╝ ██║ ██║╚══██╔══╝ ██║ ██║ █╗ ██║██║██║ ██║██║ ███╗███████║ ██║ ██║ ██║███╗██║██║██║ ██║██║ ██║██╔══██║ ██║ ██║ ╚███╔███╔╝██║███████╗██║╚██████╔╝██║ ██║ ██║ ╚═╝ ╚══╝╚══╝ ╚═╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ██████╗ ██████╗ ██████╗ ██╗████████╗ ██╔═══██╗██╔══██╗██╔══██╗██║╚══██╔══╝ ██║ ██║██████╔╝██████╔╝██║ ██║ ██║ ██║██╔══██╗██╔══██╗██║ ██║ ╚██████╔╝██║ ██║██████╔╝██║ ██║ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ ```
## 📖 目录 - [功能特性](#-features) - [快速开始](#-quick-start) - [使用示例](#-usage-examples) - [可选 API Keys (加速您的扫描)](#-optional-api-keys--environmental-variables) - [输出格式](#-output-formats) - [项目架构](#%EF%B8%8F-project-architecture) - [免责声明](#%EF%B8%8F-disclaimer) ## ⚡ 功能特性 Twilight Orbit 运行 12 个并行模块,以提取关于目标的每一滴公开情报。 | 模块 | 描述 | 数据源 / 库 | |--------|------------|-------------------------| | 🔍 **DNS Lookup** | A, AAAA, MX, NS, TXT, CNAME, SOA 记录。 | `dnspython` | | 📋 **WHOIS** | 域名注册信息、注册商、日期、名称服务器、状态。 | `python-whois` | | 🌐 **Subdomains** | 通过主动暴力破解和被动证书透明度日志发现隐藏的子域名。 | `dnspython`, `crt.sh`, SecurityTrails API | | 🔓 **Port Scanner** | 针对前 100 个最常见漏洞端口的极速 TCP 连接扫描器。 | `socket` (stdlib) | | 🛡️ **HTTP Headers** | 安全头分析,包含严重性评级 (HSTS, CSP, Clickjacking, MIME-sniffing)。 | `httpx` | | 🔒 **SSL/TLS** | 证书详情、颁发者、SANs、过期日期、加密套件和协议版本。 | `ssl`, `socket` | | ⚙️ **Tech Detection** | 通过 HTTP 响应头指纹识别框架、CMS、CDN 和分析工具。 | `httpx` | | 🌍 **Geolocation** | 查找目标 IP 地址的物理位置、ISP 和 ASN。 | `ip-api.com` | | 📧 **Email Harvest** | 通过网络抓取和公共数据库发现员工和企业邮箱。 | Custom scraper, Hunter.io API | | 🕰️ **Wayback Machine** | 搜索 Internet Archive 以获取历史快照和隐藏路径。 | `archive.org` CDX API | | 🚨 **Threat Intel** | 将域名与全球威胁情报源进行交叉比对。 | AlienVault OTX, URLScan.io, ThreatFox, HackerTarget | | 🔎 **Shodan / VT** | 查询最大的网络安全数据库以获取漏洞和恶意软件信誉信息。 | Shodan, VirusTotal, AbuseIPDB | ## 🚀 快速开始 ### 1. 环境要求 - **Python 3.10+** - 适用于 **Windows**、**macOS** 和 **Linux** ### 2. 安装说明 最快的上手方式是克隆仓库并设置虚拟环境。 ``` # 克隆 repository git clone https://github.com/WIzbisy/twilight-orbit.git cd twilight-orbit # 创建 virtual environment(推荐) python -m venv venv # 激活 virtual environment # 在 Windows 上: .\venv\Scripts\activate # 在 Linux/Mac 上: source venv/bin/activate # 安装所需的 dependencies pip install -r requirements.txt ``` ## 💻 使用示例 Twilight Orbit 基于 `click` 构建,提供清晰直观的命令行接口。 ### 运行完整扫描 针对目标域名运行所有 12 个模块。 ``` python -m twilight_orbit scan example.com ``` ### 针对性扫描 只关心子域名和开放端口?使用 `--modules` (或 `-m`) 标志。 ``` python -m twilight_orbit scan example.com -m subdomains,ports,dns ``` ### 生成精美报告 Twilight Orbit 生成交互式 HTML 报告,非常适合交付给客户或 Bug Bounty 项目。 ``` # 将结果输出到 HTML 文件 python -m twilight_orbit scan example.com --output report.html # 将结果输出为机器可读的 JSON(适用于 CI/CD 或 jq 解析) python -m twilight_orbit scan example.com --output results.json ``` ### 帮助菜单 查看所有可用的命令和模块。 ``` python -m twilight_orbit --help python -m twilight_orbit modules ``` ## 🔑 可选 API Keys / 环境变量 Twilight Orbit **开箱即用,零配置**即可执行高效的侦察。 但是,您可以通过为付费(但提供免费层级)服务提供 API Keys 来增强模块功能。 Twilight Orbit 使用 `python-dotenv` 自动加载密钥。在根目录下创建一个如下所示的 `.env` 文件: ``` # ─── Threat Intelligence ────────────────────────────────────────── # 增强 port scanner 并检查已知的 CVE SHODAN_API_KEY=your_shodan_key_here # 通过 70 多个 antivirus 引擎检查目标 VIRUSTOTAL_API_KEY=your_vt_key_here # 检查目标 IP 是否被报告为恶意活动 ABUSEIPDB_API_KEY=your_abuseipdb_key_here # ─── Recon Enhancements ───────────────────────────────────────── # 从 Hunter 的海量企业 email 数据库中提取 HUNTER_API_KEY=your_hunter_key_here # 从 DNS 历史记录中提取数千个历史 subdomain SECURITYTRAILS_API_KEY=your_securitytrails_key_here ``` **获取免费密钥的地址:** - [Shodan](https://account.shodan.io/register) (免费 100 次查询/月) - [VirusTotal](https://www.virustotal.com/gui/join-us) (免费 500 次查询/天) - [AbuseIPDB](https://www.abuseipdb.com/register) (免费 1000 次查询/天) - [Hunter.io](https://hunter.io) (免费 50 次搜索/月) - [SecurityTrails](https://securitytrails.com/app/signup) (免费 50 次查询/月) ## 📊 输出格式 1. **Terminal (Rich)**: 使用 `rich` 库在您的终端中原生渲染精美、颜色编码的表格、进度条和面板。 2. **HTML Report**: 令人惊叹的、独立的深色主题 HTML 报告。它将数据解析为带有安全评分小部件的清晰表格。 3. **JSON**: 用于构建自动化流水线的完整数据转储。 ## 🏗️ 项目架构 如果您想做出贡献或构建自己的模块,以下是架构说明: ``` twilight-orbit/ ├── twilight_orbit/ │ ├── cli.py # CLI entry point (Click) │ ├── scanner.py # Orchestrator that runs the modules in parallel │ ├── config.py # Global configuration & constants │ ├── modules/ │ │ ├── dns_lookup.py # DNS records module │ │ ├── whois_lookup.py # WHOIS data module │ │ ├── subdomains.py # Subdomain discovery (crt.sh & SecurityTrails) │ │ ├── port_scanner.py # Top 100 ports scanner │ │ ├── http_headers.py # Security headers analyzer │ │ ├── ssl_info.py # SSL/TLS cert evaluator │ │ ├── tech_detect.py # Tech fingerprinting │ │ ├── geo_lookup.py # IP geolocation │ │ ├── email_harvest.py # Email discovery (Scraping & Hunter.io) │ │ ├── wayback.py # Wayback Machine API │ │ ├── threat_intel.py # AlienVault OTX, URLScan, ThreatFox │ │ └── shodan_vt.py # Shodan, VirusTotal, AbuseIPDB │ └── reporting/ │ ├── console.py # Terminal rendering logic (Rich) │ ├── json_report.py # JSON export logic │ └── html_report.py # HTML template and rendering ├── tests/ # (Optional) Unit tests structure ├── requirements.txt # Project dependencies ├── .env # (You create this) API Keys ├── .gitignore # Ignored files for git ├── setup.py # Package setup and installation ├── CONTRIBUTING.md # Guide for contributors ├── LICENSE # MIT License └── README.md # Project documentation ``` ## ⚖️ 免责声明 ## 📄 许可证 本项目采用 [MIT 许可证](LICENSE) 授权。
标签:API 集成, ESC4, GitHub, OSINT, Python, 动态插桩, 基础设施发现, 威胁情报, 子域名挖掘, 实时处理, 密码管理, 开发者工具, 开源网络情报, 数据统计, 无后门, 端口扫描, 自动化侦察, 运行时操纵, 逆向工具, 隐蔽资产发现