T03 · Remote Payload Retrieval and Execution
- Location
install.sh:7- Finding
Unverified Remote Script Retrieval and Execution
- Content
View full analysis
/dev/null; then echo "Installing MeiliSearch..." curl -L https://install.meilisearch.com | sh sudo mv ./meilisearch /usr/local/bin/ else echo "MeiliSearch already installed: $(meilisearch --version)" fi ``` ### Technical Analysis The installer pipes a network response directly into `sh`. The retrieved content is not pinned to a release, inspected, signature-verified, or validated against a cryptographic checksum. Consequently, the code executed during installation can change after the Skill package has been reviewed. The `-L` option also follows redirects without restricting the final destination. The remote script controls the resulting `./meilisearch` file, which is subsequently moved into `/usr/local/bin` with elevated privileges. ### Attack Path 1. An attacker compromises the installation endpoint, its delivery infrastructure, or a redirected destination. 2. The user runs `install.sh`. 3. `curl` retrieves attacker-controlled shell commands. 4. The response is immediately executed by `sh` under the installing user's account. 5. The payload creates or replaces `./meilisearch`. 6. The attacker-controlled binary is moved to `/usr/local/bin` using `sudo`. 7. The installer later starts that binary through a persistent system service. ### Impact Assessment An attacker can execute arbitrary commands with the installing user's privileges and can influence the binary installed into a privileged system path. In conjunction with the systemd configuration created later by the installer, the attacker-controlled binary may run persistently as root at startup. ]]>- Remediation
View remediation
