mikaww1/Subdomain-Takeover-Checker
GitHub: mikaww1/Subdomain-Takeover-Checker
一款自动化子域名接管漏洞检测工具,通过递归追踪 DNS CNAME 链并结合 80 多种云服务指纹库,帮助企业识别已被释放且可被恶意注册的外部悬空子域名。
Stars: 33 | Forks: 1
# 🔍 子域名接管检测工具
🔗 **在线工具:[subdomainchecker.com](https://www.subdomainchecker.com)**
📦 **公开 API:[RapidAPI](https://rapidapi.com/mikaww1/api/subdomain-takeover-checker)**
## 什么是子域名接管?
当一个类似 `shop.example.com` 的子域名通过 CNAME 记录指向某个外部服务,但该服务不再被配置时,攻击者可以注册这个未被认领的服务并完全控制该子域名——从而提供钓鱼页面、窃取 cookie,或损害品牌形象。
```
shop.example.com → CNAME → old-store.myshopify.com → ❌ unclaimed
```
本工具可以自动检测这种情况。
## 功能
- 🔗 **追踪完整的 CNAME 链** —— 不仅仅是第一跳
- 🧠 **80 多种服务指纹** —— GitHub Pages、Heroku、Vercel、Netlify、AWS S3、Azure、Shopify、Zendesk 等
- 🌐 **子域名枚举** —— 输入根域名,通过证书透明度日志 发现子域名并自动全部检查
- 🛡️ **通配符 DNS 检测** —— 避免误报
- 🤝 **同所有者检测** —— 跳过指向同一组织拥有的服务的 CNAME(例如 `*.github.com` → `*.github.io`)
- ⚡ **批量模式** —— 一次最多检查 10 个子域名
- 🔒 不存储数据,不记录日志
- 🖥️ 可作为 Web 应用、CLI 工具或 API 使用
## 在线演示
👉 **[subdomainchecker.com](https://www.subdomainchecker.com)**
## 快速开始
### Web
访问 **[subdomainchecker.com](https://www.subdomainchecker.com)** —— 无需安装。
### CLI
```
git clone https://github.com/mikaww1/Subdomain-Takeover-Checker.git
cd Subdomain-Takeover-Checker
pip install -r requirements.txt
python main.py shop.example.com
```
**选项:**
```
python main.py [--timeout SECONDS] [--no-wildcard-check]
```
### 在本地作为 Web 应用运行
```
pip install -r requirements.txt
python api.py
```
打开 http://127.0.0.1:5000
## 输出示例
```
[*] Checking: shop.example.com
[*] CNAME chain: shop.example.com → mystore.myshopify.com
[*] Matched service: myshopify.com
[*] Fetching page (timeout: 5s)...
[!!!] VULNERABLE — Unconfigured fingerprint found for myshopify.com
────────────────────────────────────────────────
Subdomain : shop.example.com
Vulnerable : YES 🔴
Confidence : Confirmed ✓
Service : myshopify.com
CNAME chain: mystore.myshopify.com
HTTP status: 200
────────────────────────────────────────────────
```
## 公开 API
可在 RapidAPI 上使用,提供免费层级 —— 将子域名接管检测集成到你自己的侦测 pipeline 中。
**端点:**
- `GET /check?subdomain=shop.example.com` —— 单个子域名检查
- `POST /bulk_check` —— 一次最多检查 25 个子域名
📦 **[在 RapidAPI 上查看](https://rapidapi.com/mikaww1/api/subdomain-takeover-checker)**
## 支持的服务
AWS S3、Azure、Cloudfront、Elastic Beanstalk、GitHub Pages、Heroku、Vercel、Netlify、Cloudflare Pages、Render、Railway、Fly.io、Surge、Bitbucket、Pantheon、WP Engine、Kinsta、Webflow、Ghost、Squarespace、Wix、Shopify、BigCartel、HubSpot、Instapage、Unbounce、Zendesk、Freshdesk、Help Scout、Intercom、Statuspage、Readme.io、Tumblr、Supabase、Bubble、Gitbook、Notion、Fastly、Mailchimp、Pingdom 等。
## 技术栈
- **后端:** Python、Flask、dnspython、requests
- **前端:** 原生 HTML/CSS/JS
- **部署:** Railway + Gunicorn
## 法律声明
请仅在你拥有或获得明确测试授权的域名上使用此工具。作者不对滥用行为负责。
标签:DNS安全, Python, 后端开发, 子域名接管, 实时处理, 无后门, 无服务器架构, 逆向工具, 配置审计