PRTS Sandbox
An isolated Kali Linux 2025.4 container. All pentest tools and risky commands run here — never on the host.
Script path
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh
When to use sandbox vs host
| Task | Where |
|---|
| Running pentest tools (nmap, hydra, sqlmap, etc.) | ✅ Sandbox |
| Executing downloaded/unknown scripts |
✅ Sandbox |
| Anything that could break the host | ✅ Sandbox |
| Editing memory/SOUL.md/agent files | ❌ Host |
| Reading internal agent files | ❌ Host |
How to run a command (3 steps)
Step 1 — Check if sandbox is running:
CODEBLOCK1
Step 2 — Start it if stopped (or Reset if error occurs):
CODEBLOCK2
Step 3 — Execute your command:
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh exec nmap -sV 192.168.1.1
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh exec sqlmap -u "http://target/page?id=1"
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh exec sh -c "hydra -l admin -P /wordlist.txt ssh://192.168.1.10"
Available tools
| Category | Tools |
|---|
| Recon | INLINECODE0 , masscan, dnsrecon, INLINECODE3 |
| Web |
nikto,
gobuster,
ffuf,
sqlmap,
curl,
wget |
| Auth attacks |
hydra,
crackmapexec |
| SMB/AD |
smbclient,
enum4linux,
crackmapexec |
| Password cracking |
john,
hashcat |
| Scripting |
python3,
nc |
TroubleshootingStep 2 — Start it if stopped (or Reset if error occurs):
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh start
# CRITICAL RULE: If the start command fails with an error stating "the container name 'protocol-space-active' is already in use", you MUST run `reset`:
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh reset
| Problem | Fix |
|---------|-----|
| Commands fail / sandbox behaves oddly | Run `sandbox-cmd.sh reset` |
| API unreachable | Tell user: "Protocol Spaces API is offline" |
| Need a new tool installed | Ask user to install it — do NOT run `apt-get install` yourself |
| `start` returns error: "container name is already in use" | Run `sandbox-cmd.sh reset`, then verify `status` is true. |
| Commands fail / sandbox behaves oddly | Run `sandbox-cmd.sh reset` |
| API unreachable | Tell user: "Protocol Spaces API is offline" |
| Need a new tool installed | Ask user to install it — do NOT run `apt-get install` yourself |
---
## Quick reference
bash
SANDBOX="~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh"
$SANDBOX status # Check if running
$SANDBOX start # Start sandbox
$SANDBOX stop # Stop sandbox
$SANDBOX reset # Reset / fix broken sandbox
$SANDBOX exec # Run a command inside sandbox
```
PRTS 沙箱
一个隔离的 Kali Linux 2025.4 容器。所有渗透测试工具和危险命令都在此运行——绝不在宿主机上执行。
脚本路径
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh
何时使用沙箱 vs 宿主机
| 任务 | 执行位置 |
|---|
| 运行渗透测试工具(nmap、hydra、sqlmap 等) | ✅ 沙箱 |
| 执行下载/未知脚本 |
✅ 沙箱 |
| 任何可能破坏宿主机的操作 | ✅ 沙箱 |
| 编辑 memory/SOUL.md/agent 文件 | ❌ 宿主机 |
| 读取内部 agent 文件 | ❌ 宿主机 |
如何运行命令(3 个步骤)
步骤 1 — 检查沙箱是否在运行:
bash
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh status
返回:true(运行中)或 false(已停止)
步骤 2 — 如果已停止则启动(如果出现错误则重置):
bash
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh start
关键规则:如果启动命令失败并显示错误容器名称protocol-space-active已被使用,则必须运行 reset:
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh reset
步骤 3 — 执行你的命令:
bash
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh exec nmap -sV 192.168.1.1
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh exec sqlmap -u http://target/page?id=1
~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh exec sh -c hydra -l admin -P /wordlist.txt ssh://192.168.1.10
可用工具
| 类别 | 工具 |
|---|
| 侦察 | nmap、masscan、dnsrecon、dirb |
| Web |
nikto、gobuster、ffuf、sqlmap、curl、wget |
| 认证攻击 | hydra、crackmapexec |
| SMB/AD | smbclient、enum4linux、crackmapexec |
| 密码破解 | john、hashcat |
| 脚本 | python3、nc |
故障排除
| 问题 | 解决方法 |
|---|
| 命令失败/沙箱行为异常 | 运行 sandbox-cmd.sh reset |
| API 无法访问 |
告知用户:Protocol Spaces API 离线 |
| 需要安装新工具 | 请用户安装——不要自行运行 apt-get install |
| start 返回错误:容器名称已被使用 | 运行 sandbox-cmd.sh reset,然后验证 status 是否为 true。 |
| 命令失败/沙箱行为异常 | 运行 sandbox-cmd.sh reset |
| API 无法访问 | 告知用户:Protocol Spaces API 离线 |
| 需要安装新工具 | 请用户安装——不要自行运行 apt-get install |
快速参考
bash
SANDBOX=~/.openclaw/skills/prts-sandbox/scripts/sandbox-cmd.sh
$SANDBOX status # 检查是否在运行
$SANDBOX start # 启动沙箱
$SANDBOX stop # 停止沙箱
$SANDBOX reset # 重置/修复损坏的沙箱
$SANDBOX exec # 在沙箱内运行命令