B0bTheSkull/subscope

GitHub: B0bTheSkull/subscope

集证书透明度、DNS爆破、HTTP探测和接管检测于一体的子域名枚举工具,用于快速梳理目标资产和发现潜在风险点。

Stars: 0 | Forks: 0

# SubScope ![Python](https://img.shields.io/badge/python-3.8%2B-blue?style=flat-square&logo=python) ![License](https://img.shields.io/badge/license-MIT-green?style=flat-square) ![Authorized Use](https://img.shields.io/badge/authorized%20use-only-red?style=flat-square) ## 发现方法 | 方法 | 描述 | |--------|-------------| | **Certificate Transparency** | 查询 crt.sh 以获取所有曾签发 TLS 证书的子域名 | | **DNS Brute Force** | 并发解析 500+ 个常见子域名前缀 | | **HTTP Probing** | 检查每个存活子域名的状态、标题、重定向链 | | **Takeover Detection** | 根据 18+ 种已知易受攻击的服务模式检查 CNAME 记录 | ## 安装 ``` git clone https://github.com/B0bTheSkull/subscope.git cd subscope pip install -r requirements.txt ``` ## 使用 ``` # 基础扫描 python subscope.py --domain example.com # 自定义 wordlist + 更多线程 python subscope.py --domain example.com --wordlist custom.txt --threads 100 # 仅 crt.sh(更快,无 brute force) python subscope.py --domain example.com --no-bruteforce # 包含 subdomain takeover 检查 python subscope.py --domain example.com --takeover-check # 导出结果 python subscope.py --domain example.com --output results.json --csv results.csv # Scope 文件(多域名) python subscope.py --scope scope.txt --output all.json ``` ## 示例输出 ``` ╔═══════════════════════════════════════════╗ ║ SubScope v1.0 ║ ║ Subdomain Enumeration & Asset Discovery ║ ╚═══════════════════════════════════════════╝ [*] Target: example.com [*] Querying certificate transparency (crt.sh)... Found 34 subdomains via crt.sh [*] DNS brute forcing (threads=50)... Found 12 subdomains via DNS brute force [*] Total unique live subdomains: 41 [*] HTTP probing 41 subdomains... 38 responded to HTTP/HTTPS ──────────────────────────────────────────────────────────────────────────────────────────────────── STATUS SUBDOMAIN IP SERVER TITLE ──────────────────────────────────────────────────────────────────────────────────────────────────── 200 www.example.com 93.184.216.34 nginx/1.18.0 Example Domain 200 api.example.com 93.184.216.34 nginx/1.18.0 API Documentation 200 admin.example.com 93.184.216.34 Apache/2.4.41 Admin Login 301 blog.example.com 93.184.216.34 nginx - ↳ https://blog.example.com/ 403 dev.example.com 93.184.216.34 nginx/1.18.0 - 200 staging.example.com 93.184.216.34 nginx/1.18.0 Staging — Example ──────────────────────────────────────────────────────────────────────────────────────────────────── Total: 38 live subdomains ``` ## Scope 文件格式 ``` # scope.txt — 每行一个域名,# 用于注释 example.com target-company.com another-domain.org ``` ## 接管检测 (Takeover Detection) SubScope 检查 18+ 种已知易受攻击的 CNAME 模式,包括: GitHub Pages, Netlify, Heroku, AWS S3, CloudFront, Azure, Fastly, Surge, Bitbucket, Ghost, Shopify, Webflow, Unbounce, ReadMe.io, Pantheon 等。 ``` [!] POTENTIAL SUBDOMAIN TAKEOVER(S) DETECTED: ⚠ docs.example.com → example.github.io (GitHub Pages) Fingerprint matched: There isn't a GitHub Pages site here Status: CONFIRMED VULNERABLE ``` ## JSON 输出 ``` { "domain": "example.com", "timestamp": "2024-10-15T14:32:01", "total_found": 38, "subdomains": [ { "subdomain": "api.example.com", "ip": "93.184.216.34", "status": 200, "title": "API Documentation", "server": "nginx/1.18.0", "url": "https://api.example.com", "redirect": null } ] } ``` ## 内置字典 包含 500+ 个常见子域名前缀:`api`, `admin`, `dev`, `staging`, `vpn`, `portal`, `grafana`, `jenkins`, `gitlab`, `k8s`, `cdn`, `mail` 等。 ## 路线图 - [ ] 排列组合扫描 (altdns-style) - [ ] 基于 ASN 的 IP 范围枚举 - [ ] 集成 Shodan/Censys - [ ] 通过 SecurityTrails / DNSDB 进行被动 DNS - [ ] 虚拟主机扫描 ## 许可证 MIT
标签:CNAME记录检测, CT日志, GitHub, HTTP探测, Python, 侦查工具, 域名安全, 子域名接管, 子域名枚举, 密码管理, 数据展示, 无后门, 系统安全, 红队, 网络安全, 证书透明度, 进程管理, 逆向工具, 隐私保护