T03 · Remote Payload Retrieval and Execution
- Location
scripts/install.sh:35- Finding
Installer Downloads and Immediately Executes a Mutable Remote Script
- Content
View full analysis
/dev/null; then warn "Ollama not found. Attempting install..." if [[ "$(uname)" == "Darwin" ]]; then brew install ollama 2>/dev/null || { warn "Auto-install failed. Install manually: https://ollama.com/download" warn "Or set MEMVAULT_LLM_BASE_URL to an OpenAI-compatible endpoint in .env" } elif [[ "$(uname)" == "Linux" ]]; then curl -fsSL https://ollama.com/install.sh | sh fi fi ``` ### Technical Analysis The installer pipes an HTTPS response directly into `sh`. The downloaded program is not pinned to a version, inspected, signature-verified, or checked against a hard-coded cryptographic digest. Consequently, the effective code executed by the Skill can change after the packaged Skill has been reviewed. Installing a local LLM runtime supports the declared functionality, but immediate remote shell execution is not the least-privileged or minimum-risk installation method. The remote script executes with all privileges held by the user running `scripts/install.sh` and may itself invoke privilege-elevation mechanisms. ### Attack Path 1. A user follows the documented quick-start command, `bash scripts/install.sh`. 2. The installer determines that `ollama` is absent on a Linux host. 3. The installer requests the current content of `https://ollama.com/install.sh`. 4. A compromise of the distribution account, upstream hosting, or applicable TLS/DNS trust path changes the response. 5. The response is passed directly to `sh` without verification. 6. Attacker-controlled commands execute with the installer's host privileges. ### Impact Assessment Successful exploitation permits arbitrary command execution on the host under the installer user's account. If the installer is run as roo ...[truncated 208 chars]- Remediation
View remediation
