Pingu000/auto-osint

GitHub: Pingu000/auto-osint

面向红队演练的自动化侦察编排工具,将CIDR反查、子域名枚举、DNS暴力破解、存活检测和Web截图串联为并行执行的完整流水线。

Stars: 0 | Forks: 0

# recon_rangos.py — 自动化红队侦察工具 用于红队演练和渗透测试评估的自动化侦察脚本。给定网络范围和/或域名,它将执行从 CIDR 块到实时 Web 屏幕截图的全面资产发现。 ## 功能特性 - **并行执行** — 子域名工具在每个域名上同时运行,并且多个域名会被并行处理 - **灵活输入** — 支持 CIDR 范围、域名或两者同时使用 - **无硬编码路径** — subscan 和字典文件会被自动检测,或可通过标志进行配置 - **优雅降级** — 如果未安装某个工具,将跳过该步骤而不会崩溃 ## 阶段 | 阶段 | 工具 | 描述 | |-------|------|-------------| | **1 — Reverse CIDR** | hackertarget API | 查找托管在给定 CIDR 范围内每个 IP 上的域名 | | **2 — Reverse Whois** | whoisxmlapi | 查找注册为目标公司的域名(需要免费的 API 密钥) | | **3 — Subdomain OSINT** | crt.sh + subfinder + assetfinder + amass | 从多个来源并行枚举子域名 | | **4 — DNS Bruteforce** | subscan | 基于字典的子域名发现 | | **5 — Live Web Filter** | httpx | 过滤活跃的 Web 主机,检测状态码、标题和技术 | | **6 — Screenshots** | gowitness | 对所有存活主机进行截图,可在 Web UI 中查看 | ## 安装说明 ### 必备工具 ``` # Go 工具 go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest go install github.com/tomnomnom/assetfinder@latest go install github.com/projectdiscovery/httpx/cmd/httpx@latest go install github.com/sensepost/gowitness@latest # Amass sudo apt install amass -y # Python 依赖 pip install requests ``` ### 可选 — DNS Bruteforce 下载 [subscan](https://github.com/hxlxmjxbbxs/subscan) 并将 `subscan.py` 放置在以下某个位置(将自动检测): ``` ./subscan.py ./subscan/subscan.py ~/subscan/subscan.py ``` 字典文件也将从以下路径自动检测: ``` ./dict/bitquark-subdomains-top100000.txt ./subscan/dict/bitquark-subdomains-top100000.txt /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt ``` 或者安装 [SecLists](https://github.com/danielmiessler/SecLists): ``` sudo apt install seclists -y ``` ## 使用方法 ``` # 大型公司 — 包含 CIDR 范围和多个域名 python3 recon_rangos.py -r 91.224.158.0/24 91.224.159.0/24 -d adidas.com adidas-group.com -o adidas # 小型公司 — 无 ASN,仅域名 python3 recon_rangos.py -d yelmocines.es -o yelmo # 使用 reverse-whois 和多个公司名称 python3 recon_rangos.py -r 91.224.158.0/24 -d adidas.com -n "Adidas AG" "Adidas" --api-key YOUR_KEY -o adidas # 用于测试的 Fast 模式 (跳过 amass 和截图) python3 recon_rangos.py -d adidas.com -o adidas --sin-amass --sin-gowitness ``` ## 标志 | 标志 | 描述 | |------|-------------| | `-r RANGES` | 要分析的 CIDR 范围。支持指定多个。可选。 | | `-d DOMAINS` | 目标域名。支持指定多个。`-r` 或 `-d` 至少需要提供一个。 | | `-n NAMES` | 用于 Reverse Whois 的公司名称。支持指定多个。 | | `-o OUTPUT` | 输出目录前缀(默认:`recon_output`) | | `--api-key KEY` | whoisxmlapi API 密钥 — 可在 [whoisxmlapi.com](https://reverse-whois.whoisxmlapi.com) 免费获取 | | `--subscan-path PATH` | subscan.py 的路径(默认自动检测) | | `--wordlist PATH` | 用于 DNS Bruteforce 的字典文件(默认自动检测) | | `--hilos N` | 并行工作线程数(默认:5) | | `--hilos-httpx N` | httpx 线程数(默认:50) | | `--hilos-gowitness N` | gowitness 线程数(默认:50) | | `--sin-amass` | 跳过 amass(运行更快) | | `--sin-bruteforce` | 跳过 DNS Bruteforce | | `--sin-gowitness` | 跳过截图 | | `--solo-dominios` | 仅运行阶段 1+2(仅进行域名发现) | ## 输出结果 ``` output_YYYYMMDD_HHMMSS/ ├── domains_cidr.txt # Domains from CIDR ranges (phase 1) ├── domains_whois.txt # Domains from reverse-whois (phase 2) ├── subdomains_osint.txt # Subdomains from OSINT tools (phase 3) ├── bruteforce_*.txt # Bruteforce results per domain (phase 4) ├── domains_all.txt # Combined master list ├── web_active.txt # Live hosts with status, title and tech (phase 5) ├── web_active_urls.txt # Clean URLs for gowitness ├── screenshots/ # Screenshots (phase 6) └── gowitness.sqlite3 # gowitness database ``` ### 查看截图 ``` gowitness report server \ --db-uri sqlite://output_FECHA/gowitness.sqlite3 \ --screenshot-path output_FECHA/screenshots # Open: http://localhost:7171 ``` ## 工作流程 ``` Manual: bgp.he.net → copy ASN ranges ↓ Script: -r RANGES → Phase 1: Reverse CIDR (hackertarget) -d DOMAINS → Phase 2: Reverse Whois (whoisxmlapi) ↓ Phase 3: Subdomain OSINT (parallel) ↓ Phase 4: DNS Bruteforce (subscan) ↓ Phase 5: httpx → live hosts ↓ Phase 6: gowitness → screenshots ``` ## 法律声明 本工具仅用于**授权的安全评估**。未经明确授权,对您不拥有或未获明确许可测试的系统进行未经授权的使用是违法的。作者对滥用行为不承担任何责任。
标签:amass, APT, assetfinder, CIDR, DNS爆破, ESC4, GitHub, gowitness, Go语言, httpx, IP反查域名, IP 地址批量处理, OSINT, Python, subfinder, TID, Web资产梳理, Whois查询, 代码生成, 企业资产收集, 反取证, 威胁情报, 子域名收集, 子域名枚举, 子域名爆破, 存活主机探测, 安全评估, 实时处理, 密码管理, 并行执行, 开发者工具, 情报收集, 攻击路径可视化, 数据展示, 无后门, 无线安全, 日志审计, 渗透测试工具, 漏洞研究, 程序破解, 系统安全, 红队, 网络安全, 网页截图, 自动化侦察, 运行时操纵, 逆向IP, 逆向工具, 隐私保护, 黑客工具