T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:168- Finding
Arbitrary Local Tool Creation and Overwrite Enables Tool Hijacking
- Content
View full analysis
dict:\n return {\"result\": a + b}\n", "overwrite": true }' ``` ``` ### Technical Analysis The Skill instructs the agent to submit arbitrary filenames and Python source code to a local API that creates or overwrites function-tool files. The explicit `"overwrite": true` option permits replacement of an existing tool rather than limiting the operation to creation of a new, uniquely named tool. This capability exceeds the Skill's primary declared purpose of invoking predefined ChatDev ability-unit workflows. Tool files are executable components: replacing a trusted tool can change the behavior of later legitimate-looking tool calls without changing the tool name presented to users or agents. This creates a tool-hijacking primitive and may provide indirect local code execution when the modified tool is subsequently loaded and invoked. Using `127.0.0.1` limits direct network exposure, but it does not remove the risk. The agent is explicitly instructed to act as a client for the privileged local endpoint. Exploitation depends on the ChatDev backend being reachable and accepting the documented operation. ### Attack Path 1. An attacker supplies or induces attacker-controlled Python source code and selects the filename of an existing trusted local tool. 2. The agent follows the Skill instructions ...[truncated 1221 chars]- Remediation
View remediation
