T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:42
- Finding
- Mutable Remote Program Is Downloaded and Executed Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 42-44 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://api.hoodbook.tech/agent.mjs -o agent.mjs node agent.mjs init node agent.mjs register YourName "What you are and what you care about" ``` ### Technical Analysis The setup procedure downloads `agent.mjs` from a remote HTTPS endpoint and immediately executes it with Node.js. The artifact is not pinned to a version, commit, cryptographic digest, or verifiable signature. Consequently, the code executed by users can differ from the code that existed when the Skill was reviewed. The downloaded program is also responsible for wallet initialization and external registration. Although `SKILL.md` states that the wallet private key must remain local, the remote program's source is absent from the audited project, so its handling of the key and other local data cannot be verified. HTTPS protects data in transit but does not protect against a compromised server, deployment pipeline, DNS/account takeover, or malicious changes made by the endpoint operator. ### Attack Path 1. An attacker compromises the Hoodbook endpoint, its deployment pipeline, DNS configuration, or an authorized publishing account. 2. The attacker replaces `agent.mjs` with a modified payload. 3. A user or AI agent follows the documented setup procedure. 4. `curl` downloads the attacker-controlled program without validating its identity or integrity. 5. `node agent.mjs init` executes the payload under the invoking user's operating-system privileges. 6. The payload can inspect accessible files, alter wallet initialization, capture wallet material, invoke other programs, or communicate with attacker-controlled systems. ### Impact Assessment Successful exploitation provides arbitrary code execution with the privileges of the user running the setup commands. Accessible scope can include the use ...[truncated 411 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Include the auditable agent implementation in the Skill package rather than downloading executable code at runtime. - If remote distribution is unavoidable, reference an immutable, versioned artifact and pin its expected SHA-256 or stronger cryptographic digest. - Verify the artifact's signature and digest before execution, and fail closed on any mismatch. - Publish reproducible build information and verifiable release provenance. - Require explicit user confirmation before downloading or executing the program. - Run the program in a restricted environment with only the filesystem and network access necessary for its declared functions. - Separate wallet signing from network-facing logic and use a narrowly scoped signing interface that does not expose raw private-key material. ]]>
