Rajib-Mahmud/surfmap

GitHub: Rajib-Mahmud/surfmap

面向漏洞赏金猎人的自动化攻击面侦查工具,整合十余款安全工具实现从域名到优先级报告的全流程覆盖。

Stars: 0 | Forks: 0

``` ██████╗ ███████╗ ██████╗ ██████╗ ███╗ ██╗ █████╗ ██╗ ██╗████████╗ ██████╗ ██╔══██╗██╔════╝██╔════╝██╔═══██╗████╗ ██║██╔══██╗██║ ██║╚══██╔══╝██╔═══██╗ ██████╔╝█████╗ ██║ ██║ ██║██╔██╗ ██║███████║██║ ██║ ██║ ██║ ██║ ██╔══██╗██╔══╝ ██║ ██║ ██║██║╚██╗██║██╔══██║██║ ██║ ██║ ██║ ██║ ██║ ██║███████╗╚██████╗╚██████╔╝██║ ╚████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ``` **攻击面情报 — 不仅仅是侦察** [![Python](https://img.shields.io/badge/Python-3.8%2B-3776ab?style=for-the-badge&logo=python&logoColor=white)](https://python.org) [![License](https://img.shields.io/badge/License-MIT-22c55e?style=for-the-badge)](LICENSE) [![Platform](https://img.shields.io/badge/Platform-Linux%20|%20WSL-f97316?style=for-the-badge&logo=linux&logoColor=white)](https://ubuntu.com) [![BugBounty](https://img.shields.io/badge/Bug%20Bounty-Ready-ef4444?style=for-the-badge)](https://hackerone.com) [![Telegram](https://img.shields.io/badge/Telegram-Notify-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://telegram.org)
## 每个猎人面临的问题 ``` Run recon ──→ Get 10,000 URLs ──→ Where do I even start? │ ▼ Random testing Duplicate reports Wasted hours ``` 每个漏洞赏金猎人都面临这个问题。目前没有现成的工具能解决它。 **ReconAuto 解决了它。** ## 它的独特之处 ``` Other tools: subfinder → httpx → gau → ??? (you figure out the rest) ReconAuto: domain → full attack surface map → prioritized findings → AI report ``` | 功能 | 其他工具 | ReconAuto | |---------|-------------|-----------| | URL 收集 | 2-3 个来源 | 8 个来源 | | 子域名枚举 | 2-3 个来源 | 9 个来源 | | API Schema 检测 | ✗ | Swagger + GraphQL + WSDL + WADL | | 参数分类 | 仅收集 | 按漏洞类型分类 | | 隐藏参数 | ✗ | arjun 集成 | | 子域名接管 | ✗ | dnsx + 15 个签名检查 | | Telegram 通知 | ✗ | 自动报告 + 文件 | | AI 就绪输出 | ✗ | REPORT.md → 粘贴到 Claude/GPT | | 优先级发现 | ✗ | 🔴 严重 → 🟡 中危 → 🟢 信息 | ## 安装 ``` # 克隆 git clone https://github.com/Rajib-Mahmud/surfmap cd surfmap # 安装 Go 工具(推荐以获得全部功能) bash install.sh # 安装 Python 工具 pip install -r requirements.txt # 设置 Telegram(可选) cp .env.example .env nano .env # Add your bot token + chat ID ``` ## 用法 ``` # 模式 1 — 单个域名深度提取 python3 recon.py target.com --mode 1 # 模式 2 — 包含所有子域名的完整侦查 python3 recon.py target.com --mode 2 # 模式 2 — 自定义输出文件夹 python3 recon.py target.com --mode 2 -o my_output # 跳过特定模块 python3 recon.py target.com --mode 1 --no-probe --no-tech # 工具安装指南 python3 recon.py --install ``` ## 它收集的内容 ### URL — 8 个来源 | 来源 | 类型 | |--------|------| | Wayback Machine CDX | 历史记录 | | CommonCrawl (3 个索引) | 历史记录 | | URLScan.io | 活跃 | | OTX AlienVault | 威胁情报 | | gau | 聚合器 | | katana | 实时爬虫 | | gospider | 实时爬虫 + 表单 | | paramspider | 专注参数 | ### 子域名 — 9 个来源 `subfinder` · `amass` · `assetfinder` · `crt.sh` · `hackertarget` · `RapidDNS` · `BufferOver` · `CertSpotter` · `ThreatCrowd` ### API Schema 检测 ``` Swagger/OpenAPI → Full endpoint list extracted automatically GraphQL → Introspection query — all types/queries/mutations WADL → Java REST API resources WSDL → SOAP service operations JSON API → REST schema detection ``` ### 参数情报 ``` paramspider → Historical parameterized URLs arjun → Hidden parameters (not visible in URLs) Categorized by vulnerability type: SSRF/RFI → ?url=, ?src=, ?path=, ?redirect= XSS → ?q=, ?search=, ?input=, ?name= SQLi → ?id=, ?category=, ?page=, ?search= LFI/Path → ?file=, ?doc=, ?template=, ?view= Open Redirect → ?next=, ?return=, ?goto=, ?dest= ``` ## 优先级输出 ``` 🔴 CRITICAL — Check immediately ├── JS secrets found (AWS key, API key, JWT, private key) ├── GraphQL introspection enabled ├── Subdomain takeover candidates └── Sensitive config files exposed (.env, .git, swagger) 🟡 MEDIUM — Check next ├── Hidden parameters discovered (arjun) ├── SSRF/LFI parameter candidates └── Admin panel indicators 🟢 INFO — Full surface map ├── All URLs ├── API endpoints ├── JS files └── Parameterized URLs by vuln type ``` ## 输出文件 ``` recon_target_20240101_120000/ ├── REPORT.md ← AI-ready report (paste to Claude/GPT) ├── all_urls.txt ← Every URL found ├── live_hosts.txt ← Confirmed live hosts ├── endpoints_api.txt ← API endpoints ├── js_files.txt ← JavaScript files ├── parameters.txt ← Parameterized URLs ├── sensitive_paths.txt ← Admin/config/backup paths ├── subdomains.txt ← All subdomains (Mode 2) ├── subdomains_resolved.txt ← DNS verified (Mode 2) ├── parameters.json ← Params + high-value flags ├── params_by_vulntype.json ← SSRF/XSS/SQLi/LFI/Redirect ├── jsluice_endpoints.txt ← JS-extracted endpoints (AST) ├── jsluice_secrets.json ← Secrets found in JS ├── api_schema.json ← Full API schema detail ├── api_schema_endpoints.txt ← Schema-extracted endpoints ├── arjun_hidden_params.json ← Hidden parameter findings ├── takeover_candidates.txt ← Subdomain takeover (Mode 2) └── active_probe.json ← Sensitive path probe results ``` ## AI 工作流 ReconAuto 基于 `master.md` AI 框架构建: ``` Step 1: python3 recon.py target.com --mode 2 Step 2: Open REPORT.md Step 3: Paste master.md + REPORT.md into Claude/ChatGPT Step 4: AI analyzes the attack surface Step 5: You verify and hunt ``` `master.md` 教导 AI 像资深安全研究员一样思考 — 不仅是寻找常见的漏洞,而是理解应用 DNA 并发现别人遗漏的内容。 ## Telegram 集成 当侦察完成时在手机上接收通知: ``` # 设置 cp .env.example .env nano .env ``` ``` TELEGRAM_BOT_TOKEN=your_token_from_botfather TELEGRAM_CHAT_ID=your_chat_id ``` **发送的内容:** - 📊 包含所有统计信息的摘要消息 - 🔴 高亮的严重发现 - 📋 `REPORT.md` — 直接粘贴到 AI - 🔗 `all_urls.txt`, `endpoints_api.txt` - ⚠️ `jsluice_secrets.json` (如果发现敏感信息) - 🎯 `params_by_vulntype.json` - 🔴 `takeover_candidates.txt` (如果发现) 在 VPS 上运行侦察,在手机上获取结果。 ## 推荐工具 ``` bash install.sh # installs everything ``` | 工具 | 安装 | 用途 | |------|---------|---------| | subfinder | go install | 子域名枚举 | | httpx | go install | 存活主机检查 | | katana | go install | Web 爬虫 | | gau | go install | URL 收集 | | dnsx | go install | DNS 解析 | | gospider | go install | 快速爬虫 | | jsluice | go install | AST JS 分析 | | waybackurls | go install | Wayback URL | | arjun | pip install | 隐藏参数 | | paramspider | pip install | 参数爬虫 | **未安装工具:** Python 回退(覆盖度 60%) **安装所有工具:** 全火力(覆盖度 90%+) ## 选项参考 ``` --mode 1 Single domain extraction --mode 2 Full recon with all subdomains --no-js Skip JS analysis (jsluice + regex) --no-probe Skip active path probing --no-tech Skip tech detection --no-gospider Skip gospider crawler --no-arjun Skip hidden parameter finder --no-params Skip paramspider --no-dnsx Skip DNS resolution (Mode 2) --no-schema Skip API schema detection --install Show tool installation guide -o OUTPUT Custom output folder name ``` ## 法律免责声明 ## 作者 **rajib_mahmud** 漏洞赏金猎人 & 安全研究员 HackerOne · Intigriti · HackenProof · CVE 研究
**发现 Bug?提交一个 issue。** **工具帮助了你的狩猎?给它一个 ⭐** *侦察结束。狩猎开始。*
标签:Python, 子域名收集, 实时处理, 密码管理, 无后门, 日志审计, 网络调试, 自动化, 逆向工具