T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:16
- Finding
- Unverified Remote Installer Executed Directly by Shell## Vulnerability Details **File Location**: `SKILL.md`, line 16 **Vulnerability Type**: `T03: Remote Payload Retrieval and Execution` **Risk Level**: Critical **Complete Code Snippet**: ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh ``` ### Technical Analysis The installation instructions download a remote script and pipe its response directly into `sh`. The downloaded content is therefore executed immediately without local inspection, version pinning, cryptographic checksum verification, or publisher-signature validation. The HTTPS and TLS options provide transport protection but do not guarantee that the server will always return the same trusted payload. The effective executable content can change after this Skill has been reviewed. The installer is not included in the project, so its commands and side effects cannot be assessed through this static audit. Installing a Cairo/Starknet toolchain is relevant to the Skill's declared function, but immediate execution of mutable, unverified network content exceeds the minimum safe mechanism needed to perform that installation. ### Attack Path 1. A user or agent follows the documented project-scaffolding instructions. 2. `curl` requests the installer from `https://sh.starkup.sh`. 3. The domain, hosting infrastructure, publication process, or delivered installer is compromised or otherwise supplies malicious content. 4. The shell pipeline passes that content directly to `sh` without an integrity or authenticity check. 5. The malicious commands execute with the privileges and environment access of the invoking user. ### Impact Assessment A malicious installer could perform arbitrary actions available to the invoking account. Depending on that account's privileges and local environment, this could include reading or modifying source files, stealing credentials or wallet private keys, altering shell configuration, installing additional payloads, or ...[truncated 306 chars]
- Remediation
- ## Remediation Suggestions 1. Do not pipe network responses directly into a shell. 2. Use an official package manager or another installation mechanism that verifies package authenticity and integrity where available. 3. Pin the installer or release artifact to an explicit, reviewed version rather than a mutable endpoint. 4. Download the artifact as a separate step and verify a hardcoded cryptographic checksum or trusted publisher signature before execution. 5. Allow users to inspect the downloaded script before running it. 6. Execute the installer with the least-privileged account necessary and document its expected files, permissions, and side effects. 7. Fail closed if verification fails; do not fall back to executing an unverified download. A safer conceptual flow is: ```bash curl --proto '=https' --tlsv1.2 -fSLo starkup.sh \ https://example.invalid/releases/<PINNED_VERSION>/starkup.sh echo '<TRUSTED_SHA256> starkup.sh' | sha256sum --check - sh starkup.sh ``` The release URL and checksum must come from an authenticated, trusted publisher source.
