nidhinarode-bit/Trinetlayer-Recon-Automation

GitHub: nidhinarode-bit/Trinetlayer-Recon-Automation

基于 Python 的侦查自动化框架,通过一条命令将子域名枚举、存活探测和漏洞扫描编排为完整的可复现流水线。

Stars: 0 | Forks: 0

``` __________ _____ ________________ _____ ____________ /_ __/ __ \/ _/ | / / ____/_ __/ / / \ \/ / ____/ __ \ / / / /_/ // // |/ / __/ / / / / / /| |\ / __/ / /_/ / / / / _, _// // /| / /___ / / / /___/ ___ |/ / /___/ _, _/ /_/ /_/ |_/___/_/ |_/_____/ /_/ /_____/_/ |_/_/_____/_/ |_| ``` # 侦查自动化工具 ### 面向网络安全专业人员和漏洞赏金猎人的自动化侦查流水线 *从多阶段枚举到漏洞报告 — 单条命令执行。*
![Python](https://img.shields.io/badge/Python-3.8%2B-3776AB?style=for-the-badge&logo=python&logoColor=white) ![License](https://img.shields.io/badge/License-MIT-3b82f6?style=for-the-badge) ![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-1a1f28?style=for-the-badge) ![Stars](https://img.shields.io/github/stars/nidhinarode-bit/Trinetlayer-Recon-Automation?style=flat-square&color=3b82f6) ![Repo size](https://img.shields.io/github/repo-size/nidhinarode-bit/Trinetlayer-Recon-Automation?style=flat-square&color=3b82f6) ![Last commit](https://img.shields.io/github/last-commit/nidhinarode-bit/Trinetlayer-Recon-Automation?style=flat-square&color=3b82f6) `CRITICAL`   `HIGH`   `MEDIUM`   `LOW`   `INFO` **[· 查看实时页面 ·](https://nidhinarode-bit.github.io/Trinetlayer-Recon-Automation/)**
## 目录 - [概述](#overview) - [功能](#features) - [架构 / 工作流](#architecture--workflow) - [技术栈](#tech-stack) - [安装说明](#installation) - [用法](#usage) - [项目结构](#project-structure) - [截图 / 演示](#screenshots--demo) - [配置](#configuration) - [输出示例](#example-output) - [安全免责声明](#security-disclaimer) - [性能与优势](#performance--advantages) - [未来改进](#future-improvements) - [贡献](#contributing) - [许可证](#license) - [作者](#author) ## 概述 侦查是任何安全评估中最耗时且最繁琐的阶段。分析人员通常需要手动运行五到六个独立的工具,在它们之间复制输出结果,手动去重,筛选存活主机,然后才开始漏洞扫描。这个过程不仅缓慢、容易出错,而且难以复现。 **Trinetlayer Recon Automation** 将整个侦查阶段封装在一个 Python 编排器中。只需一条命令,就能将目标从原始域名转化为结构化的漏洞报告,并保存所有中间产物到磁盘。它专为漏洞赏金猎人、渗透测试人员和安全团队设计,满足他们对快速、一致且可重复侦查的需求。 ## 功能 - 🔍 **多源子域名枚举** — 结合 subfinder、assetfinder、findomain、chaos 和 crt.sh,然后对所有来源的结果进行去重。 - 🛡️ **自动化漏洞扫描** — 运行 Nuclei 并跨所有严重级别自动选择模板 (`-as`)。 - 🌐 **存活主机探测** — 使用 httpx 将发现的子域名筛选为响应 `200 OK` 的主机。 - 📥 **灵活的输入方式** — 接受 CLI 参数、纯文本文件、JSON 文件、交互式菜单或抓取 Bugcrowd 目标。 - 📊 **结构化报告** — 生成人类可读的摘要以及 JSONL 输出,便于集成到 SIEM 或下游流水线。 - 🖥️ **支持 VPS / CI** — 具备非交互模式、日志文件输出和优雅的信号处理,适合无人值守的扫描。 - 💻 **跨平台** — 支持 Windows、macOS 和 Linux。 ## 架构 / 工作流 ``` [ Subdomain Enum ] → [ Dedup ] → [ httpx Probe ] → [ Live Filter (200) ] → [ Nuclei Scan ] → [ Report ] ``` | 阶段 | 具体操作 | | ----- | ------------ | | **1. 枚举** | 依次对目标运行所有可用的子域名工具。 | | **2. 去重** | 将每个来源的结果合并为一个干净、唯一的列表。 | | **3. 探测** | httpx 检查每个子域名的 HTTP/HTTPS 响应状态。 | | **4. 存活筛选** | 仅保留在扫描阶段返回 `200 OK` 的主机。 | | **5. 漏洞扫描** | Nuclei 使用自动选择的模板扫描存活主机。 | | **6. 报告** | 将发现结果写入 TXT + JSONL,并生成格式化的摘要报告。 | ## 技术栈 | 类别 | 技术 | | -------- | ------------ | | **语言** | Python 3.8+ | | **侦查工具链** | subfinder, assetfinder, findomain, chaos, httpx, Nuclei | | **数据来源** | crt.sh (证书透明度), Bugcrowd | | **运行依赖** | Go 1.21+(安装侦查工具链所需) | | **Python 库** | 参见 [`requirements.txt`](requirements.txt) | | **输出格式** | TXT, JSONL | ## 安装说明 **第 1 步 — 克隆代码仓库** ``` git clone https://github.com/nidhinarode-bit/Trinetlayer-Recon-Automation.git cd Trinetlayer-Recon-Automation ``` **第 2 步 — 安装 Python 依赖** ``` pip install -r requirements.txt ``` **第 3 步 — 安装侦查工具链(需要 Go 1.21+)** ``` go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest go install -v github.com/tomnomnom/assetfinder@latest go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest ``` 单独安装 **findomain**(macOS 上使用 `brew install findomain`,或者在 Windows / Linux 上下载发布版本的二进制文件),并确保 `$(go env GOPATH)/bin` 包含在你的 `PATH` 中。 **第 4 步 — 验证** ``` go version && httpx -version && nuclei -version ``` ## 用法 **交互模式**(Windows / macOS): ``` python recon.py ``` **CLI 模式**(所有平台): ``` # 单个 domain python recon.py -d example.com # 多个 domain python recon.py -d example.com,target.org,test.io # 从文本文件读取(每行一个 domain) python recon.py -dL domains.txt # 从 JSON 文件读取 python recon.py --json-file targets.json # 从 Bugcrowd 抓取 targets python recon.py --bugcrowd # 自定义输出目录 python recon.py -d example.com --output-dir /path/to/output ``` ### CLI 参考 | 参数 | 描述 | | -------- | ----------- | | `-d`, `--domains` | 域名,以逗号分隔 | | `-dL`, `--domain-list` | 包含域名的文件(每行一个) | | `--json-file` | 包含目标/域名的 JSON 文件 | | `--bugcrowd` | 从 Bugcrowd 抓取目标 | | `--output-dir` | 自定义输出目录 | | `--log-file` | 将所有输出同时重定向到日志文件 | ## 项目结构 ``` Trinetlayer-Recon-Automation/ ├── recon.py # Main automation orchestrator ├── bugcrowd_scraper.py # Bugcrowd target scraper ├── requirements.txt # Python dependencies ├── index.html # Project landing page (GitHub Pages) ├── .gitignore ├── .gitattributes └── README.md # This file ``` ## 截图 / 演示 ## 配置 **subfinder 的 API 密钥**(可选 — 扩大子域名覆盖范围): ``` # ~/.config/subfinder/provider-config.yaml shodan: - YOUR_SHODAN_API_KEY securitytrails: - YOUR_SECURITYTRAILS_KEY virustotal: - YOUR_VIRUSTOTAL_KEY ``` **chaos 的 API 密钥:** ``` export CHAOS_KEY=your-projectdiscovery-api-key ``` 扫描输出路径由 `--output-dir` 控制;日志记录由 `--log-file` 控制。 ## 输出示例 结果将保存到 `results/_/`: | 文件 | 描述 | | ---- | ----------- | | `target_domains.txt` | 输入域名 | | `all_subdomains.txt` | 所有发现的子域名(已去重) | | `httpx_output.txt` | 包含状态码的完整 httpx 探测结果 | | `live_subdomains.txt` | 响应 `200 OK` 的存活主机 | | `nuclei_results.txt` | Nuclei 发现结果(人类可读) | | `nuclei_results.jsonl` | Nuclei 发现结果(结构化 JSON) | | `recon_report.txt` | 格式化的摘要报告 | ## 安全免责声明 ## 性能与优势 - **一条命令代替六个** — 用一次可重复的运行取代了手动多工具的工作流。 - **无需手动去重** — 跨来源的合并是自动完成的。 - **可复现** — 每次扫描都带有时间戳且相互独立。 - **对流水线友好** — JSONL 输出可直接接入 SIEM 或 CI 工作流。 - **无人值守操作** — 非交互模式和日志文件支持通过 SSH 在 VPS 上进行长时间扫描。 ## 未来改进 - [ ] 在 HTTP 探测之前增加端口扫描阶段(例如 naabu) - [ ] 除了 TXT 和 JSONL 外,支持导出 HTML / PDF 报告 - [ ] 支持中断扫描的恢复功能 - [ ] 扫描完成后的通知集成(Slack / Discord / 电子邮件) - [ ] 提供 Dockerfile 以实现一键容器化部署 - [ ] 增加单元测试和 CI 流水线
标签:GitHub, Python, 实时处理, 密码管理, 无后门, 日志审计, 漏洞报告, 自动化侦察, 运行时操纵, 逆向工具