nidhinarode-bit/Trinetlayer-Recon-Automation
GitHub: nidhinarode-bit/Trinetlayer-Recon-Automation
基于 Python 的侦查自动化框架,通过一条命令将子域名枚举、存活探测和漏洞扫描编排为完整的可复现流水线。
Stars: 0 | Forks: 0
```
__________ _____ ________________ _____ ____________
/_ __/ __ \/ _/ | / / ____/_ __/ / / \ \/ / ____/ __ \
/ / / /_/ // // |/ / __/ / / / / / /| |\ / __/ / /_/ /
/ / / _, _// // /| / /___ / / / /___/ ___ |/ / /___/ _, _/
/_/ /_/ |_/___/_/ |_/_____/ /_/ /_____/_/ |_/_/_____/_/ |_|
```
# 侦查自动化工具
### 面向网络安全专业人员和漏洞赏金猎人的自动化侦查流水线
*从多阶段枚举到漏洞报告 — 单条命令执行。*
      `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/      `CRITICAL` `HIGH` `MEDIUM` `LOW` `INFO` **[· 查看实时页面 ·](https://nidhinarode-bit.github.io/Trinetlayer-Recon-Automation/)**
标签:GitHub, Python, 实时处理, 密码管理, 无后门, 日志审计, 漏洞报告, 自动化侦察, 运行时操纵, 逆向工具