T03 · Remote Payload Retrieval and Execution
- Location
install.sh:20- Finding
Unverified Remote Installer Is Executed with Root Privileges
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a real 1Panel installer, but it performs root-level system changes, runs an unverified downloaded installer, exposes admin credentials, and includes a dangerous test script that can disrupt an existing installation.
Review before installing. Use this only on a server where root-level 1Panel installation is intended, verify the downloaded package independently, avoid running test.sh on a production machine, and treat any displayed panel password as sensitive; rotate it immediately after installation.
install.sh:20Unverified Remote Installer Is Executed with Root Privileges
test.sh:39Destructive Root Test Can Leave the Production Installation Disabled or Partially Removed
The code does relate to 1Panel installation, but it does not primarily implement the declared end-user skill behavior. Instead of being the one-click installer that automatically detects installation state and installs or returns access info, this chunk is a testing script for such an installer. It performs additional destructive/admin actions not stated in the description, including backing up and temporarily removing an existing installation, stopping/disabling services, and restoring backups. It also requires root and interactive prompts, which differs from the described automatic installation flow. Therefore the supplied code chunk does not accurately represent the declared purpose.
The installed-instance flow tells the assistant to fetch and disclose existing panel access information, which may include active administrative credentials. Retrieving and echoing pre-existing secrets is especially dangerous because it can expose long-lived access to an already deployed management plane.
The skill instructs the assistant to return newly generated admin access URLs, usernames, and passwords in plain-language output. Exposing credentials in chat or logs can leak administrative access to anyone with transcript access, creating immediate account and server compromise risk.
The script recursively deletes /opt/1panel as root during restoration cleanup. In the context of an installation test script, deleting application directories on the host is dangerous because it can destroy user data or a valid installation, especially if the backup/restore flow fails or if the host was not meant to be modified.
systemctl disable 1panel-agent 2>/dev/null || true
# 清理新安装的文件
rm -rf /opt/1panel
rm -f /usr/bin/1pctl
rm -f /etc/systemd/system/1panel-*.service
The script recursively deletes /opt/1panel as root during restoration cleanup. In the context of an installation test script, deleting application directories on the host is dangerous because it can destroy user data or a valid installation, especially if the backup/restore flow fails or if the host was not meant to be modified.
systemctl disable 1panel-agent 2>/dev/null || true
# 清理新安装的文件
rm -rf /opt/1panel
rm -f /usr/bin/1pctl
rm -f /etc/systemd/system/1panel-*.service
Removing /usr/bin/1pctl as root directly alters a system executable outside package-management safeguards. If the restoration sequence fails or the binary belongs to a different installation source/version, the host can be left without a working management CLI.
# 清理新安装的文件
rm -rf /opt/1panel
rm -f /usr/bin/1pctl
rm -f /etc/systemd/system/1panel-*.service
# 恢复备份
Deleting /etc/systemd/system/1panel-*.service removes service definitions from the host. In a root-executed test script this can break service management or permanently alter system state if the units are not fully restored, making the install skill more dangerous because it targets persistent host configuration rather than a sandbox.
# 清理新安装的文件
rm -rf /opt/1panel
rm -f /usr/bin/1pctl
rm -f /etc/systemd/system/1panel-*.service
# 恢复备份
if [[ -f "$BACKUP_DIR/1pctl" ]]; then
The README states that the skill will automatically install 1Panel and return the generated access URL, username, and password during normal use. That creates a real security risk because it performs privileged system changes and exposes fresh administrative credentials in chat/output without requiring an explicit confirmation or warning at the point of use.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
cd /root/.openclaw/workspace/skills/1panel-install
chmod +x install.sh
sudo ./install.sh
预期输出:
The skill declares shell-capable behavior but does not explicitly constrain tool scope with a permissions or allowed-tools policy. In a skill that performs installation, service management, and filesystem changes, missing tool scoping increases the chance of unintended or overly broad command execution.
The activation description is broad enough that normal discussion of installing, deploying, or configuring 1Panel could trigger privileged system actions. Because this skill installs software as root and changes system state, ambiguous activation materially raises the risk of accidental execution.
The skill does not prominently warn up front that it will execute a remote installation script with root privileges and alter the host system. Running network-fetched code as root is a high-risk action, and failing to disclose that deprives the user of informed consent and increases the chance of unsafe use.
The trigger examples use catch-all wording that can cause over-activation for requests that may only seek advice rather than execution. In the context of a root-level installer, this can lead to unintended remote script execution and system modification.
The skill explicitly requires root or sudo execution to install services and modify the system. Privileged execution is not inherently malicious, but in this context it amplifies the risk of any mistake, overbroad trigger, or compromised remote installer into full-system impact.
### 2. 检查 root 权限
此脚本需要 root 权限安装系统服务。如果当前用户不是 root,提示用户使用 sudo 执行。
## 安装流程
The script announces '语言: 中文' and then hard-codes menu option '2' into the installer input to select Chinese. This is a natural-language policy concern because it imposes a specific language choice on users without giving them a choice or requiring explicit consent.
The script downloads an external tarball from the network and then executes its embedded install.sh as root with no integrity verification, no signature/hash check, and no user confirmation. In the context of an agent skill that may auto-run installation, this creates a supply-chain risk where a compromised download source, DNS/TLS interception, or replaced local archive could lead to full root remote code execution.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
#!/bin/bash
# 测试脚本:验证 1panel-install skill 的功能
# 用法:sudo ./test.sh
set -e
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
#!/bin/bash
# 测试脚本:验证 1panel-install skill 的功能
# 用法:sudo ./test.sh
set -e
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
#!/bin/bash
# 测试脚本:验证 1panel-install skill 的功能
# 用法:sudo ./test.sh
set -e
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
#!/bin/bash
# 测试脚本:验证 1panel-install skill 的功能
# 用法:sudo ./test.sh
set -e
The test script, when run as root, intentionally moves an existing 1Panel installation out of place, stops services, and disables them to simulate an uninstalled state. Even though this is framed as testing, it performs destructive system changes beyond simple validation and can disrupt a production installation or leave the host in an inconsistent state if the script aborts mid-run.
The restoration path deletes system files and service units, then replaces binaries and application directories from a temporary backup. In a root-run script this is risky because any failure, stale backup, or path mismatch can remove working software or alter service state unexpectedly, which exceeds what a normal install-skill test should do.
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.
# 如果原服务存在,重新启用
if systemctl list-unit-files | grep -q 1panel-core; then
systemctl enable 1panel-core 2>/dev/null || true
systemctl start 1panel-core 2>/dev/null || true
fi
The README includes a fixed language setting of '中文', which can constitute a language-policy issue when presented as a default constraint without offering alternatives. There is no nearby wording indicating that the user can choose another language or that the locale restriction is required for a region-specific purpose.
The installation flow explicitly says it will '自动选择中文语言', which imposes a language choice on the user. This is a locale/language policy issue because the skill does not offer a choice or document a justified region-specific requirement.