georgi-i/detectopod
GitHub: georgi-i/detectopod
针对保加利亚快递物流品牌的自动化钓鱼域名检测系统,通过CT日志和URLScan多源监控,结合规则评分与LLM验证产出公开威胁情报源。
Stars: 0 | Forks: 0
# Detectopod 🔍
**针对保加利亚快递服务的自动化钓鱼域名检测**
Detectopod 是一个自动化威胁情报系统,用于监控网络上冒充保加利亚快递和物流公司(如 Econt、Speedy 和 BulgariaPost)的钓鱼域名。该系统通过 GitHub Actions 持续运行,并维护一个公开的威胁源。
## 🎯 功能
Detectopod 能够识别具有以下特征的钓鱼域名:
- 冒充保加利亚快递品牌(Econt、Speedy、BulgariaPost 等)
- 使用可疑的 TLD(`.cfd`、`.tk`、`.ml`、`.ga` 等)
- 部署在免费托管平台上(Cloudflare Pages、Firebase、Heroku、Netlify、Vercel)
- 表现出典型的钓鱼模式(例如 `speedy.bg-pk.cfd`、`econt-paydelivery.cfd`)
## 🚀 特性
- **多源检测**:查询 URLScan.io、Google CT logs 和 Cloudflare CT logs
- **自动化扫描**:通过 GitHub Actions 每小时运行一次
- **智能评分**:基于域名模式的 ML 增强评分系统(0-100)
- **LLM 分析**:每天使用 Llama 3.3 70B 进行 AI 驱动的审查,以减少误报
- **公开威胁源**:实时更新的已检测域名 JSON 源
- **零基础设施**:完全使用 GitHub Actions 实现 Serverless
## 📊 当前统计
```
Total Domains Detected: 96
Last Scan: 2026-01-29 18:59:28 UTC
Domains Processed: 1,817
Detection Rate: 5.3%
```
## 🏗️ 架构
```
┌─────────────────┐
│ URLScan.io API │──┐
└─────────────────┘ │
│
┌─────────────────┐ │ ┌──────────────────┐
│ Google CT Logs │──┼────▶│ detectopod.py │
└─────────────────┘ │ │ (Main Scanner) │
│ └──────────────────┘
┌─────────────────┐ │ │
│ Cloudflare CT │──┘ │
└─────────────────┘ │
▼
┌──────────────────┐
│ Scoring Engine │
│ - Keyword match │
│ - Pattern detect │
│ - TLD analysis │
└──────────────────┘
│
▼
┌──────────────────┐
│ LLM Analyzer │
│ (Llama 3.3 70B) │
| (Claude S. 4.5) |
└──────────────────┘
│
▼
┌────────────────── ┐
│ Threat Feed │
│ phishing_feed.json│
└────────────────── ┘
```
## 🔧 安装
### 前置条件
- Python 3.10+
- URLScan.io API 密钥(提供免费额度)
- OpenRouter API 密钥(用于 LLM 分析,可选)
### 设置
1. **克隆仓库**
git clone https://github.com/yourusername/detectopod.git
cd detectopod
2. **安装依赖**
pip install -r detection/requirements.txt
pip install cryptography # 用于 CT log 支持
3. **设置环境变量**
export URLSCAN_API_KEY="your_urlscan_api_key"
export OPENROUTER_API_KEY="your_openrouter_key" # 可选
4. **运行扫描器**
# 快速扫描(仅 URLScan.io)
python detection/detectopod.py --sources urlscan
# 完整扫描(所有来源)
python detection/detectopod.py --sources urlscan google cloudflare
# 限时扫描
python detection/detectopod.py --duration 300 # 5 分钟
## 📋 使用
### 手动扫描
```
# 仅使用 URLScan.io 扫描(推荐用于快速测试)
python detection/detectopod.py --sources urlscan
# 使用所有来源进行全面扫描
python detection/detectopod.py --sources urlscan google cloudflare
# 运行特定持续时间
python detection/detectopod.py --duration 600 --sources urlscan
```
### LLM 分析
```
# 分析过去 24 小时的检测结果
python detection/llm_analyzer.py --days 1 --max-analyze 50
# 使用自定义阈值进行分析
python detection/llm_analyzer.py --min-score 80 --max-analyze 100
```
### 访问 Feed
威胁源会在 `feed/phishing_feed.json` 处自动更新:
```
[
{
"domain": "speedy.bg-pk.cfd",
"score": 100,
"detected_at": "2026-01-29T18:11:25.161773",
"source": "urlscan.io-.cfd"
}
]
```
## 🤖 GitHub Actions 工作流
### 定时检测 (`scheduled-detection.yml`)
- **频率**:每小时
- **来源**:URLScan.io + Google CT + Cloudflare CT
- **超时**:20 分钟
- **自动提交**:自动更新 feed
### LLM 分析 (`llm_analysis.yml`)
- **频率**:每天 UTC 时间凌晨 2 点
- **模型**:通过 OpenRouter 使用 Llama 3.3 70B
- **目的**:验证检测结果并移除误报
- **最大域名数**:每次运行 50 个
## 🎯 检测逻辑
### 评分系统 (0-100)
| 因素 | 权重 | 示例 |
|--------|--------|---------|
| 保加利亚快递品牌出现 | +35 | `speedy`, `econt`, `bgpost` |
| 地理指示符 | +15 | `.bg`, `bulgaria`, `bg-` |
| 可疑 TLD | +30 | `.cfd`, `.tk`, `.ml` |
| 免费托管平台 | +25 | `.pages.dev`, `.web.app` |
| 品牌 + 地理 + 可疑 TLD | +45 | `speedy.bg-pk.cfd` |
| 品牌 + 免费托管 | +40 | `speedy-37a.pages.dev` |
| 多个连字符(含品牌) | 每个 +8 | `speedy-trans-bg` |
| 随机字母数字模式 | +12 | `g63829`, `37a` |
| 钓鱼关键词 | +15 | `payment`, `verify`, `secure` |
**阈值**:评分 ≥80 的域名将被添加到 feed 中。
### 监控平台
**可疑 TLDs:**
`.cfd`, `.tk`, `.ml`, `.ga`, `.gq`, `.cf`, `.top`, `.xyz`, `.club`, `.online`, `.site`, `.space`, `.click`, `.link`, `.live`, `.icu`
**免费托管:**
Firebase (`.web.app`, `.firebaseapp.com`), Cloudflare Pages (`.pages.dev`), Heroku (`.herokuapp.com`), Netlify (`.netlify.app`), Vercel (`.vercel.app`), Render, GitHub Pages 等。
## 🎛️ 配置
### 目标关键词
**主要(保加利亚快递):**
`econt`, `speedy`, `bulgariapost`, `bgpost`, `samedaybg`, `boxnowbg`, `cityexpressbg`, `expressonebg`, `dhl`
**次要(通用物流):**
`tracking`, `delivery`, `shipment`, `parcel`, `payment`, `tax`, `fee`, `customer-center`
### 阈值
```
SCORE_THRESHOLD = 80 # Minimum score for feed inclusion
```
## 📈 性能
近期扫描统计:
- **扫描域名数**:约 1,800 个/小时
- **处理时间**:约 18 秒
- **检测率**:约 5%(发现 96 个钓鱼域名)
- **误报率**:<10%(经 LLM 验证)
## 🔐 安全注意事项
- 所有 API 密钥作为 GitHub Secrets 存储
- 仓库中无敏感数据
- 只读源(公开访问)
- 自动化威胁情报共享
## 🤝 贡献
欢迎贡献!改进领域:
1. **新检测模式**:建议额外的钓鱼指标
2. **扩大覆盖范围**:添加更多快递品牌或地区
3. **性能优化**:提高扫描效率
4. **减少误报**:增强评分算法
### 开发设置
```
# Fork 并 clone
git clone https://github.com/yourusername/detectopod.git
# 创建 feature branch
git checkout -b feature/new-detection-pattern
# 进行更改并测试
python detection/detectopod.py --sources urlscan
# 提交 PR
```
## 📜 许可证
MIT 许可证 - 详情请参阅 LICENSE 文件。
## 🙏 致谢
- [URLScan.io](https://urlscan.io/) - 主要数据源
- [Certificate Transparency](https://certificate.transparency.dev/) - CT log 基础设施
- [OpenRouter](https://openrouter.ai/) - LLM 分析 API
- 保加利亚网络安全社区
## 📞 联系方式
- **问题反馈**:[GitHub Issues](https://github.com/georgi-i/detectopod/issues)
- **讨论**:[GitHub Discussions](https://github.com/georgi-i/detectopod/discussions)
## ⚠️ 免责声明
本工具仅用于教育和防御性安全目的。威胁源按“原样”提供,不提供任何保证。在采取行动之前,请务必验证域名。
**状态**:🟢 活跃 | **最后更新**:2026-01-29 | **版本**:1.0
标签:Apex, BulgariaPost, CT日志监控, Econt, ESC4, GitHub Actions, Llama 3.3, LLM安全分析, OSINT, Python, Speedy, 保加利亚, 信誉评分, 品牌保护, 域名监控, 威胁情报, 实时处理, 开发者工具, 恶意域名, 无后门, 机器学习, 欺诈防护, 物流安全, 结构化查询, 网络安全, 自动化安全, 自动笔记, 逆向工具, 配置审计, 钓鱼检测, 防御框架, 隐私保护