garrv105/quantum-iot-security

GitHub: garrv105/quantum-iot-security

一个结合后量子密码学与IoT威胁检测、自动化事件响应的生产级安全平台。

Stars: 0 | Forks: 0

# 量子物联网安全 [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/87bb319780141717.svg)](https://github.com/garrv105/quantum-iot-security/actions/workflows/ci.yml) [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) **物联网安全的量子增强事件响应** — 一个生产级平台,结合后量子密码学与实时物联网威胁检测和自动化事件响应。 ## 功能 ### 物联网设备指纹识别 - 通过协议、端口和时序分析对物联网设备进行行为识别 - 自动设备分类(传感器、摄像头、网关、执行器、控制器) - 基于余弦相似度的设备比较 ### 异常检测 - 轻量级 Isolation Forest 和 Local Outlier Factor 模型 - 专为资源受限的物联网环境设计 - 实时评分与威胁等级分类 ### 后量子密码学 - 基于格(Kyber 风格)的密钥交换,可抵抗量子攻击 - 使用 PQC 派生密钥材料的 AES-256-GCM 安全通道 - X.509 证书管理用于物联网设备身份验证 ### 事件响应自动化 - 基于威胁等级的自动化响应策略 - 设备隔离、告警和流量阻断 - 取证证据收集与保存 ### 固件分析 - 静态分析:熵计算、字符串提取、CVE 匹配 - 已知漏洞数据库,含 CVSS 评分 - 固件版本比较,用于安全回归检测 ### 合规性与报告 - NIST 物联网网络安全框架映射 - IEC 62443 工业物联网合规检查 - 事件、设备清单和固件审计的 JSON 报告生成 ## 安装 ``` # 克隆仓库 git clone https://github.com/garrv105/quantum-iot-security.git cd quantum-iot-security # 使用 pip 安装 pip install -e ".[dev]" ``` ## 快速入门 ### 命令行界面 ``` # 显示平台状态 qiot status # 分析固件漏洞 qiot analyze-firmware path/to/firmware.bin # 测试后量子密钥交换 qiot pqc-test --dimension 256 # 运行完整演示 qiot demo ``` ### API 服务器 ``` uvicorn quantum_iot_security.api.server:app --reload # 访问 http://localhost:8000/docs 查看交互式 API 文档 ``` ### Docker ``` docker build -f docker/Dockerfile -t quantum-iot-security . docker run -p 8000:8000 quantum-iot-security ``` ## 架构 ``` quantum_iot_security/ ├── core/ # Device fingerprinting, anomaly detection, incident response ├── crypto/ # Post-quantum key exchange, AES-GCM channels, certificates ├── firmware/ # Static firmware analysis and vulnerability database ├── network/ # Traffic monitoring and topology mapping ├── reporting/ # Report generation and compliance frameworks ├── api/ # FastAPI management interface └── cli.py # Click CLI entry point ``` ## 测试 ``` # 运行所有测试并生成覆盖率报告 pytest tests/ -v --cov=quantum_iot_security # 运行特定测试模块 pytest tests/test_pqc_crypto.py -v ``` ## API 端点 | 方法 | 路径 | 描述 | |------|------|------| | GET | `/health` | 系统健康状态 | | POST | `/traffic/ingest` | 摄入流量观测数据 | | GET | `/devices` | 列出已知设备 | | POST | `/devices/{id}/fingerprint` |构建设备指纹 | | GET | `/incidents` | 列出安全事件 | | POST | `/incidents/{id}/resolve` | 解决事件 | | GET | `/firmware` | 列出固件分析 | ## 依赖项 - **numpy** + **scikit-learn** — 异常检测模型 - **cryptography** — AES-GCM 加密,X.509 证书 - **pydantic** — 数据验证与序列化 - **click** — CLI 框架 - **fastapi** + **uvicorn** — REST API ## 许可证 MIT 许可证 — 详见 [LICENSE](LICENSE)。
标签:AES-256-GCM, AMSI绕过, Apex, CISA项目, CVE, IEC 62443, incident response, IoT安全, IP 地址批量处理, Isolation Forest, Kyber, Local Outlier Factor, NIST, PKINIT, post-quantum cryptography, X.509证书, 后量子密码学, 固件分析, 威胁检测, 密码学, 密钥交换, 工控安全, 异常检测, 手动系统调用, 数字签名, 无线安全, 机器学习, 熵分析, 物联网安全, 网络安全, 网络安全审计, 自动化响应, 设备指纹, 请求拦截, 逆向工具, 量子安全, 防御绕过, 隐私保护