T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:20
- Finding
- Unpinned Remote Payload Retrieval and System-Wide Command Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 20-22 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```bash git clone https://github.com/Ramsbaby/openclaw-memorybox.git cd openclaw-memorybox && chmod +x bin/memorybox sudo ln -sf "$(pwd)/bin/memorybox" /usr/local/bin/memorybox ``` ### Technical Analysis The installation procedure clones a mutable default branch from an external GitHub repository without pinning a reviewed commit or verifying a cryptographic checksum. It then marks the remotely obtained `bin/memorybox` file as executable and creates a system-wide command link in `/usr/local/bin`. The executable implementation is not included in the audited artifact, which contains only `SKILL.md`. Consequently, the claim that the tool only modifies file structure cannot be verified. The effective payload may also change after this Skill has been reviewed if the upstream repository is updated or compromised. Although `sudo` applies directly to the symlink operation rather than execution of the downloaded program, the command forcibly replaces the destination using `ln -sf`. Subsequent `memorybox` invocations execute the externally controlled file with the invoking user's privileges and access, including access to the user's OpenClaw memory files. ### Attack Path 1. An attacker compromises the upstream repository, its maintainer account, or the repository's distribution process. 2. The attacker modifies `bin/memorybox` on the mutable branch cloned by the documented installation command. 3. A user follows the instructions and retrieves the altered repository without commit pinning or integrity verification. 4. The downloaded file is marked executable. 5. A privileged, system-wide command link is created at `/usr/local/bin/memorybox`, potentially replacing an existing destination. 6. When the user invokes one of the documented `memorybox` commands, the altered payload executes wi ...[truncated 861 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin installation to a specific reviewed commit or immutable signed release rather than cloning the mutable default branch. 2. Publish and verify a SHA-256 checksum or cryptographic signature before granting execute permission. 3. Include the executable in the audited Skill package when practical so its behavior can be reviewed together with the documentation. 4. Install into a user-owned directory such as `~/.local/bin` instead of using `sudo` and `/usr/local/bin`. 5. Avoid `ln -sf`; detect an existing destination and abort unless the user explicitly approves its replacement. 6. Document the exact files and directories the executable may access or modify. 7. Apply least privilege at runtime and validate target paths before permitting memory-management operations. 8. Re-audit the external implementation and its update mechanism before treating its file-access and privacy claims as verified. ]]>
