HEMAKSHICrypts/Satellite-Cybersecurity-IDS

GitHub: HEMAKSHICrypts/Satellite-Cybersecurity-IDS

人工智能驱动的卫星通信入侵检测系统,解决实时威胁检测、加密与自愈防御问题。

Stars: 0 | Forks: 0

# 🛰️ 智能卫星网络安全入侵检测系统 [![Python](https://img.shields.io/badge/Python-3.12-blue.svg)](https://python.org) [![Machine Learning](https://img.shields.io/badge/ML-IsolationForest-green.svg)](https://scikit-learn.org) [![Security](https://img.shields.io/badge/Security-JWT%2BFernet-red.svg)](https://cryptography.io) [![Flask](https://img.shields.io/badge/Flask-2.3.2-orange.svg)](https://flask.palletsprojects.com) ## 📌 项目概述 这是一个用于卫星通信的**人工智能驱动的入侵检测系统(IDS)**。它模拟了空间机构(如 **ISRO、NASA 和 SpaceX**)使用的真实网络安全场景。 系统使用机器学习学习“正常”卫星行为,并自动实时检测并阻止网络攻击。 ## 🔐 功能特性 | 功能 | 描述 | 技术 | |---------|-------------|------------| | **命令认证** | 每条命令必须包含有效令牌 | JWT | | **命令加密** | 所有命令使用军用级加密 | Fernet (AES-128) | | **AI 异常检测** | 学习正常模式并检测攻击 | 孤立森林(Isolation Forest) | | **自愈防御** | 自动阻止恶意 IP 地址 | Python | | **实时仪表板** | 实时攻击监控与可视化 | Streamlit + Plotly | | **攻击模拟** | 测试系统对 10+ 种攻击模式的防御能力 | 自定义 | ## 🎯 检测的攻击类型 | 攻击类型 | 描述 | 检测方法 | |-------------|-------------|------------------| | ⏰ **定时攻击** | 在异常时间(如凌晨 3 点)发送命令 | AI 异常评分 | | ⚡ **快速爆发攻击** | 短时间内连续发送多条命令 | 命令间隔分析 | | 🌍 **地理欺骗** | 来自未知或不可信 IP 的命令 | IP 源追踪 | | 🔄 **序列攻击** | 不可能的命令序列 | 行为 AI | | 🔑 **令牌伪造** | 伪造的 JWT 令牌 | JWT 验证 | | 📡 **命令注入** | 未知或恶意命令 | 命令白名单 | ## 🏗️ 系统架构 ``` ┌─────────────────┐ ┌─────────────────────────────────────────────┐ │ Ground Station │────▶│ Satellite Server │ │ (Command Sender)│ │ ┌─────────────────────────────────────┐ │ └─────────────────┘ │ │ 1. JWT Authentication │ │ │ │ 2. Fernet Decryption │ │ │ │ 3. AI Anomaly Detection │ │ │ │ 4. Risk Assessment │ │ │ │ 5. Self-Healing (IP Blocking) │ │ │ └─────────────────────────────────────┘ │ └─────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────┐ │ Dashboard (Streamlit) │ │ - Live Command Feed │ │ - Anomaly Score Graph │ │ - Attack Alerts │ │ - Geo-IP Threat Map │ └─────────────────────────────────────────────┘ ``` ## 📸 系统截图 ### 1. AI 模型训练 ![AI 训练](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/d97f7f5177091054.png) ### 2. 卫星服务器运行中 ![卫星服务器](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/677bc74cf4091056.png) ### 3. 地面站发送命令 ![地面站](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/776a63c6e1091100.png) ### 4. 攻击者被阻止 ![攻击者被阻止](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/5bc6e13f72091102.png) ### 5. 实时安全仪表板 ![仪表板](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/69205bde50091105.png) ## 🛠️ 技术栈 | 类别 | 技术 | |----------|--------------| | **后端** | Python, Flask, Flask-CORS | | **机器学习** | Scikit-learn(孤立森林)、Pandas、NumPy | | **安全** | PyJWT, Cryptography (Fernet) | | **前端** | Streamlit, Plotly | | **测试** | 自定义攻击模拟器 | ## 🚀 安装与设置 ### 先决条件 - Python 3.8 或更高版本 - pip 包管理器 ### 步骤 1:克隆仓库 ``` git clone https://github.com/HEMAKSHICrypts/Satellite-Cybersecurity-IDS.git cd Satellite-Cybersecurity-IDS ``` 步骤 2:安装依赖 ``` pip install -r requirements.txt ``` 步骤 3:训练 AI 模型 ``` python train_ai.py ``` 这将生成 isolation_forest.pkl —— 已训练的 AI 模型 步骤 4:启动卫星服务器 ``` python satellite.py ``` 保持此终端运行 步骤 5:启动仪表板(新终端) ``` streamlit run dashboard.py ``` 打开浏览器并加载实时仪表板 步骤 6:使用地面站测试(新终端) ``` python ground_station.py ``` 向卫星发送合法命令 步骤 7:使用攻击者测试(新终端) ``` python attacker.py ``` 模拟网络攻击 —— 所有攻击都应被**阻止** 📊 预期输出 ✅ 正常命令(地面站) ``` { "status": "EXECUTED", "command": "CAPTURE_IMAGE", "risk": "LOW", "score": 0.12 } ``` 🚨 攻击被阻止(攻击者) ``` { "status": "INVALID_TOKEN", "message": "Attack blocked by AI Defense" } ``` 📈 仪表板指标 · 当前风险评分: -0.55 (高) · 活跃威胁数: 3 · 每分钟命令数: 142 · 已阻止 IP 数: 7 📁 项目结构 ``` Satellite-Cybersecurity-IDS/ │ ├── train_ai.py # Trains Isolation Forest model ├── satellite.py # Main satellite server (Flask) ├── ground_station.py # Legitimate command sender ├── attacker.py # Attack simulation script ├── dashboard.py # Streamlit dashboard ├── requirements.txt # Python dependencies ├── generate_key.py # Generates encryption key │ ├── screenshots/ # Screenshots for README │ ├── dashboard.png │ ├── satellite.png │ ├── attacker.png │ ├── groundstation.png │ └── trainai.png │ ├── isolation_forest.pkl # Trained AI model (auto-generated) └── README.md # This file ``` 🎓 项目的独特之处 方面 为何特别 对学生 在印度计算机科学课程中极为罕见 真实应用 模拟 ISRO/NASA 级别的安全性 AI + 网络安全 结合两个高需求领域 生产级 使用 JWT、Fernet、孤立森林 自愈能力 自动威胁响应 可视化分析 带有图表的实时仪表板 🔄 后续增强 · 添加更多攻击模式(DoS、中间人攻击) · 实现区块链用于命令日志记录 · 添加电子邮件/SMS 关键攻击警报 · 部署到云端(AWS/Azure) · 添加历史攻击分析 · 多卫星支持 📝 许可证 本项目根据 MIT 许可证授权 —— 详情见 LICENSE 文件。 👨‍💻 作者 Hemakshi · GitHub: @HEMAKSHICrypts ⭐ 表示支持 如果您发现此项目有帮助或有趣,请在 GitHub 上给予 ⭐ 支持! 🚀 专为卫星网络安全构建
标签:AES-128, Apex, Fernet, Flask, IP封锁, ISRO, JWT, Kubernetes, NASA, Plotly, Python, SEO, SpaceX, 人工智能, 令牌伪造, 关键词, 加密, 卫星通信, 命令注入, 地理伪装, 实时异常检测, 实时看板, 序列攻击, 快速爆发攻击, 攻击模拟, 无后门, 时序攻击, 机器学习, 流lit, 漏洞扫描器, 用户模式Hook绕过, 网络安全, 自愈防御, 航天, 逆向工具, 隐私保护, 隔离森林, 驱动签名利用