Back to skill

Security audit

Prts Sandbox

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Kali sandbox for security tools, but it enables high-impact command execution and offensive testing with weak scoping and an unauthenticated plaintext control API.

Review before installing. Use this only for systems you are explicitly authorized to test, avoid putting secrets or real credentials in command arguments, and make sure the Protocol Spaces API is isolated, authenticated, and not reachable by unintended network peers. Treat `reset` as potentially disruptive to sandbox state.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sandbox-cmd.sh:5
Finding

Unauthenticated Plaintext Command-Control API

Content
View full analysis

Vulnerability Details

File Location: scripts/sandbox-cmd.sh, lines 5–50
Vulnerability Type: Unauthenticated plaintext transmission of privileged API operations
Risk Level: High

Vulnerable Code

bash
API_URL="http://protocol-spaces-api:3000"

call_api() {
  local method=$1
  local endpoint=$2
  local extra_args=("${@:3}")

  local response
  response=$(curl -s -X "$method" "$API_URL$endpoint" "${extra_args[@]}" 2>&1)
  local curl_exit=$?

  if [ $curl_exit -ne 0 ]; then
    echo "{\"success\":false,\"error\":\"Cannot reach API ($curl_exit): $response\"}"
    return 1
  fi

  echo "$response"
}

case "$ACTION" in
  status)
    result=$(call_api GET /is_sandbox_start) || { echo "false"; exit 1; }
    echo "$result" | jq -r '.is_running'
    ;;

  start)
    call_api POST /start | jq .
    ;;

  stop)
    call_api POST /stop | jq .
    ;;

  reset)
    call_api POST /reset | jq .
    ;;

  exec)
    if [ $# -eq 0 ]; then
      echo '{"success":false,"error":"No command provided"}'
      exit 1
    fi

    JSON_CMD=$(jq -nc --args '$ARGS.positional' -- "$@")

    response=$(call_api POST /execute \
      -H "Content-Type: application/json" \
      -d "{\"cmd\":$JSON_CMD}")

Technical Analysis

The wrapper sends sandbox lifecycle operations and arbitrary command requests to http://protocol-spaces-api:3000. Plain HTTP provides neither transport confidentiality nor authenticated server identity. No authorization token, client certificate, request signature, or other application-level authentication is attached to the requests.

The /execute request may contain sensitive penetration-testing arguments, including target addresses, URLs, usernames, passwords, tokens, or other operational data. A party capable of observing the relevant network traffic can read these values. A party capable of manipulating routing, name resolution, or traffic can im ...[truncated 2429 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace plain HTTP with HTTPS and require strict certificate and hostname validation.
  2. Prefer mutual TLS for service-to-service communication so both the client and API authenticate one another.
  3. Require short-lived, narrowly scoped authorization credentials on every endpoint. Separate command-execution permission from lifecycle permissions such as reset and stop.
  4. Bind the API to a private interface or local transport where feasible, and enforce firewall or network-policy restrictions so only the intended client can connect.
  5. Apply server-side authorization regardless of network isolation; do not treat possession of network access as authentication.
  6. Enforce sandbox isolation and least privilege on the server, including a non-root runtime, restricted Linux capabilities, resource limits, filesystem controls, and appropriate seccomp or mandatory-access-control policies.
  7. Avoid passing credentials directly in command-line arguments. Use protected secret injection mechanisms and redact sensitive values from logs and errors.
  8. Validate response structure and handle malformed or unauthenticated responses as failures. Authenticated response integrity should come from TLS and, where warranted, application-level signing.
  9. Rotate any credentials that may previously have been transmitted over this plaintext channel after secure transport is deployed.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

YARA rule 'offensive_tool_references': References to well-known offensive security tools [hacktools]

High
Category
YARA Match
Confidence
95% confidence
Finding

This skill contains explicit instructions and examples for running offensive tools such as nmap, sqlmap, hydra, and crackmapexec. Although the stated purpose is sandboxing, the content materially enables reconnaissance, brute-force, and exploitation workflows, so the capability itself is dangerous if accessed by an unauthorized or insufficiently constrained user.

Content

Scanner excerpt · SKILL.md (reported line 47)May include surrounding context.

urs):**

bash
~/.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

Step 3 — Execute your command:

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"

Available tools

CategoryTools
Reconnmap, masscan, dnsrecon, dirb
Webnikto, gobuster, ffuf, sqlmap, curl, wget
Auth attackshydra, crackmapexec
SMB/ADsmbclient, enum4linux, crackmapexec
Password crackingjohn, hashcat
Scriptingpython3, nc

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes shell-execution capability through a wrapper script but does not declare any explicit tool scope or permissions boundaries in the skill manifest. That omission makes enforcement and review harder, and can allow broader-than-expected command execution through the skill, especially since it is explicitly designed to run risky commands.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill actively guides use of offensive and high-impact security tooling but provides no clear authorization, legality, or target-impact warning. In practice this can normalize unauthorized scanning, brute forcing, or exploitation attempts and increase the risk of misuse against third-party systems.

Content

No source excerpt is available for this finding.

YARA rule 'network_reconnaissance': Network reconnaissance and scanning patterns [hacktools]

Medium
Category
YARA Match
Confidence
88% confidence
Finding

The listed tools include network reconnaissance utilities such as enum4linux and dnsrecon, which facilitate target discovery and environment mapping. In the context of a shell-enabled sandbox skill, these references indicate practical recon capability that can be misused even if the author's stated intent is containment rather than abuse.

Content

Scanner excerpt · SKILL.md (reported line 58)May include surrounding context.

h ~/.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"

text

---

## Available tools

| Category | Tools |
|----------|-------|
| Recon | `nmap`, `masscan`, `dnsrecon`, `dirb` |
| Web | `nikto`, `gobuster`, `ffuf`, `sqlmap`, `curl`, `wget` |
| Auth attacks | `hydra`, `crackmapexec` |
| SMB/AD | `smbclient`, `enum4linux`, `crackmapexec` |
| Password cracking | `john`, `hashcat` |
| Scripting | `python3`, `nc` |

---

## Troubleshooting**Step 2 — Start it if stopped (or Reset if error occurs):**
```bash
~/.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/scri

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script exposes start, stop, and reset actions that change sandbox state, including a potentially destructive reset, but provides no confirmation prompt, warning message, or descriptive comment for users at the call sites. For a code file, state-changing or irreversible operations should have some form of disclosure unless the warning is provided elsewhere, which is not visible in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The exec branch accepts arbitrary command arguments and sends them to the /execute API endpoint for execution, but the script does not print or document that it is transmitting commands for remote execution. This is a safety-relevant operation involving subprocess-like execution and a network call, yet there is no visible warning, confirmation, or explanatory comment for the user.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The inline comment is written in Thai (แก้บัค...) while the rest of the script and interface are in English, imposing a specific language choice in the skill artifact without offering user choice or documenting a locale-specific reason. This matches the language/locale policy concern for natural-language content in code comments.

Content

No source excerpt is available for this finding.