hollieshuang/ipv6-ai-exposure-research

GitHub: hollieshuang/ipv6-ai-exposure-research

首个针对IPv6网络中AI基础设施暴露度的系统性测量研究项目,提供IDS检测规则、分析脚本与匿名数据集以识别和评估AI服务的公网暴露风险。

Stars: 0 | Forks: 0

# IPv6 AI 基础设施暴露度测量

License Python Research

## 📖 概述 本仓库包含了对 IPv6 AI 基础设施暴露度的**首次系统性测量**,包括检测规则、分析脚本以及我们在 [USENIX Security 2027] 上发表的研究数据集。 ### 核心发现 | 指标 | 数值 | |--------|-------| | 扫描的 IPv6 地址 | 530,000+ | | 暴露的 AI Endpoint | 1,347 | | Ollama 服务器 | 4 (11434/tcp) | | gRPC AI 后端 | 30 (50051/tcp) | | AI Web 服务 | 1,067 (5000/tcp) | | 攻击成本 | 每 100 个 /64 前缀 **1.5 分钟** | | 平均暴露窗口 | **35 小时** | ### 研究论文 ``` "Unveiling the Hidden Attack Surface: Large-scale Measurement of IPv6 AI Infrastructure Exposure" Anonymous Submission, USENIX Security 2027 ``` ## 🎯 快速开始 ### 1. 安装依赖 ``` # Clone 仓库 git clone https://github.com/[your-username]/ipv6-ai-exposure-research.git cd ipv6-ai-exposure-research # 安装 Python 依赖 pip install -r requirements.txt ``` ### 2. 运行检测规则 ``` # 针对 Snort sudo snort -c detection_rules/snort_ai_exposure.rules -i eth0 # 针对 Suricata sudo suricata -c detection_rules/ -i eth0 # 针对 Zeek zeek -C -b detection_rules/zeek/ai_banner_extract.zeek -i eth0 ``` ### 3. 分析您的网络 ``` # 扫描 IPv6 地址以检查 AI 服务暴露情况 python analysis_scripts/masscan_ipv6_ai_scan.py --target 2402:e740::/64 # 探测 Ollama 服务 python analysis_scripts/ollama_probe.py --input exposed_hosts.txt # 检测 honeypot python analysis_scripts/honeypot_detector.py --data scan_results.db ``` ## 📂 仓库结构 ``` ipv6-ai-exposure-research/ ├── README.md # This file ├── LICENSE # MIT License ├── CITATION.cff # Citation file ├── requirements.txt # Python dependencies │ ├── detection_rules/ # 🚨 IDS Detection Rules │ ├── README.md # Usage guide │ ├── snort_ai_exposure.rules # 17 Snort/Suricata rules │ └── zeek/ # Zeek scripts │ ├── ai_banner_extract.zeek # Banner extraction │ └── ai_exposure_tracker.zeek # Exposure tracking │ ├── analysis_scripts/ # 🔍 Analysis Tools │ ├── masscan_ipv6_ai_scan.py # IPv6 AI service scanner │ ├── ollama_probe.py # Ollama service probe │ ├── grpc_probe.py # gRPC service probe │ ├── honeypot_detector.py # Honeypot detection │ ├── trend_analyzer.py # Trend analysis │ └── requirements.txt # Script dependencies │ ├── deployment/ # 📦 Deployment Guides │ ├── DEPLOYMENT_CERNET2.md # CERNET2 measurement node │ ├── scan_config.conf # masscan configuration │ └── bandwidth_control.sh # Bandwidth management │ ├── data/ # 📊 Datasets (Anonymized) │ ├── README.md # Data documentation │ ├── cernet2_baseline.json # CERNET2 exposure baseline │ ├── longitudinal_tracking.json # Time-series analysis │ └── honeypot_analysis.json # Honeypot detection results │ └── docs/ # 📚 Documentation ├── architecture.md # System architecture ├── ethic_statement.md # Ethics statement └── troubleshooting.md # Troubleshooting guide ``` ## 🛡️ 检测规则 ### Snort/Suricata 规则(17 条) | SID | 服务 | 检测内容 | 严重程度 | |-----|---------|----------|----------| | 9000001 | Ollama | 模型枚举 (/api/tags) | HIGH | | 9000002 | Ollama | 推理滥用 (/api/generate) | CRITICAL | | 9000003 | Ollama | 模型下载 (/api/pull) | CRITICAL | | 9000004 | Ollama | 版本泄露 (/api/version) | MEDIUM | | 9000005 | gRPC | HTTP/2 连接探测 | MEDIUM | | 9000006 | gRPC | 明文传输(无 TLS) | HIGH | | 9000007 | OpenClaw | Endpoint 暴露 | MEDIUM | | 9000008 | OpenClaw | WebSocket 连接 | HIGH | | 9000009 | vLLM | 模型枚举 (/v1/models) | HIGH | | 9000010 | vLLM | 推理滥用 (/v1/chat/completions) | CRITICAL | | 9000011 | AI Web | Flask/Gradio 暴露 | MEDIUM | | 9000012 | MySQL | 数据库与 AI 共同暴露 | CRITICAL | | 9000013 | Redis | Redis 与 AI 共同暴露 | HIGH | | 9000014 | Ollama | DoS 攻击(高频) | MEDIUM | | 9000015 | Ollama | CVE-2024-37032 (RCE) | CRITICAL | | 9000016 | Ollama | CVE-2024-39720 (任意文件读取) | HIGH | | 9000017 | 通用 | IPv6 AI 扫描模式 | MEDIUM | ### Zeek 脚本 #### ai_banner_extract.zeek 从网络流量中提取 AI 服务 Banner: - 识别 Ollama、gRPC、vLLM、OpenClaw 服务 - 提取版本信息和模型列表 - 自动评估风险等级 #### ai_exposure_tracker.zeek 跟踪 AI 服务的长期暴露情况: - 跨快照持久性分析 - 暴露持续时间计算 - 趋势报告生成 ## 🔬 分析脚本 ### masscan_ipv6_ai_scan.py 使用 masscan 的 IPv6 AI 服务扫描器: ``` python analysis_scripts/masscan_ipv6_ai_scan.py \ --target 2402:e740::/48 \ --rate 22000 \ --output scan_results.json ``` ### ollama_probe.py 探测 Ollama 服务的漏洞: ``` python analysis_scripts/ollama_probe.py \ --input exposed_hosts.txt \ --output vulnerability_report.json ``` ### honeypot_detector.py 使用熵分析检测蜜罐网络: ``` python analysis_scripts/honeypot_detector.py \ --data scan_results.db \ --threshold 0.9 ``` ## 📊 核心结果 ### CERNET2 暴露基线 ``` Total Scanned: 530,000+ IPv6 addresses Unique Exposed IPs: 1,347 AI Port Ratio: 60.8% Service Breakdown: ├── Ollama (11434): 4 instances ├── gRPC AI (50051): 30 instances ├── AI Web (5000): 1,067 instances ├── OpenClaw (18789): 3 instances └── Other AI: 35 instances ``` ### 持久性分析 ``` Snapshot Period: 2026-07-11 to 2026-07-18 Snapshots Analyzed: 4 Persistence Rates: ├── gRPC AI (50051): 73.7% - Stable inference services ├── Ollama (11434): 100% - Stable deployments └── AI Web (5000): 9.7% - Temporary dev environments ``` ### 蜜罐检测 ``` Detection Method: Port exposure entropy analysis Threshold: H > 0.9 (normalized entropy) Result: 60%-96% of global AI exposure is honeypot Detected Honeypot Prefixes: ├── fffe::/16 (H=0.9471) ├── col0::/24 └── one1::/24 ``` ## 🛠️ 部署 ### CERNET2 测量节点 请参阅 [DEPLOYMENT_CERNET2.md](deployment/DEPLOYMENT_CERNET2.md) 获取详细说明。 **要求:** - 具备 IPv6 连接的 Linux 服务器 - CERNET2 网络访问权限 - Python 3.9+ - masscan v1.3.9+ **快速设置:** ``` # Clone 配置 cp deployment/scan_config.conf.example scan_config.conf # 编辑配置 vim scan_config.conf # 启动 scanner python analysis_scripts/masscan_ipv6_ai_scan.py --config scan_config.conf ``` ## 📚 文档 | 文档 | 描述 | |----------|-------------| | [检测规则指南](detection_rules/README.md) | 如何部署 IDS 规则 | | [分析脚本指南](analysis_scripts/README.md) | 如何使用分析工具 | | [部署指南](deployment/DEPLOYMENT_CERNET2.md) | CERNET2 测量部署设置 | | [架构](docs/architecture.md) | 系统架构概述 | | [道德声明](docs/ethics_statement.md) | 研究道德规范 | | [故障排除](docs/troubleshooting.md) | 常见问题与解决方案 | ## 🎓 引用 如果您在工作中使用了本研究或代码,请引用: ``` @article{ipv6-ai-exposure-2026, title={Unveiling the Hidden Attack Surface: Large-scale Measurement of IPv6 AI Infrastructure Exposure}, author={Anonymous Authors}, booktitle={USENIX Security Symposium 2027}, year={2027}, note={Anonymous Submission} } ``` ## 📄 许可证 本项目基于 **MIT 许可证** 授权 - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。 **代码**: MIT 许可证 **数据**: CC BY 4.0 ## ⚠️ 道德声明 本研究遵循负责任的安全研究实践: 1. **授权扫描**: 所有扫描均在授权的基础设施 (CERNET2) 上进行,并获得了适当的许可 2. **无个人数据**: 未收集或存储任何个人信息 3. **漏洞披露**: 已通过适当渠道报告已识别的漏洞 4. **数据最小化**: 仅收集和保留必要的数据 5. **学术目的**: 研究仅为学术和防御目的而进行 有关完整详细信息,请参阅 [道德声明](docs/ethics_statement.md)。 ## 📧 联系方式 **研究团队**: IPv6 AI 暴露度测量小组 有关本研究的疑问,请参阅论文或提交 issue。

属于 IPv6 AI 安全研究倡议的一部分

标签:IPv6, Metaprompt, PowerShell, Python, 人工智能基础设施, 代码示例, 密码管理, 插件系统, 数据分析, 无后门, 网络安全, 隐私保护