Back to skill

Security audit

ZeroTier Remote Web Access

Security checks for vulnerabilities and agentic risk

Overview

This skill is aimed at remote OpenClaw access, but it exposes the gateway more broadly than the stated ZeroTier-only purpose and weakens authentication controls.

Review carefully before installing. Use this only on a trusted host and network, avoid the pipe-to-sudo installer, do not bind the gateway to 0.0.0.0, keep device authentication enabled, restrict firewall rules to the ZeroTier interface or subnet, and rotate any token that appears in terminal logs or backups.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (7)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:25
Finding

Unverified Remote Installer Executed with Root Privileges

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/enable-remote.mjs:69
Finding

Gateway Exposed on All Interfaces with Authentication Protections Disabled

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/enable-remote.mjs:87
Finding

Gateway Bearer Token Printed in Plaintext and Copied into Backups

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/check-status.mjs:108
Finding

Shell Command Injection Through Configuration-Derived Port

Content
View full analysis
/dev/null | grep :${port}`); if (output) { log(COLORS.green, `✅ Port listening: ${port} is open`); return true; } log(COLORS.red, `❌ Port listening: ${port} is not open`); return false; } ``` The command reaches: ```js return execSync(cmd, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'] }); ``` ### Technical Analysis The `gateway.port` value is loaded from JSON without type, range, or syntax validation and interpolated directly into a command interpreted by a shell. JSON does not require this property to be numeric. A value containing shell metacharacters can terminate or extend the intended `grep` command. For example, a malicious string structurally equivalent to `1880; attacker-command` would cause the shell to execute the additional command when the status script runs. ### Attack Path 1. An attacker or compromised local component obtains write access to `~/.openclaw/openclaw.json`. 2. The attacker sets `gateway.port` to a string containing shell metacharacters and an operating-system command. 3. A user or Agent runs `check-status.mjs`. 4. The script interpolates the untrusted value into the `ss | grep` shell pipeline. 5. `execSync` invokes a shell, which interprets and executes the injected command. ### Impact Assessment Injected commands execute with the privileges of the user running the status script. This can permit access to that user's files, OpenClaw configuration and credentials, modification of workspace content, execution of additional paylo ...[truncated 128 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
SKILL.md:157
Finding

ZeroTier Service Persistence Enabled Without Explicit Lifecycle Controls

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/disable-remote.mjs:41
Finding

Disable Workflow Leaves Dangerous Authentication Flags Enabled

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/enable-remote.mjs:111
Finding

Parse-Blocking Await Usage Makes Enable and Disable Workflows Inoperable

Content
View full analysis
/dev/null | head -5', { encoding: 'utf8' } ); ``` ### Technical Analysis Both files use `await` inside ordinary functions that are not declared `async`. In standard Node.js ESM parsing, this is invalid syntax. The entire module is rejected before execution, regardless of whether the affected function is eventually called. Consequently, the supplied enable and disable workflows cannot reliably execute. The defect is security-relevant because the advertised rollback mechanism is unavailable, potentially leaving users dependent on manual commands or unable to restore a secure local-only state. ### Attack Path 1. A user attempts to enable or disable remote access using the documented Node.js command. 2. Node.js parses the module before running its main body. 3. Parsing encounters `await` inside a non-`async` function. 4. Node.js terminates with a syntax error. 5. The intended configuration or security rollback is not performed. 6. A user may incorrectly assume the operation succeeded or resort to error-prone manual recovery commands. ### Impact Assessment The primary impact is loss of availability and reliability of security-sensitive configuration management. In particular, failure of the disable workflow can delay restoration of local-only access. No direct privilege escalation results from the syntax defect alone. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (23)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill presents the setup as safe because it avoids direct public Internet exposure, but later instructs binding the gateway to all interfaces and weakening auth. That mismatch is dangerous because users may underestimate the exposure created by 0.0.0.0 and trust ZeroTier as a substitute for application-layer authentication.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
99% confidence
Finding

The documentation instructs fetching and executing an external script directly from the Internet. This is a classic supply-chain risk because users are encouraged to trust remote code without review, signature verification, or integrity checks, and it executes with elevated privileges.

Content

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

systemctl status zerotier-one

如果未安装

curl https://install.zerotier.com | sudo bash

text

2. **已加入 ZeroTier 网络**

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The command chains network retrieval directly into privileged shell execution, eliminating opportunities for review or integrity validation. This magnifies the impact of any compromise of the upstream script or user environment into immediate root-level code execution.

Content

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

systemctl status zerotier-one

如果未安装

curl https://install.zerotier.com | sudo bash

text

2. **已加入 ZeroTier 网络**

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The enablement steps emphasize convenience and automatic reconfiguration but do not prominently warn that the service will become remotely reachable and that the shown configuration weakens authentication. Users following the instructions could unintentionally expose a sensitive control interface to all ZeroTier peers or additional interfaces.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation explicitly recommends allowInsecureAuth: true and dangerouslyDisableDeviceAuth: true while exposing the web interface remotely. This weakens authentication controls for a network-exposed service and is not necessary for the stated ZeroTier-only remote access use case, increasing the chance of unauthorized access if the overlay network is misconfigured or a peer is compromised.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script claims to enable ZeroTier-only remote access, but it sets customBindHost to 0.0.0.0, exposing the gateway on every network interface, including LAN and potentially other reachable networks. Combined with allowInsecureAuth: true and dangerouslyDisableDeviceAuth: true, this broadens exposure far beyond the stated trust boundary and can enable unauthorized remote access if the host is reachable.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
98% confidence
Finding

This line runs a remote installation script fetched over the network directly into sudo bash, granting root privileges to unaudited content. If the installer source, transport, or hosting is compromised, the system can be fully compromised immediately.

Content

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

systemctl status zerotier-one

如果未安装

curl https://install.zerotier.com | sudo bash

text

2. **已加入 ZeroTier 网络**

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

  1. 已加入 ZeroTier 网络
    bash
    # 加入网络 (需要 Network ID)
    sudo zerotier-cli join <Network-ID>
    
    # 在 zerotier.com 网页授权设备
    

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

bash
# 列出所有备份
ls -la ~/.openclaw/openclaw.json.backup-*

# 恢复到指定备份
cp ~/.openclaw/openclaw.json.backup-20260304-152800 ~/.openclaw/openclaw.json

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

问题 1: ZeroTier 服务未运行

bash
systemctl start zerotier-one
systemctl enable zerotier-one

问题 2: 设备未授权

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
zerotier-cli listnetworks

# 检查防火墙
sudo ufw allow 9993/udp  # ZeroTier 端口
sudo ufw allow 1880/tcp  # Gateway 端口

# 测试连通性

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
94% confidence
Finding

Opening TCP 1880 at the firewall expands reachability of the gateway beyond local-only access. In the context of this skill, that is particularly risky because the documented gateway configuration also weakens authentication, so the firewall rule materially increases exposure to unauthorized access.

Content

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

md
# 检查防火墙
sudo ufw allow 9993/udp  # ZeroTier 端口
sudo ufw allow 1880/tcp  # Gateway 端口

# 测试连通性
ping <ZeroTier-IP>

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains user-facing natural-language output and comments centered on Chinese, including the top-level description and subsequent console messages, without any opt-in or alternative locale. That creates a language/locale policy concern because the skill effectively forces one language for interaction rather than offering user choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code performs a direct write to the user's OpenClaw configuration, changing port, bind mode, and allowed origins. Although it logs success afterward, there is no confirmation prompt or advance user-facing warning immediately before the irreversible config modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script kills the existing gateway process and starts a new one using subprocess execution. While progress messages are printed, there is no explicit user confirmation before disrupting the running service, which is a safety-relevant operational change.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
runCommand('pkill -f "openclaw-gateway"', true);
  runCommand('sleep 2', true);
  runCommand(`nohup openclaw gateway > /tmp/openclaw-gateway.log 2>&1 &`, true);
  runCommand('sleep 5', true);
  
  const checkOutput = runCommand('pgrep -f "openclaw-gateway"', true);

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/disable-remote.mjs (reported line 79)May include surrounding context.

js
runCommand('pkill -f "openclaw-gateway"', true);
  runCommand('sleep 2', true);
  runCommand(`nohup openclaw gateway > /tmp/openclaw-gateway.log 2>&1 &`, true);
  runCommand('sleep 5', true);
  
  const checkOutput = runCommand('pgrep -f "openclaw-gateway"', true);

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/enable-remote.mjs (reported line 125)May include surrounding context.

js
runCommand('pkill -f "openclaw-gateway"', true);
  runCommand('sleep 2', true);
  runCommand(`nohup openclaw gateway > /tmp/openclaw-gateway.log 2>&1 &`, true);
  runCommand('sleep 5', true);
  
  const checkOutput = runCommand('pgrep -f "openclaw-gateway"', true);

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script starts the service with openclaw gateway but verifies restart success using pgrep -f "openclaw-gateway", which may not match the actual spawned process name. This can produce false success or false failure states, leaving operators believing remote access has been disabled when the gateway may not have restarted correctly or may still be running in an unexpected state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains user-facing natural-language strings in Chinese, including status output and setup instructions, but does not provide any opt-in or alternative locale. Per the policy, forcing a specific language without user choice is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

generateToken() uses await import('crypto') but is declared as a normal function and then called synchronously, so token generation is broken and may crash or mis-store the token value. This can leave the service in an inconsistent authentication state, undermining the intended protection for an already remotely exposed gateway.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file presents all operational guidance in Chinese and does not indicate that the user can choose another language or that the skill is intentionally restricted to a Chinese-speaking audience. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script's descriptive text, logs, and user-facing status messages are largely in Chinese, which imposes a language choice on users. The file does not provide an English alternative, locale selection, or any documented justification for the language restriction.

Content

No source excerpt is available for this finding.