T03 · Remote Payload Retrieval and Execution
- Location
scripts/build.sh:13- Finding
Unverified Remote Installer Is Recommended for Direct Shell Execution
- Content
View full analysis
/dev/null; then echo "❌ Rust 工具链未安装" echo " 安装: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh" exit 1 fi ``` ### Technical Analysis The script does not execute the installer automatically, but it instructs the user to pipe a response from `https://sh.rustup.rs` directly into a shell. The URL is associated with the standard Rust installer, and HTTPS with TLS 1.2 reduces transport interception risk. However, the command does not pin an installer version or verify a checksum or digital signature. Because the downloaded response is interpreted immediately, the code that ultimately runs may differ from what was reviewed in this Skill. If the upstream endpoint, DNS resolution, certificate trust chain, or delivery infrastructure is compromised, the response can execute arbitrary commands with the invoking user's privileges. This behavior is not required to build the declared CLI. The script can instead stop when Cargo is absent and direct the user to separately obtain and verify Rust using official installation documentation. ### Attack Path 1. A user runs `scripts/build.sh` without Cargo installed. 2. The script displays the `curl ... | sh` installation instruction. 3. The user copies and executes that command. 4. The remote endpoint returns an installer that has changed since the Skill was audited or has been compromised. 5. The response is passed directly to `sh` without local inspection or integrity verification. 6. The downloaded script executes with the user's filesystem, process, and network permissions. ### Impact Assessment Successful exploitation would permit arbitrary command execution under the account that runs the installer. This could expose user-accessible credenti ...[truncated 282 chars]- Remediation
View remediation
