据 AlphaMoat 统计,截至 2026-09,Moltbot Security 累计下载 3,920 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 2,645 位,在「AI 智能体」分类(969 个)中排名第 520 位。
| 平台 | 累计安装 | 累计下载 | 星标 | 评论 |
|---|---|---|---|---|
| ClawHub ↗ | 128 | 3,834 | 3 | - |
| SkillHub ↗ | 128 | 3,920 | 3 | — |
各平台的计数口径不同,统计时间不一致。
该指南涵盖 OpenClaw 等智能体系统的安全检查,包括网关暴露、权限、认证、防火墙和 SSH 配置。部分建议会以高权限修改系统,安装步骤还可能执行远程脚本;应先运行只读审计并审阅安装来源,任何修复或防火墙、SSH 改动都需逐项确认,同时保留控制台恢复方式。实际状态应通过环境审计验证,不能仅依赖指南判断已安全。
资料发布于 2026-10-29
以下是根据技能文档生成的示例,不代表实际运行结果。
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-09 | 3,920 | — | 3 |
| 2026-08 | 3,734 | +3.0% | 3 |
| 2026-07 | 3,626 | +6.5% | 3 |
| 2026-06 | 3,406 | +4.3% | 3 |
| 2026-05 | 3,266 | — | 3 |
| 2026-03 | 2,660 | — | 3 |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
--- name: moltbot-security description: Security hardening for AI agents - Moltbot, OpenClaw, Cursor, Claude. Lock down gateway, fix permissions, auth, firewalls. Essential for vibe-coding setups. version: 1.0.3 author: NextFrontierBuilds keywords: [moltbot, openclaw, security, hardening, gateway, firewall, tailscale, ssh, authentication, ai-agent, ai-coding, claude, cursor, copilot, github-copilot, chatgpt, devops, infosec, vibe-coding, ai-tools, developer-tools, devtools, typescript, automation, llm] --- # Moltbot Security Guide
Your Moltbot gateway was designed for local use. When exposed to the internet without proper security, attackers can access your API keys, private messages, and full system access.
**Based on:** Real vulnerability research that found 1,673+ exposed OpenClaw/Moltbot gateways on Shodan.
---
## TL;DR - The 5 Essentials
1. **Bind to loopback** — Never expose gateway to public internet
2. **Set auth token** — Require authentication for all requests
3. **Fix file permissions** — Only you should read config files
4. **Update Node.js** — Use v22.12.0+ to avoid known vulnerabilities
5. **Use Tailscale** — Secure remote access without public exposure
---
## What Gets Exposed (The Real Risk)
When your gateway is publicly accessible:
- Complete conversation histories (Telegram, WhatsApp, Signal, iMessage)
- API keys for Claude, OpenAI, and other providers
- OAuth tokens and bot credentials
- Full shell access to host machine
**Prompt injection attack example:** An attacker sends you an email with hidden instructions. Your AI reads it, extracts your recent emails, and forwards summaries to the attacker. No hacking required.
---
## Quick Security Audit
Run this to check your current security posture:
```bash
openclaw security audit --deep
```
Auto-fix issues:
```bash
openclaw security audit --deep --fix
```
---
## Step 1: Bind Gateway to Loopback Only
**What this does:** Prevents the gateway from accepting connections from other machines.
Check your `~/.openclaw/openclaw.json`:
```json
{
"gateway": {
"bind": "loopback"
}
}
```
**Options:**
- `loopback` — Only accessible from localhost (most secure)
- `lan` — Accessible from local network only
- `auto` — Binds to all interfaces (dangerous if exposed)
---
## Step 2: Set Up Authentication
**Option A: Token Authentication (Recommended)**
Generate a secure token:
```bash
openssl rand -hex 32
```
Add to your config:
```json
{
"gateway": {
"auth": {
"mode": "token",
"token": "your-64-char-hex-token-here"
}
}
}
```
Or set via environment:
```bash
export CLAWDBOT_GATEWAY_TOKEN="your-secure-random-token-here"
```
**Option B: Password Authentication**
```json
{
"gateway": {
"auth": {
"mode": "password"
}
}
}
```
Then:
```bash
export CLAWDBOT_GATEWAY_PASSWORD="your-secure-password-here"
```
---
## Step 3: Lock Down File Permissions
**What this does:** Ensures only you can read sensitive config files.
```bash
chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/openclaw.json
chmod 700 ~/.openclaw/credentials
```
**Permission meanings:**
- `700` = Only owner can access folder
- `600` = Only owner can read/write file
Or let OpenClaw fix it:
```bash
openclaw security audit --fix
```
---
## Step 4: Disable Network Broadcasting
**What this does:** Stops OpenClaw from announcing itself via mDNS/Bonjour.
Add to your shell config (`~/.zshrc` or `~/.bashrc`):
```bash
export CLAWDBOT_DISABLE_BONJOUR=1
```
Reload:
```bash
source ~/.zshrc
```
---
## Step 5: Update Node.js
Older Node.js versions have security vulnerabilities. You need **v22.12.0+**.
Check version:
```bash
node --version
```
**Mac (Homebrew):**
```bash
brew update && brew upgrade node
```
**Ubuntu/Debian:**
```bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
```
**Windows:** Download from [nodejs.org](https://nodejs.org/)
---
## Step 6: Set Up Tailscale (Remote Access)
**What this does:** Creates encrypted tunnel between your devices. Access OpenClaw from anywhere without public exposure.
**Install Tailscale:**
```bash
# Linux
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
# Mac
brew install tailscale
```
**Configure OpenClaw for Tailscale:**
```json
{
"gateway": {
"bind": "loopback",
"tailscale": {
"mode": "serve"
}
}
}
```
Now access via your Tailscale network only.
---
## Step 7: Firewall Setup (UFW)
**For cloud servers (AWS, DigitalOcean, Hetzner, etc.)**
**Install UFW:**
```bash
sudo apt update && sudo apt install ufw -y
```
**Set defaults:**
```bash
sudo ufw default deny incoming
sudo ufw default allow outgoing
```
**Allow SSH (don't skip!):**
```bash
sudo ufw allow ssh
```
**Allow Tailscale (if using):**
```bash
sudo ufw allow in on tailscale0
```
**Enable:**
```bash
sudo ufw enable
```
**Verify:**
```bash
sudo ufw status verbose
```
⚠️ **Never do this:**
```bash
# DON'T - exposes your gateway publicly
sudo ufw allow 18789
```
---
## Step 8: SSH Hardening
**Disable password auth (use SSH keys):**
```bash
sudo nano /etc/ssh/sshd_config
```
Change:
```
PasswordAuthentication no
PermitRootLogin no
```
Restart:
```bash
sudo systemctl restart sshd
```
---
## Security Checklist
Before deploying:
- [ ] Gateway bound to `loopback` or `lan`
- [ ] Auth token or password set
- [ ] File permissions locked (600/700)
- [ ] mDNS/Bonjour disabled
- [ ] Node.js v22.12.0+
- [ ] Tailscale configured (if remote)
- [ ] Firewall blocking port 18789
- [ ] SSH password auth disabled
---
## Config Template (Secure Defaults)
```json
{
"gateway": {
"port": 18789,
"bind": "loopback",
"auth": {
"mode": "token",
"token": "YOUR_64_CHAR_HEX_TOKEN"
},
"tailscale": {
"mode": "serve"
}
}
}
```
---
## Credits
Based on security research by [@NickSpisak_](https://x.com/NickSpisak_) who found 1,673+ exposed gateways on Shodan.
Original article: https://x.com/nickspisak_/status/2016195582180700592
---
## Installation
```bash
clawdhub install NextFrontierBuilds/moltbot, openclaw-security
```
Built by [@NextXFrontier](https://x.com/NextXFrontier)
把开发过程中的经验、错误与纠正记录为 Markdown 文件,供后续复用并晋升为工作区记忆。
用自然语言描述需求,在本地与远程技能市场里找技能并给出推荐的技能。
给 AI agent 用的浏览器自动化命令行技能。
把用户纠正与自我复盘沉淀成分层记忆、并按使用情况升降级的技能。
在安装第三方技能之前,按清单审查来源、权限与危险模式的技能。
把 agent 的记忆与跨技能状态存成带类型和约束的知识图谱的技能。
一份为 AI 代理规划主动跟进、工作记忆与复盘流程的工作区配置指南。
指导如何创建与更新有效 Claude 技能的写作指南。
为 AI agent 提供长期记忆分层的方案型技能。
AI PDF 生成器技能:从简单提示生成 SAFE、NDA、term sheet、白皮书与备忘录(npx ai-pdf-builder)。
约束智能体行为的实践准则技能。
Skill Scaffold 是用于创建 AI 智能体技能结构的 CLI 工具。
讲 X(Twitter)的算法规则与传播策略,给内容创作参考。
数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。