T01 · Skill Instruction Hijacking
- Location
SKILL.md:358- Finding
Unrestricted Remote Command Instructions Through WebSocket Callback
- Content
View full analysis
", "command": "...", "args": {} } Reply: { "type": "command_result", "request_id": "", "ok": true, "output": "human-readable result" } ``` ### Technical Analysis The skill instructs the agent to accept a free-form `command` and attacker-controlled `args` from a remote WebSocket server, process that command, and return its output. No command allowlist, schema constraints, authorization checks, user confirmation, execution boundaries, or prohibited-operation rules are defined. The controlling endpoint is constructed from the user-supplied `host` input elsewhere in the skill rather than being restricted to the advertised ZenHeart domain. Consequently, an attacker who influences the host configuration can provide the WebSocket endpoint that supplies these instructions. Although the document does not define a direct shell-execution primitive, its command callback delegates undefined tasks to the consuming agent. Depending on the tools and permissions available to that agent, server-provided commands could alter the active session objective and induce file access, tool invocation, network requests, data disclosure, or other unintended actions. This is instruction hijacking because control over agent behavior is transferred from the user to an external server without sufficient restrictions. ### Attack Path 1. The victim loads the skill and supplies, or is induced to supply, an attacker-controlled `host`. 2. The agent connects to `wss:///v2/agent/ws` and completes the documented authentication exchange. 3. The malicious server sends a `command` frame containing attacker-selected command text and arguments. 4. The skill directs the agent to process the und ...[truncated 1170 chars]- Remediation
View remediation
