H0neyBe/honeybee_potstore

GitHub: H0neyBe/honeybee_potstore

HoneyBee PotStore 是一个预配置的分布式蜜罐仓库,通过与 HoneyBee 编排框架集成实现零配置部署和集中化威胁情报收集。

Stars: 0 | Forks: 1

# 🍯 HoneyBee PotStore **用于分布式威胁情报的官方蜜罐仓库** [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Protocol Version](https://img.shields.io/badge/Protocol-v2-blue.svg)](https://github.com/H0neyBe/honeybee_core) [![Honeypots](https://img.shields.io/badge/Honeypots-2-green.svg)](https://github.com/H0neyBe/honeybee_potstore) [![Status](https://img.shields.io/badge/Status-Active-success.svg)](https://github.com/H0neyBe/honeybee_potstore) **仓库:** [`github.com/H0neyBe/honeybee_potstore`](https://github.com/H0neyBe/honeybee_potstore) [快速开始](#-quick-start) • [可用蜜罐](#-available-honeypots) • [文档](#-documentation) • [贡献](#-contributing)
## 🌟 关于 **HoneyBee PotStore** 是为 [HoneyBee](https://github.com/H0neyBe/honeybee_core) 分布式蜜罐编排框架设计的一流生产就绪型蜜罐集合。可以将其视为**蜜罐的 App Store** —— 一个精心策划的仓库,安全专业人员可以在其中发现、部署和管理蜜罐,实现零配置开销。 ### 为什么选择 PotStore? 🔒 **企业级就绪** | 🚀 **零配置部署** | 🔄 **自动集成** | 🌐 **多协议** | 📊 **实时情报** PotStore 中的每个蜜罐都: - ✅ **预先配置** 内置 HoneyBee 集成 - ✅ **经过实战检验** 在生产环境中测试过 - ✅ **自动管理** 由 HoneyBee 节点管理 - ✅ **跨平台** 兼容 (Linux, Windows, macOS) - ✅ **事件驱动** 具备实时威胁情报能力 ## ⚡ 快速开始 在 **60 秒内**部署您的第一个蜜罐: ``` { "version": 2, "message": { "NodeCommand": { "node_id": 12345, "command": { "InstallPot": { "pot_id": "cowrie-01", "honeypot_type": "cowrie", "config": { "ssh_port": "2222", "telnet_port": "2223" }, "auto_start": true } } } } } ``` **接下来会发生什么?** 1. 🎯 节点克隆 PotStore 仓库 2. 📦 自动安装依赖 3. ⚙️ 配置 HoneyBee 集成 4. 🚀 启动蜜罐 (如果 `auto_start: true`) 5. 📡 事件实时流向 Core ## 🎯 可用蜜罐 ### 生产就绪 | 蜜罐 | 🏷️ 类型 | 📡 协议 | 📦 版本 | ✅ 状态 | 📝 描述 | |----------|---------|-------------|------------|-----------|----------------| | **🐄 Cowrie** | SSH/Telnet | SSH, Telnet | `2.9.0` | 🟢 稳定版 | 中高交互的 SSH/Telnet 蜜罐,带有高级命令记录功能 | | **🪄 HonnyPotter** | WordPress | HTTP, HTTPS | `1.2.0` | 🟢 稳定版 | 用于捕获暴力破解和凭证填充的 WordPress 登录蜜罐 | ### 🐄 Cowrie - SSH/Telnet 蜜罐 **SSH 蜜罐的瑞士军刀**
点击展开功能和详情 #### ✨ 特性 - 🔐 **SSH 蜜罐** - 完整的 SSH 协议模拟 - 📞 **Telnet 蜜罐** - 遗留协议支持 - 📝 **命令记录** - 跟踪每一个执行的命令 - 📥 **文件下载跟踪** - 监控恶意软件下载 - 🎬 **会话录制** - 完整的会话回放 - 🔌 **自定义插件** - 可扩展架构 - 🐍 **Python 3.7+** - 现代化的 Python 支持 #### 🔧 默认配置 ``` SSH Port: 2222 Telnet Port: 2223 Hostname: honeybee-{pot_id} Log Path: var/log/cowrie ``` #### 📦 安装 ``` # 自动(通过 HoneyBee Node) # 或手动安装: cd cowrie python3 -m venv venv source venv/bin/activate pip install -r requirements.txt ``` #### 🎯 应用场景 - 检测 SSH 暴力破解攻击 - 监控凭证填充尝试 - 跟踪攻击者行为和技巧 - 收集恶意软件样本 - 研究和威胁情报
### 🪄 HonnyPotter - WordPress 蜜罐 **Web 应用程序的沉默卫士**
点击展开功能和详情 #### ✨ 特性 - 🌐 **WordPress 模拟** - 逼真的登录界面 - 🔨 **暴力破解检测** - 识别攻击模式 - 📋 **凭证记录** - 捕获被盗凭证 - 🔗 **XML-RPC 支持** - 检测基于 API 的攻击 - ⚡ **低资源占用** - 最小的系统足迹 - 🗄️ **无数据库** - 独立运行 - 🔌 **插件模式** - WordPress 集成选项 #### 🔧 默认配置 ``` HTTP Port: 8080 (configurable) HTTPS Port: 443 Mode: Standalone or WordPress Plugin ``` #### 📦 安装 ``` # 自动(通过 HoneyBee Node) # 或手动安装: cd HonnyPotter chmod +x install.sh ./install.sh ``` #### 🎯 应用场景 - WordPress 暴力破解检测 - 凭证填充监控 - Web 应用程序攻击分析 - 威胁情报收集 - 安全研究
## 🚀 未来计划 ### 即将推出 我们正在构建业界**最全面的蜜罐集合**。以下是路线图: | 蜜罐 | 📡 协议 | 🎯 状态 | 📝 描述 | |----------|-------------|-----------|----------------| | **🦎 Dionaea** | FTP, HTTP, SMB, MySQL | 🚧 开发中 | 低交互的多协议蜜罐 | | **📢 Heralding** | 多种协议 | 🚧 计划中 | 用于多种协议的凭证蜜罐 | | **🔍 Elasticpot** | HTTP | 🚧 计划中 | 针对搜索引擎攻击的 Elasticsearch 蜜罐 | | **📧 Mailoney** | SMTP | 🚧 计划中 | 针对基于电子邮件攻击的 SMTP 蜜罐 | | **🌐 Glastopf** | HTTP, HTTPS | 🚧 计划中 | Web 应用程序蜜罐 | | **🔐 Kippo** | SSH | 🚧 计划中 | 遗留 SSH 蜜罐 (兼容性) | ### 🎁 即将推出的功能 - 🔄 **版本管理** - 支持多蜜罐版本 - 🏪 **自定义仓库** - 添加您自己的蜜罐 - 🧪 **自动化测试** - CI/CD 验证流水线 - 🐳 **Docker 支持** - 容器化部署 - 📋 **配置模板** - 预构建的配置文件 - ✅ **Schema 验证** - 标准化事件格式验证 - 📊 **分析仪表板** - 实时威胁可视化 - 🔔 **警报系统** - 智能威胁通知 ### 🤝 贡献 **我们 ❤️ 贡献者!** 帮助我们构建蜜罐编排的未来。 请参阅我们的[贡献指南](CONTRIBUTING.md)了解: - ➕ 添加新蜜罐 - 🔧 改进现有蜜罐 - 🐛 报告问题 - 💡 提出功能建议 - 📚 编写文档 ## 🏗️ 架构 ### 系统概览 ``` ┌─────────────────────────────────────────────────────────────┐ │ HoneyBee Ecosystem │ └─────────────────────────────────────────────────────────────┘ ┌─────────────────┐ │ HoneyBee Core │ ← Central Orchestration Manager │ (Manager) │ • Node Management └────────┬────────┘ • Event Aggregation │ • Command Distribution │ Protocol v2 │ ┌────────▼────────┐ │ HoneyBee Node │ ← Honeypot Installer & Manager │ (Installer) │ • Git Operations └────────┬────────┘ • Dependency Management │ • Process Control │ Git Clone │ ┌────────▼────────┐ ┌──────────────┐ │ PotStore Repo │─────▶│ Honeypot │ ← Threat Detection │ (This Repo) │ │ Instance │ • Attack Capture └─────────────────┘ └──────┬───────┘ • Event Generation │ │ Events (TCP:9100) │ JSON Lines ┌───────▼───────┐ │ HoneyBee │ ← Event Forwarder │ Node │ • Event Collection └──────┬───────┘ • Protocol Conversion │ │ Protocol v2 ┌───────▼───────┐ │ HoneyBee │ ← Intelligence Hub │ Core │ • Event Storage └──────────────┘ • Analytics • Alerting ``` ### 🔄 工作流 ``` sequenceDiagram participant Core as HoneyBee Core participant Node as HoneyBee Node participant PotStore as PotStore participant Honeypot as Honeypot Instance Core->>Node: InstallPot Command Node->>PotStore: Git Clone PotStore-->>Node: Honeypot Code Node->>Node: Install Dependencies Node->>Node: Configure Integration Node->>Honeypot: Start Process Honeypot->>Node: Events (TCP:9100) Node->>Core: Forward Events (Protocol v2) Core->>Core: Store & Analyze ``` **逐步说明:** 1. **🎯 命令** - Core 向节点发送 `InstallPot` 命令 2. **📥 克隆** - 节点克隆 PotStore 仓库 3. **📦 提取** - 节点提取指定的蜜罐 4. **⚙️ 安装** - 节点自动安装依赖 5. **🔧 配置** - 节点配置 HoneyBee 集成 6. **🚀 启动** - 节点启动蜜罐 (如果 `auto_start: true`) 7. **📡 事件** - 蜜罐通过 TCP 向节点发送事件 8. **🔄 转发** - 节点通过 Protocol v2 将事件转发给 Core 9. **📊 分析** - Core 存储并分析事件 ## 📡 Protocol v2 - 命令参考 ### 🎯 安装蜜罐 (Install Pot) 从 PotStore 或自定义 Git 仓库安装蜜罐: ``` { "version": 2, "message": { "NodeCommand": { "node_id": 12345, "command": { "InstallPot": { "pot_id": "cowrie-01", "honeypot_type": "cowrie", "git_url": null, "git_branch": null, "config": { "ssh_port": "2222", "telnet_port": "2223", "hostname": "honeybee-cowrie" }, "auto_start": true } } } } } ``` **📋 参数:** | 参数 | 类型 | 必填 | 描述 | |-----------|------|----------|-------------| | `pot_id` | string | ✅ 是 | 此实例的唯一标识符 | | `honeypot_type` | string | ✅ 是 | 类型:`cowrie`, `honnypotter` 等 | | `git_url` | string | ❌ 否 | 自定义 Git URL (默认为 PotStore) | | `git_branch` | string | ❌ 否 | Git 分支 (默认为 `main`) | | `config` | object | ❌ 否 | 蜜罐专用配置 | | `auto_start` | boolean | ❌ 否 | 安装后启动 (默认:`false`) | ### ▶️ 部署 (启动) 蜜罐 (Deploy Pot) 启动蜜罐实例: ``` { "version": 2, "message": { "NodeCommand": { "node_id": 12345, "command": { "DeployPot": "cowrie-01" } } } } ``` ### ⏹️ 停止蜜罐 (Stop Pot) 停止正在运行的蜜罐: ``` { "version": 2, "message": { "NodeCommand": { "node_id": 12345, "command": { "StopPot": "cowrie-01" } } } } ``` ### 🔄 重启蜜罐 (Restart Pot) 重启蜜罐实例: ``` { "version": 2, "message": { "NodeCommand": { "node_id": 12345, "command": { "RestartPot": "cowrie-01" } } } } ``` ### 📊 获取蜜罐状态 (Get Pot Status) 获取蜜罐的当前状态: ``` { "version": 2, "message": { "NodeCommand": { "node_id": 12345, "command": { "GetPotStatus": "cowrie-01" } } } } ``` **📥 响应:** ``` { "version": 2, "message": { "PotStatusUpdate": { "node_id": 12345, "pot_id": "cowrie-01", "pot_type": "cowrie", "status": "Running", "message": "Honeypot is active and receiving connections" } } } ``` ### 📋 获取所有已安装的蜜罐 (Get All Installed Pots) 列出节点上所有已安装的蜜罐: ``` { "version": 2, "message": { "NodeCommand": { "node_id": 12345, "command": { "GetInstalledPots": {} } } } } ``` ## 🔌 事件集成 ### 📡 事件流 ``` ┌──────────┐ TCP:9100 ┌──────────┐ Protocol v2 ┌──────────┐ │ Honeypot │ ──── JSON Lines ──▶│ Node │ ──── Events ────▶│ Core │ └──────────┘ └──────────┘ └──────────┘ ``` ### 📝 事件格式 事件以 **JSON Lines** (每行一个 JSON 对象) 的形式发送到 `localhost:9100`: ``` { "eventid": "cowrie.login.success", "src_ip": "192.168.1.100", "src_port": 54321, "dst_port": 2222, "username": "admin", "password": "password123", "session": "abc123", "message": "Login successful", "timestamp": "2024-01-15T10:30:00Z" } ``` ### 🎯 事件类型 #### 🐄 Cowrie 事件 | 事件类型 | 描述 | 数据字段 | |------------|-------------|-------------| | `cowrie.login.success` | 成功登录 | `username`, `password`, `src_ip` | | `cowrie.login.failed` | 登录失败尝试 | `username`, `password`, `src_ip` | | `cowrie.command.input` | 执行的命令 | `input`, `session`, `src_ip` | | `cowrie.session.file_download` | 文件已下载 | `url`, `outfile`, `session` | | `cowrie.session.closed` | 会话终止 | `session`, `duration` | #### 🪄 HonnyPotter 事件 | 事件类型 | 描述 | 数据字段 | |------------|-------------|-------------| | `honnypotter.login.failed` | 登录失败 | `username`, `password`, `ip` | | `honnypotter.xmlrpc.attack` | XML-RPC 攻击 | `method`, `username`, `ip` | | `honnypotter.bruteforce.detected` | 检测到暴力破解 | `ip`, `attempts`, `timeframe` | ## ➕ 添加新蜜罐 ### 📋 要求清单 - [ ] ✅ 可安装 (Python:`pip install -r requirements.txt` 或 PHP:独立运行) - [ ] ✅ 支持 Python 3.7+ 或 PHP 7.4+ - [ ] ✅ 事件转发到 TCP socket `localhost:9100` - [ ] ✅ JSON 格式 (每行一个事件) - [ ] ✅ 包含安装说明 - [ ] ✅ 提供 HoneyBee 集成代码 ### 🛠️ 实施步骤 1. **📁 创建目录** mkdir honeybee_potstore/your-honeypot cd your-honeypot 2. **📦 添加依赖** - Python:`requirements.txt` - PHP:`composer.json` 或独立运行 3. **🔌 实现事件转发** - 发送事件到 `localhost:9100` - 使用 JSON Lines 格式 4. **⚙️ 添加 HoneyBee 集成** - 输出插件 (Python) - 转发脚本 (PHP) 5. **📝 更新清单** - 向 `potstore.json` 添加条目 6. **🧪 测试安装** - 验证安装成功 - 测试事件转发 7. **📤 提交 PR** - 创建 Pull Request - 包含相关文档 ### 💻 代码示例 #### 🐍 Python 集成 ``` # honeybee-integration/honeybee.py import json import socket import os from datetime import datetime class HoneyBeeOutput: def __init__(self): self.port = int(os.getenv('HONEYBEE_EVENT_PORT', '9100')) self.pot_id = os.getenv('HONEYBEE_POT_ID', 'honeypot-01') def send_event(self, event_type, data): event = { "pot_id": self.pot_id, "event_type": event_type, "timestamp": datetime.utcnow().isoformat() + "Z", "data": data } try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(('localhost', self.port)) sock.sendall((json.dumps(event) + '\n').encode()) sock.close() except Exception as e: print(f"Failed to send event: {e}") ``` #### 🐘 PHP 集成 ``` $potId, 'event_type' => $eventData['event_type'], 'timestamp' => date('c'), 'data' => $eventData ]; $socket = @fsockopen('localhost', $port, $errno, $errstr, 1); if ($socket) { fwrite($socket, json_encode($event) . "\n"); fclose($socket); return true; } return false; } ?> ``` ## 🧪 测试 ### 🐄 测试 Cowrie
点击展开测试指南 #### 第 1 步:克隆仓库 ``` git clone https://github.com/H0neyBe/honeybee_potstore.git cd honeybee_potstore/cowrie ``` #### 第 2 步:安装依赖 ``` python3 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt ``` #### 第 3 步:配置输出 编辑 `etc/cowrie.cfg`: ``` [output_socketlog] enabled = true address = 127.0.0.1:9100 timeout = 5 ``` #### 第 4 步:启动蜜罐 ``` bin/cowrie start ``` #### 第 5 步:测试连接 ``` ssh -p 2222 admin@localhost # 尝试:ls, whoami, exit ``` #### 第 6 步:验证事件 检查事件是否发送到 `localhost:9100`
### 🪄 测试 HonnyPotter
点击展开测试指南 #### 第 1步:克隆仓库 ``` git clone https://github.com/H0neyBe/honeybee_potstore.git cd honeybee_potstore/HonnyPotter ``` #### 第 2 步:安装 ``` chmod +x install.sh ./install.sh ``` #### 第 3 步:启动 PHP 服务器 ``` php -S 0.0.0.0:8080 standalone.php ``` #### 第 4 步:测试登录端点 ``` curl -X POST http://localhost:8080/standalone.php \ -d "log=admin&pwd=password123" ``` #### 第 5 步:验证事件 检查事件是否发送到 HoneyBee 节点
## ⚙️ 配置 ### 🔧 支持的配置键 | 键 | 类型 | 默认值 | 描述 | |-----|------|---------|-------------| | `ssh_port` | string | `"2222"` | Cowrie 的 SSH 端口 | | `telnet_port` | string | `"2223"` | Cowrie 的 Telnet 端口 | | `http_port` | string | `"8080"` | HonnyPotter 的 HTTP 端口 | | `https_port` | string | `"443"` | HTTPS 端口 | | `hostname` | string | `"honeybee-{id}"` | 蜜罐主机名 | | `log_path` | string | `"var/log"` | 日志目录 | | `data_path` | string | `"var/lib"` | 数据目录 | | `pot_id` | string | `"{id}"` | 蜜罐实例 ID | ### 🌍 环境变量 HoneyBee 节点会自动为蜜罐设置以下变量: | 变量 | 默认值 | 描述 | |----------|---------|-------------| | `HONEYBEE_EVENT_PORT` | `9100` | 发送事件的端口 | | `HONEYBEE_POT_ID` | `{pot_id}` | 蜜罐实例 ID | | `HONEYBEE_HONEYPOT_TYPE` | `{type}` | 蜜罐类型 | | `HONEYBEE_ENABLE` | `true` | 启用集成 | ## 🔧 故障排除 ### ❌ 安装失败 **症状:** 蜜罐安装失败并出现错误 **解决方案:** 1. ✅ 检查 Python/PHP 是否已安装:`python3 --version` 或 `php -v` 2. ✅ 验证 Git 是否可用:`git --version` 3. ✅ 检查磁盘空间:`df -h` 4. ✅ 查看节点日志获取详细错误 5. ✅ 确保与 GitHub 的网络连接正常 ### 🚫 蜜罐无法启动 **症状:** 安装成功但蜜罐无法启动 **解决方案:** 1. ✅ 验证所有依赖已安装 2. ✅ 检查配置文件是否有效 3. ✅ 确保端口未被占用:`netstat -tuln | grep 2222` 4. ✅ 查看蜜罐日志 5. ✅ 检查文件权限 ### 📡 事件未转发 **症状:** 蜜罐运行但事件未到达 Core **解决方案:** 1. ✅ 验证端口 9100 上的事件监听器:`netstat -tuln | grep 9100` 2. ✅ 检查蜜罐输出插件配置 3. ✅ 验证网络连接 4. ✅ 启用调试日志记录 5. ✅ 检查防火墙规则 ### 🔌 端口冲突 **症状:** 端口被占用错误 **解决方案:** 1. ✅ 在配置中更改端口 2. ✅ 停止冲突的服务 3. ✅ 使用不同的端口范围 ## 📚 文档 - 📖 [完整文档](https://github.com/H0neyBe/bee_docs) - 🔌 [Protocol v2 规范](https://github.com/H0neyBe/bee_docs/blob/main/src/protocol/protocol.md) - 🎯 [蜜罐集成指南](https://github.com/H0neyBe/bee_docs/blob/main/src/potstore/integration.md) - ➕ [添加新蜜罐](https://github.com/H0neyBe/bee_docs/blob/main/src/potstore/adding.md) ## 🔗 相关项目 | 项目 | 描述 | 链接 | |---------|-------------|------| | **🍯 HoneyBee Core** | 中央编排管理器 | [GitHub](https://github.com/H0neyBe/honeybee_core) | | **🖥️ HoneyBee Node** | 蜜罐节点实现 | [GitHub](https://github.com/H0neyBe/honeybee_node) | | **📚 Bee Docs** | 完整文档 | [GitHub](https://github.com/H0neyBe/bee_docs) | ## 💬 支持与社区 - 🐛 **问题:** [GitHub Issues](https://github.com/H0neyBe/honeybee_potstore/issues) - 💬 **讨论:** [GitHub Discussions](https://github.com/H0neyBe/honeybee_potstore/discussions) - 📧 **电子邮件:** [联系维护者](mailto:maintainers@honeybee.dev) ## 📄 许可证 本项目基于 **MIT 许可证** 授权 - 有关详细信息,请参阅 [LICENSE](LICENSE) 文件。
**由 HoneyBee 团队用 ❤️ 制作** [⭐ 在 GitHub 上为我们加星](https://github.com/H0neyBe/honeybee_potstore) • [🐛 报告 Bug](https://github.com/H0neyBe/honeybee_potstore/issues) • [💡 请求功能](https://github.com/H0neyBe/honeybee_potstore/issues)
标签:DNS枚举, FTP漏洞扫描, Homebrew安装, HoneyBee, Honeypot, 事件驱动, 企业级安全, 分布式系统, 响应大小分析, 多协议, 威胁情报, 安全监测, 安全编排, 开发者工具, 攻击分析, 特权提升, 红队行动, 网络安全, 网络安全工具, 网络安全研究, 自动化部署, 蜜罐, 证书利用, 逆向工具, 隐私保护, 集中式管理, 零配置部署