shahariarnafees/reconx

GitHub: shahariarnafees/reconx

ReconX 是一个模块化的异步外部侦察自动化框架,将十余种主流安全工具编排为五阶段流水线,帮助渗透测试人员高效完成目标攻击面测绘。

Stars: 0 | Forks: 0

``` ██████╗ ███████╗ ██████╗ ██████╗ ███╗ ██╗██╗ ██╗ ██╔══██╗██╔════╝██╔════╝██╔═══██╗████╗ ██║╚██╗██╔╝ ██████╔╝█████╗ ██║ ██║ ██║██╔██╗ ██║ ╚███╔╝ ██╔══██╗██╔══╝ ██║ ██║ ██║██║╚██╗██║ ██╔██╗ ██║ ██║███████╗╚██████╗╚██████╔╝██║ ╚████║██╔╝ ██╗ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ``` ### 专业侦察自动化框架 [![Python](https://img.shields.io/badge/Python-3.9%2B-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/) [![Go Tools](https://img.shields.io/badge/Go_Tools-Required-00ADD8?style=for-the-badge&logo=go&logoColor=white)](https://go.dev/) [![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE) [![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS-lightgrey?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/shahariarnafees/reconx) [![Version](https://img.shields.io/badge/Version-1.0.0-brightgreen?style=for-the-badge)](https://github.com/shahariarnafees/reconx/releases) [![Stars](https://img.shields.io/github/stars/shahariarnafees/reconx?style=for-the-badge&color=yellow)](https://github.com/shahariarnafees/reconx/stargazers) **ReconX** 是一个模块化、异步优先的外部侦察自动化框架,通过单一且美观的终端界面编排了 10 种行业标准的安全工具。 专为追求速度、准确性和专业性的渗透测试人员、Bug Bounty 猎人和红队成员而构建。 [功能](#-features) • [安装](#-installation) • [使用](#-usage) • [扫描模式](#-scan-modes) • [输出](#-output) • [工具](#-integrated-tools)
## 📖 概述 现代外部侦察需要编排数十种工具、解析不一致的输出、对结果进行去重,并关联来自多个数据源的发现——这一切都要分秒必争。手动执行此过程不仅速度慢、容易出错,而且缺乏一致性。 **ReconX 解决了这个问题。** 它将完整的外部侦察 pipeline 自动化为五个连续阶段,在可能的情况下并行运行工具,将每个输出规范化为统一结构,并通过基于 Rich 构建的专业终端仪表板呈现所有内容。 ``` Target Domain │ ▼ ┌─────────────────────────────────────────────────────────┐ │ Phase 1 ── Subdomain Enumeration │ │ subfinder · amass · assetfinder │ ├─────────────────────────────────────────────────────────┤ │ Phase 2 ── Live Host Discovery │ │ httpx │ ├─────────────────────────────────────────────────────────┤ │ Phase 3 ── Port & Service Discovery │ │ naabu · nmap │ ├─────────────────────────────────────────────────────────┤ │ Phase 4 ── URL Collection │ │ katana · gau · waybackurls │ ├─────────────────────────────────────────────────────────┤ │ Phase 5 ── Endpoint Classification │ │ login · admin · api · upload · backup ··· │ └─────────────────────────────────────────────────────────┘ │ ▼ Structured Results + JSON / TXT / HTML Reports ``` ## ✨ 功能 ### 🔍 侦察引擎 - **5 阶段完整 pipeline** — 子域名枚举 → 存活主机发现 → 端口扫描 → URL 收集 → endpoint 分类 - **并行异步执行** — 工具通过 `asyncio.gather` 并发运行,最大化吞吐量 - **故障隔离** — 单个工具的失败永远不会中断 pipeline;所有其他工具的结果都会被保留 - **自动去重** — 子域名、URL 和 endpoint 会在所有工具输出中进行去重 ### 🛠️ 三种扫描模式 | 模式 | 工具 | 适用场景 | |---|---|---| | **技术检测** | httpx + 内部指纹识别器 | 快速的技术栈和安全头审计 | | **轻度侦察** | subfinder + amass + assetfinder | 仅进行快速的被动子域名枚举 | | **全面侦察** | 所有 10 种工具 | 完整的外部攻击面映射 | ### 🎨 专业终端 UI - 带有色彩循环的动态 ASCII banner - 基于 Rich 构建的交互式仪表板,带有编号菜单 - 每个阶段的实时进度条,带有 spinners 和计时器 - 扫描后的结果仪表板,具有结构化的表格和统计面板 - 带有颜色编码的状态码,以及基于严重程度的 endpoint 高亮显示 ### 📊 Endpoint 分类 自动将收集到的 URL 分为八个敏感度类别: | 类别 | 示例模式 | |---|---| | `[LOGIN]` | `/login`, `/signin`, `/auth`, `/sso`, `/oauth` | | `[ADMIN]` | `/admin`, `/dashboard`, `/cms`, `/wp-admin`, `/panel` | | `[API]` | `/api/`, `/v1/`, `/graphql`, `/swagger`, `/rest/` | | `[UPLOAD]` | `/upload`, `/file`, `/import`, `/attachment`, `/media` | | `[BACKUP]` | `.bak`, `.sql`, `.old`, `.backup`, `/dump` | | `[CONFIG]` | `.env`, `.yml`, `.cfg`, `.ini`, `settings`, `secrets` | | `[DEV]` | `/dev`, `/staging`, `/test`, `/debug`, `/sandbox` | | `[SENSITIVE]` | `password`, `token`, `secret`, `credential`, `private` | ### 📁 结构化输出 所有结果都会自动保存到结构化目录中: ``` results// ├── subdomains.txt ← all discovered subdomains ├── live_hosts.txt ← probed live hosts ├── urls.txt ← all collected URLs ├── sensitive_urls.txt ← classified sensitive URLs ├── endpoints.txt ← categorised endpoints ├── ports.txt ← open ports and services ├── technologies.txt ← fingerprinted tech stacks ├── summary.json ← machine-readable full summary ├── report_.json ← detailed JSON report ├── report_.txt ← human-readable TXT report ├── report_.html ← self-contained HTML report └── logs.txt ← timestamped scan log ``` ### 🔒 技术指纹识别 检测内容:Web 服务器 · CDN · WAF · CMS · 框架 · JS 库 · 编程语言 · 托管提供商 · 缺失的安全头 ## 🔧 集成工具 | 工具 | 类别 | 作用 | 来源 | |---|---|---|---| | [subfinder](https://github.com/projectdiscovery/subfinder) | 子域名 | 从 40 多个来源进行被动枚举 | ProjectDiscovery | | [amass](https://github.com/owasp-amass/amass) | 子域名 | 基于深度 OSINT 的枚举 | OWASP | | [assetfinder](https://github.com/tomnomnom/assetfinder) | 子域名 | 快速子域名发现 | TomNomNom | | [httpx](https://github.com/projectdiscovery/httpx) | 存活主机 | HTTP 探测、技术检测、状态码 | ProjectDiscovery | | [naabu](https://github.com/projectdiscovery/naabu) | 端口 | 快速 SYN/CONNECT 端口扫描 | ProjectDiscovery | | [nmap](https://github.com/nmap/nmap) | 端口 | 深度服务/版本/操作系统检测 | Nmap Project | | [katana](https://github.com/projectdiscovery/katana) | URL | 支持 JS 的下一代 Web 爬虫 | ProjectDiscovery | | [gau](https://github.com/lc/gau) | URL | 来自 AlienVault, Wayback, URLScan 的历史 URL | @lc | | [waybackurls](https://github.com/tomnomnom/waybackurls) | URL | Wayback Machine URL 提取 | TomNomNom | | [dnsx](https://github.com/projectdiscovery/dnsx) | DNS | 大规模多记录 DNS 解析 | ProjectDiscovery | **必需:** `subfinder`, `httpx` **可选:** 其他所有工具(ReconX 会优雅地跳过缺失的工具) ## 📋 前置条件 - **Python** 3.9 或更高版本 - **Go** 1.21 或更高版本(用于基于 Go 的工具) - **Linux** 或 **macOS**(支持 Windows WSL2) ## 🚀 安装说明 ### 1 — 克隆仓库 ``` git clone https://github.com/shahariarnafees/reconx.git cd reconx ``` ### 2 — 安装 Python 依赖 ``` pip3 install -r requirements.txt ``` ### 3 — 安装基于 Go 的侦察工具 ``` # 必需 go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest # 推荐 go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest go install -v github.com/projectdiscovery/katana/cmd/katana@latest go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest go install github.com/tomnomnom/assetfinder@latest go install github.com/tomnomnom/waybackurls@latest go install github.com/lc/gau/v2/cmd/gau@latest # 可选 go install -v github.com/owasp-amass/amass/v4/...@master ``` ### 4 — 安装 nmap(系统包) ``` # Debian / Ubuntu sudo apt install nmap -y # macOS brew install nmap # Arch Linux sudo pacman -S nmap ``` ### 5 — 确保 Go bin 位于您的 PATH 中 ``` export PATH=$PATH:$(go env GOPATH)/bin # 将此行添加到您的 ~/.bashrc 或 ~/.zshrc 以使其永久生效 ``` ### 6 — 启动 ReconX ``` python3 main.py ``` ## 🖥️ 使用方法 ### 启动 ReconX ``` python3 main.py ``` ReconX 将会: 1. 显示动态 banner 2. 检测您的操作系统和 Python 版本 3. 检查已安装的工具并显示状态表 4. 提示您输入目标域名 ### 目标输入 ReconX 接受以下任何格式——它会自动对其进行规范化处理: ``` example.com sub.example.com https://example.com http://example.com *.example.com https://example.com/some/path ``` ### 主菜单 ``` ╭──────┬────────────────────────┬──────────────────────────────────────────╮ │ # │ Module │ Description │ ├──────┼────────────────────────┼──────────────────────────────────────────┤ │ 1 │ Technology Detection │ HTTP fingerprinting · CDN · WAF · CMS │ │ 2 │ Light Recon Scan │ Passive subdomain enumeration only │ │ 3 │ Full Recon Scan │ Complete 5-phase recon pipeline │ │ 4 │ View Previous Results │ Browse earlier scan results │ │ 5 │ Export Reports │ Generate JSON / HTML / TXT reports │ │ 6 │ Change Target │ Set a new target domain │ │ 0 │ Exit │ Terminate ReconX │ ╰──────┴────────────────────────┴──────────────────────────────────────────╯ ``` ## 📡 扫描模式 ### 选项 1 — 技术检测 对目标及其存活子域名执行快速的基于 HTTP 的指纹识别。 **检测内容:** - Web 服务器(Nginx, Apache, IIS, LiteSpeed, Caddy…) - CDN 提供商(Cloudflare, AWS CloudFront, Fastly, Akamai…) - WAF(Cloudflare WAF, ModSecurity, Imperva, Sucuri…) - CMS(WordPress, Drupal, Joomla, Shopify, Ghost…) - 框架(Laravel, Django, Rails, Next.js, Express…) - JavaScript 库(React, Vue, Angular, jQuery…) - 托管提供商(AWS, GCP, Azure, DigitalOcean…) - **缺失的安全头**(HSTS, CSP, X-Frame-Options…) ``` # 输入您的 target 后从菜单中选择选项 1 ``` ### 选项 2 — 轻度侦察扫描 并行运行 `subfinder`、`amass` 和 `assetfinder`,以实现快速的被动子域名枚举。无主动探测——适合用于初始范围映射。 **输出:** - 去重后的子域名列表 - 每个工具的发现数量 - 结果保存至 `results//subdomains.txt` ### 选项 3 — 全面侦察扫描 完整的 5 阶段外部攻击面映射 pipeline。 ``` Phase 1 Subdomain Enumeration subfinder + amass + assetfinder (parallel) Phase 2 Live Host Discovery httpx (async) Phase 3 Port & Service Discovery naabu + nmap (parallel) Phase 4 URL Collection katana + gau + waybackurls (parallel) Phase 5 Endpoint Classification internal engine (instant) ``` **预计运行时间:** | 目标规模 | 子域名数量 | 预计时长 | |---|---|---| | 小型 | < 50 | 3–8 分钟 | | 中型 | 50–500 | 8–20 分钟 | | 大型 | 500–2000 | 20–45 分钟 | ## 📊 输出示例 ### 结果仪表板 全面扫描完成后,ReconX 会显示一个富终端仪表板: ``` ◆ RECONX RESULTS DASHBOARD ◆ TARGET INFORMATION Target │ example.com Scan Type │ FULL Duration │ 00h 08m 24s DISCOVERY STATISTICS ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ 247 │ │ 89 │ │ 3,412 │ │ 143 │ │ Subdomains │ │ Live Hosts │ │ Total URLs │ │ Sensitive │ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ ┌──────────────┐ ┌──────────────┐ │ 312 │ │ 47 │ │ Open Ports │ │ Tech │ └──────────────┘ └──────────────┘ ``` ### 摘要 JSON (`summary.json`) ``` { "target": "example.com", "scan_type": "full", "start_time": "2026-06-18T11:39:58", "end_time": "2026-06-18T11:48:22", "duration_seconds": 504.3, "stats": { "total_subdomains": 247, "live_hosts": 89, "total_urls": 3412, "sensitive_urls": 143, "open_ports": 312, "technologies": 47 }, "subdomains": ["api.example.com", "mail.example.com", "..."], "ports": { "api.example.com": [ { "port": 443, "service": "https", "version": "OpenSSL 3.0" } ] } } ``` ## 🏗️ 项目结构 ``` reconx/ ├── main.py ← Entry point ├── requirements.txt ├── README.md │ ├── config/ │ └── settings.py ← Tool configs, patterns, theme │ ├── core/ │ ├── banner.py ← Animated terminal banner │ ├── logger.py ← Rotating file + console logging │ ├── validator.py ← Domain sanitisation & validation │ ├── dependency_checker.py ← Tool availability verification │ └── result_processor.py ← Dedup, classify, correlate │ ├── models/ │ └── scan_models.py ← Pydantic data models │ ├── modules/ ← One file per external tool │ ├── base_module.py ← Async subprocess base class │ ├── subdomain/ ← subfinder · amass · assetfinder │ ├── live_host/ ← httpx │ ├── port/ ← naabu · nmap │ ├── url/ ← katana · gau · waybackurls │ └── tech/ ← HTTP fingerprint engine │ ├── scanners/ │ ├── light_scan.py ← Light recon orchestrator │ ├── full_scan.py ← Full pipeline orchestrator │ └── tech_scan.py ← Tech detection orchestrator │ ├── ui/ │ ├── dashboard.py ← Interactive Rich menu │ └── results_display.py ← Post-scan Rich dashboard │ ├── storage/ │ └── manager.py ← File I/O and results directory │ └── reports/ └── exporter.py ← JSON · TXT · HTML report generator ``` ## ⚙️ 添加新工具 ReconX 的模块化架构使得集成新工具变得非常简单。 **第 1 步** — 将工具配置添加到 `config/settings.py`: ``` "mynewscanner": { "binary": "mynewscanner", "timeout": 300, "base_args": ["-silent", "-json"], "required": False, "category": "subdomain", "description": "My new scanner", "install": "go install github.com/user/mynewscanner@latest", }, ``` **第 2 步** — 创建 `modules//mynewscanner.py`: ``` from modules.base_module import BaseModule from config.settings import TOOL_CONFIGS class MyNewScannerModule(BaseModule): tool_name = "mynewscanner" def build_command(self, target: str): cfg = TOOL_CONFIGS["mynewscanner"] return [cfg["binary"], *cfg["base_args"], "-d", target] def parse_output(self, raw_lines): return [line.strip() for line in raw_lines if line.strip()] ``` **第 3 步** — 在 `scanners/full_scan.py` 或 `light_scan.py` 中导入并调用它。 ## 📦 依赖项 ### Python 库 | 包 | 版本 | 用途 | |---|---|---| | `rich` | ≥ 13.7 | 终端 UI、表格、进度条、面板 | | `pydantic` | ≥ 2.5 | 数据验证和类型化模型 | | `requests` | ≥ 2.31 | HTTP 技术指纹识别 | | `aiohttp` | ≥ 3.9 | 异步 HTTP 操作 | | `aiofiles` | ≥ 23.2 | 异步文件 I/O | ## 🔑 配置 所有工具参数和框架设置都位于 `config/settings.py` 中。关键部分: ``` # Tool 超时时间(秒) TOOL_CONFIGS["subfinder"]["timeout"] = 300 # 添加自定义敏感 URL 模式 SENSITIVE_PATTERNS["custom"] = ["mypanel", "internal-api"] # 在 scanner 文件内调整扫描并发 # httpx: -t (threads), -rl (rate-limit) # naabu: -rate, -c (workers) ``` ## 🤝 贡献 欢迎提交贡献、Bug 报告和功能请求。 1. Fork 该仓库 2. 创建功能分支(`git checkout -b feature/new-tool-integration`) 3. 提交您的更改(`git commit -m 'feat: add nuclei integration'`) 4. 推送到分支(`git push origin feature/new-tool-integration`) 5. 发起 Pull Request 请遵循现有的模块模式,并确保添加的新工具具有适当的错误处理和超时管理。 ## 📄 许可证 本项目基于 **MIT License** 授权——详情请参阅 [LICENSE](LICENSE) 文件。 ## 👤 作者 **Shahariar Nafees** [![GitHub](https://img.shields.io/badge/GitHub-shahariarnafees-181717?style=flat&logo=github)](https://github.com/shahariarnafees) [![LinkedIn](https://img.shields.io/badge/LinkedIn-shahariarnafees-0077B5?style=flat&logo=linkedin)](https://www.linkedin.com/in/shahariarnfs) ## ⚠️ 法律免责声明 本工具仅供**教育目的和授权的安全测试**使用。 - 仅对您**拥有**或获得**明确书面授权**测试的系统使用 ReconX - 作者**不承担**任何因滥用本工具或由此造成的损害的责任 - 在大多数司法管辖区,未经授权的侦察是**非法的** - 始终在授权的测试活动或 Bug Bounty 项目的范围内进行操作
**如果 ReconX 对您的工作流程有所帮助,请 ⭐ 给该仓库点 Star。** 为安全社区倾注 ❤️ 打造
标签:GitHub, Go工具链, Python, 实时处理, 密码管理, 无后门, 日志审计, 自动化任务, 计算机取证, 资产侦察, 逆向工具