T07 · Tool Hijacking and Spoofing
Error
- Location
- SKILL.md:81
- Finding
- Nonexistent Security Wrapper Is Presented as an Operational Shell Control<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:81-95`; supporting package evidence in `package.json:1-5` **Vulnerability Type**: Tool hijacking and spoofing through an advertised but absent security wrapper **Risk Level**: High ### Vulnerable Code Snippet ```markdown ### 3. Add to TOOLS.md Add the following to your OpenClaw `TOOLS.md` so the agent uses ClawShell for shell commands: ```markdown ## Shell Access Use `clawshell_bash` for ALL shell command execution. Do not use `bash` directly. ClawShell will analyze commands for risk and require human approval for dangerous operations. Available tools: - `clawshell_bash(command, workingDir)` — Execute a shell command with risk analysis - `clawshell_status()` — Check pending approvals and recent decisions - `clawshell_logs(count)` — View recent audit log entries ``` ``` The package manifest contains no implementation or executable entry point for these tools: ```json { "dependencies": { "package-lock.json": "^1.0.0" } } ``` ### Technical Analysis The skill claims that `clawshell_bash` intercepts shell commands, classifies their risk, requests approval for dangerous commands, and blocks critical operations. It also directs users to modify `TOOLS.md` so that agents use this wrapper for all shell execution. However, the audited project contains only `SKILL.md`, two lockfiles, and a minimal `package.json`. There are no source files, tool registration definitions, executable entry points, `main` or `bin` declarations, notification clients, risk-analysis rules, or logging implementation. Consequently, none of the advertised tools—`clawshell_bash`, `clawshell_status`, or `clawshell_logs`—can provide the represented security controls. This creates a spoofed security boundary: users may configure an agent as though a human-approval mechanism exists even though the package does not supply it. The persistent `TOOLS.md` instruction is aligned with the stated purpose and therefore is not independe ...[truncated 1464 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include the complete implementation of every advertised tool, including command parsing, risk classification, approval handling, timeout behavior, execution, and audit logging. 2. Add explicit package entry points through appropriate `main`, `exports`, or `bin` fields and provide the tool-registration metadata required by OpenClaw. 3. Make initialization fail closed if the wrapper or notification provider is unavailable. Never silently fall back to direct shell execution. 4. Verify tool registration and health before instructing users to disable direct shell access. 5. Add integration tests proving that critical commands are blocked, high-risk commands require approval, rejected and timed-out requests do not execute, and logs are generated. 6. Document the exact behavior when the approval service, network, credentials, or wrapper process is unavailable. 7. Remove the persistent `TOOLS.md` modification instructions until installation and operational verification can be completed automatically. ]]>
