T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:24- Finding
Root SSH Access Violates Least-Privilege Boundaries
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is an OpenClaw recovery guide, but it asks users to perform high-impact server administration with root access, mutable package execution, process killing, and state deletion.
Review before installing or using this skill on real infrastructure. Prefer a dedicated non-root admin account, pinned and verified OpenClaw binaries, backups before changing or deleting config/state files, and systemd or exact PID-based restart commands instead of broad process matching. There is no evidence of deception or exfiltration in the artifact, but the documented recovery procedure carries high operational risk if followed literally.
SKILL.md:24Root SSH Access Violates Least-Privilege Boundaries
SKILL.md:67Unpinned npx Commands Can Retrieve and Execute Mutable Third-Party Code
SKILL.md:64Broad Command-Line Process Matching Can Terminate Unrelated Services
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| 变量 | 说明 | 示例值 |
|------|------|--------|
| CENTRAL_IP | 中央服务器 IP | 从配置文件获取 |
| SSH_KEY | SSH 私钥路径 | ~/.ssh/id_ed25519 |
| API_KEY | 模型 API Key | 从平台获取 |
## 实施步骤
The skill instructs deletion of ~/.openclaw/node.json to force re-pairing. Although not obviously malicious, deleting state files is a destructive action that can break node identity, sever trust relationships, or cause accidental mispairing if run on the wrong host; the context increases risk because the skill is aimed at recovery under pressure.
# 删除旧的配对信息
rm ~/.openclaw/node.json
# 重新启动节点
cd ~/.openclaw
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
优先使用 systemd:
sudo systemctl restart openclaw-gateway
如无 systemd:
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.
cd ~/.openclaw
pkill -f openclaw-gateway
nohup npx openclaw gateway > /tmp/gateway.log 2>&1 &
The skill instructs users to launch npx openclaw gateway without pinning an exact package version. npx may fetch the latest package from the registry at execution time, creating supply-chain risk and making behavior non-deterministic if a compromised or breaking release is published. In a rescue/admin workflow run on a central node, that risk is more sensitive because the command is executed in an operational environment.
The node recovery step uses npx openclaw node run without a pinned version. This allows unreviewed code to be downloaded and executed during incident recovery, which is especially risky because the command reconnects infrastructure components and may run with elevated access to node configuration.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
1. **始终备份**:修改配置前先备份
2. **验证 IP**:确认目标服务器 IP 正确
3. **检查 Key**:API Key 只在本地使用,勿上传
4. **最小权限**:使用 sudo 而非 root 登录
5. **监控日志**:查看 `/tmp/gateway.log` 排查问题
## 相关文件