zencefilefendi/satguard

GitHub: zencefilefendi/satguard

一款用于分析 Starlink 终端遥测数据并检测 GPS 欺骗与信号干扰的开源安全分析工具包。

Stars: 22 | Forks: 5

# 🛡️ SatGuard - 卫星遥测安全分析器
![SatGuard](https://img.shields.io/badge/SatGuard-v1.0.0-00d4aa?style=for-the-badge&logo=satellite&logoColor=white) ![Python](https://img.shields.io/badge/Python-3.10+-3776ab?style=for-the-badge&logo=python&logoColor=white) ![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge) **高级 GPS 欺骗检测与卫星遥测分析工具包** [English](#features) • [Türkçe](docs/README_TR.md) • [文档](docs/) • [演示](https://satguard.demo)
## 🎯 概述 SatGuard 是一个开源工具包,用于分析卫星终端遥测数据并检测 GPS 欺骗/干扰攻击。专为监控针对民用卫星基础设施的国家级电子战的安全研究人员、记者和人权组织而设计。 ### 核心功能 - 🔍 **遥测解析器** - 解析并分析 Starlink 调试遥测数据 - 🚨 **异常检测** - 基于 ML 的 GPS 欺骗检测算法 - 📊 **交互式仪表板** - 实时可视化卫星健康指标 - 🌍 **多区域分析** - 比较不同地理区域的干扰模式 - 📱 **适配移动端** - 响应式设计,适合现场部署 ## 🚀 快速开始 ``` # 克隆 repository git clone https://github.com/zencefilefendi/satguard.git cd satguard # 安装 dependencies pip install -r requirements.txt # 对 telemetry data 运行 analysis python -m satguard analyze --input data/telemetry.json # 启动 dashboard python -m satguard dashboard --port 8080 ``` ## 📦 安装说明 ### 前置条件 - Python 3.10+ - Node.js 18+ (用于仪表板) - 至少 512MB RAM ### 通过 PyPI 安装 ``` pip install satguard ``` ### 通过源码安装 ``` git clone https://github.com/zencefilefendi/satguard.git cd satguard pip install -e . ``` ## 🔬 功能 ### 1. 遥测解析器 将原始的 Starlink 调试遥测数据解析为结构化分析: ``` from satguard import TelemetryParser parser = TelemetryParser() data = parser.parse_file("debug_export.json") print(f"GPS Status: {data.gps.status}") print(f"Satellites: {data.gps.satellite_count}") print(f"Spoofing Detected: {data.gps.is_inhibited}") ``` ### 2. GPS 欺骗检测 多因素检测算法分析以下指标: | 指标 | 正常 | 干扰 | 欺骗 | |-----------|--------|---------|----------| | 卫星数量 | 10-18 | 0-5 | 10-18 | | GPS 有效性 | ✅ | ❌ | ✅ | | 抑制标志 | ❌ | ❌ | ✅ | | 丢包率 | <1% | 不定 | 15-30% | ``` from satguard import SpoofingDetector detector = SpoofingDetector() result = detector.analyze(telemetry_data) print(f"Attack Type: {result.attack_type}") # SPOOFING, JAMMING, or NONE print(f"Confidence: {result.confidence}%") print(f"Severity: {result.severity}") ``` ### 3. 性能影响分析 量化 GPS 干扰对连通性的影响: ``` from satguard import PerformanceAnalyzer analyzer = PerformanceAnalyzer() impact = analyzer.measure_impact(telemetry_data) print(f"Packet Loss: {impact.packet_loss_percent}%") print(f"Stable Connection Time: {impact.stable_seconds}s") print(f"Pointing Error: {impact.pointing_error_deg}°") print(f"Service Level: {impact.service_level}") # BROADBAND, DEGRADED, UNUSABLE ``` ### 4. 交互式仪表板 支持 WebSocket 的实时监控: ``` satguard dashboard --config config.yaml ``` 功能: - 实时遥测流 - GPS 星座可视化 - 历史趋势分析 - 警报通知 - 导出为 PDF/CSV ## 📊 示例输出 ``` ╔══════════════════════════════════════════════════════════════╗ ║ SATGUARD ANALYSIS REPORT ║ ╠══════════════════════════════════════════════════════════════╣ ║ Terminal ID: [REDACTED] ║ ║ Location: Iran (IR) ║ ║ Analysis Time: 2026-01-15 14:32:00 UTC ║ ╠══════════════════════════════════════════════════════════════╣ ║ ║ ║ 🚨 GPS SPOOFING DETECTED ║ ║ ║ ║ Evidence: ║ ║ ├─ GPS Valid: true (hardware functional) ║ ║ ├─ Satellites: 18 (normal count) ║ ║ ├─ Inhibit Flag: TRUE (anti-spoofing triggered) ║ ║ └─ Confidence: 94.2% ║ ║ ║ ║ Impact Assessment: ║ ║ ├─ Packet Loss: 22.4% (sustained) ║ ║ ├─ Stable Connection: 0 seconds ║ ║ ├─ Pointing Error: 1.06° (3.3x uncertainty) ║ ║ └─ Service Level: SEVERELY DEGRADED ║ ║ ║ ║ Recommendation: ║ ║ └─ Deploy RF shielding or relocate terminal ║ ║ ║ ╚══════════════════════════════════════════════════════════════╝ ``` ## 🗺️ 区域分析 SatGuard 包含已知 GPS 干扰区域的数据: | 区域 | 主要攻击类型 | 典型影响 | |--------|---------------------|----------------| | 伊朗 | 欺骗 | 20-30% 丢包率 | | 东地中海 | 欺骗 | 15-25% 丢包率 | | 乌克兰/俄罗斯边境 | 干扰 + 欺骗 | 不定 | | 朝鲜边境 | 干扰 | 信号丢失 | ## 🔧 配置说明 创建 `config.yaml`: ``` satguard: analysis: spoofing_threshold: 0.85 min_satellites_normal: 8 max_packet_loss_normal: 0.05 dashboard: port: 8080 refresh_interval: 5 enable_alerts: true export: format: ["json", "csv", "pdf"] redact_pii: true ``` ## 📚 文档 - [完整文档](docs/) - [API 参考](docs/api.md) - [Türkçe Dokümantasyon](docs/README_TR.md) - [检测算法](docs/algorithms.md) - [贡献指南](CONTRIBUTING.md) ## 🙏 致谢与鸣谢 本项目建立在卫星安全领域的开创性研究之上: SatGuard 中的检测算法和分析方法均源自并扩展了这些基础性工作。我们对使这一切成为可能的前期研究深表感激。 ### 其他参考资料 - SpaceX Starlink 技术文档 - GPS.gov 干扰检测指南 - 关于 GNSS 欺骗检测的学术论文 ## 📄 许可证 MIT 许可证 - 详情请参阅 [LICENSE](LICENSE)。 这是自由软件。您可以在保留署名的前提下自由使用、修改和分发它。 ## ⚠️ 免责声明 本工具仅供**防御性安全研究**使用。请勿用于: - 干扰卫星通信 - GPS 欺骗或干扰 - 任何非法活动 用户需自行遵守当地法律法规。 ## 📬 联系方式 - **作者:** Zencefil Efendi - **Twitter:** [@zencefilefendi](https://twitter.com/zencefil_efendi) - **Email:** zencefilefendi@gmail.com
**为互联网自由而用 🛡️ 构建** *保护民用卫星基础设施免受国家级攻击*
标签:Apex, GPS欺骗检测, MITM代理, Mutation, Python, 代码示例, 卫星通信, 可视化, 数据分析, 无后门, 机器学习, 逆向工具