T03 · Remote Payload Retrieval and Execution
- Location
scripts/build.sh:13- Finding
Remote Installer Is Recommended Through a curl-to-shell Pipeline
- Content
View full analysis
/dev/null; then echo "❌ Rust toolchain not found. Install via: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh" exit 1 fi ``` ### Technical Analysis The script does not automatically run the installer. However, when Cargo is unavailable, it explicitly instructs the user to fetch mutable content from `https://sh.rustup.rs` and pipe it directly into a shell. The domain is the recognized Rust installer endpoint, and HTTPS with TLS 1.2 is required, which reduces—but does not eliminate—the risk. The command does not pin an installer version, verify a checksum or signature, or allow the downloaded script to be reviewed before execution. Consequently, the effective code executed by the user can change after this Skill has been audited. This installation method also exceeds the minimum behavior needed from the build script. The script only needs to report that Rust is missing and direct users to verified installation documentation. ### Attack Path 1. The user runs `scripts/build.sh` on a system without Cargo. 2. The script displays the `curl ... | sh` installation command. 3. The user copies and executes the suggested command. 4. If the upstream installer endpoint, DNS resolution, certificate trust chain, delivery infrastructure, or installer source is compromised, the response contains attacker-controlled shell code. 5. The shell executes that response immediately with the user’s privileges. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking user account. This may permit access to the user’s source code, local credentials, SSH configuration, development tokens, and writable application or shell confi ...[truncated 131 chars]- Remediation
View remediation
