T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:25- Finding
Unverified Remote Installer Executed with Root Privileges
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
SKILL.md:25Unverified Remote Installer Executed with Root Privileges
scripts/enable-remote.mjs:69Gateway Exposed on All Interfaces with Authentication Protections Disabled
scripts/enable-remote.mjs:87Gateway Bearer Token Printed in Plaintext and Copied into Backups
scripts/check-status.mjs:108Shell Command Injection Through Configuration-Derived Port
SKILL.md:157ZeroTier Service Persistence Enabled Without Explicit Lifecycle Controls
scripts/disable-remote.mjs:41Disable Workflow Leaves Dangerous Authentication Flags Enabled
scripts/enable-remote.mjs:111Parse-Blocking Await Usage Makes Enable and Disable Workflows Inoperable
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.
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.
systemctl status zerotier-one
curl https://install.zerotier.com | sudo bash
2. **已加入 ZeroTier 网络**
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.
systemctl status zerotier-one
curl https://install.zerotier.com | sudo bash
2. **已加入 ZeroTier 网络**
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.
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.
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.
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.
systemctl status zerotier-one
curl https://install.zerotier.com | sudo bash
2. **已加入 ZeroTier 网络**
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# 加入网络 (需要 Network ID)
sudo zerotier-cli join <Network-ID>
# 在 zerotier.com 网页授权设备
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
# 列出所有备份
ls -la ~/.openclaw/openclaw.json.backup-*
# 恢复到指定备份
cp ~/.openclaw/openclaw.json.backup-20260304-152800 ~/.openclaw/openclaw.json
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.
systemctl start zerotier-one
systemctl enable zerotier-one
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
zerotier-cli listnetworks
# 检查防火墙
sudo ufw allow 9993/udp # ZeroTier 端口
sudo ufw allow 1880/tcp # Gateway 端口
# 测试连通性
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.
# 检查防火墙
sudo ufw allow 9993/udp # ZeroTier 端口
sudo ufw allow 1880/tcp # Gateway 端口
# 测试连通性
ping <ZeroTier-IP>
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.
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.
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.
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.
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);
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.
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);
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.
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);
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.
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.
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.
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.
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.