T03 · Remote Payload Retrieval and Execution
- Location
scripts/provision.sh:111- Finding
Mutable Remote Installer Is Downloaded and Executed Without Local Verification
- Content
View full analysis
&2; return 1; }; flags="$flags --brain hosted --email $BRAIN_EMAIL";; local) flags="$flags --brain local";; esac # ... as_user "curl -fsSL '$INSTALL_URL' | sh -s -- $flags" || { echo "installer failed" >&2; return 1; } [ -x "$LOCAL_BIN" ] || { echo "installer finished but $LOCAL_BIN is missing" >&2; return 1; } ok "$("$LOCAL_BIN" --version 2>/dev/null | head -1) at $LOCAL_BIN" } ``` ### Technical Analysis The script retrieves content from a mutable external URL and immediately pipes it into `sh`. The audited project does not save the installer for inspection, pin its expected digest, verify a digital signature, or independently verify the binaries produced by it. `SKILL.md` states that the remote installer reads a signed manifest and verifies release checksums. Those controls reside in the unreviewed remote code and therefore cannot protect against compromise or malicious modification of that installer itself. The effective code executed by this Skill can change after the package has been audited. The source is also controlled by the environment-overridable `INSTALL_URL` variable. Thus, an inherited or attacker-influenced environment can redirect execution to a completely different endpoint. ### Attack Path 1. An attacker compromises the installer host, its deployment pipeline, or an environment that supplies `INSTALL_URL`. 2. The attacker serves a modified shell script from the selected URL. 3. An operator runs `bash provision.sh install` or `bash provision.sh all`. 4. `curl` dow ...[truncated 969 chars]- Remediation
View remediation
