T03 · Remote Payload Retrieval and Execution
Error
- Location
- docs/runbook.md:8
- Finding
- Unverified Remote Installer Is Downloaded and Executed Directly## Vulnerability Details **File Location**: `docs/runbook.md:8-11` **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```bash 2. Install/upgrade Mobayilo CLI: ```bash curl -fsSL https://mobycli.mobayilo.com/install.sh | sh moby self-update ``` ``` ### Technical Analysis The runbook instructs operators or agents to retrieve mutable content from an external URL and pipe it directly into `sh`. The downloaded script is not pinned to a version, inspected, validated against a cryptographic checksum, or authenticated using a trusted signing key. TLS protects the connection in transit but does not protect against compromise of the distribution server, domain, DNS configuration, hosting account, or future malicious modification of the installer. The payload that executes can therefore differ from the content originally reviewed during this audit. Although the remote installer is not automatically invoked by the Python implementation, installation instructions are part of the operational behavior of the Skill and may be followed by an operator or an automated agent. ### Attack Path 1. An attacker compromises or obtains control over `mobycli.mobayilo.com`, its hosting account, DNS, or the installer deployment pipeline. 2. The attacker replaces `install.sh` with a malicious payload. 3. An operator or agent follows the documented installation command. 4. `curl` downloads the current attacker-controlled response. 5. The response is passed immediately to `sh` without verification or review. 6. The payload executes with all privileges available to the user running the installation command. ### Impact Assessment Successful exploitation permits arbitrary command execution as the installing user. The payload could read user-accessible files and credentials, alter the installed `moby` executable, access environment variables, install persist ...[truncated 358 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the `curl | sh` installation pattern. 2. Publish immutable, versioned release artifacts. 3. Download the artifact separately and verify a pinned SHA-256 or stronger checksum before execution. 4. Prefer cryptographic signatures verified against a documented, independently distributed public key. 5. Display or inspect installation scripts before running them. 6. Pin installation and update instructions to an explicit version instead of retrieving mutable latest content. 7. Ensure `moby self-update` also authenticates release metadata and artifacts using signatures or pinned hashes. 8. Run installation with the least-privileged account and document exactly which files the installer modifies. A safer pattern would be: ```bash curl -fL -o moby-v0.2.0.tar.gz https://example.invalid/releases/moby-v0.2.0.tar.gz echo "PINNED_SHA256 moby-v0.2.0.tar.gz" | sha256sum --check - tar -xzf moby-v0.2.0.tar.gz install -m 0755 moby ~/.local/bin/moby ``` The placeholder URL and checksum must be replaced with an authenticated release location and the publisher's actual pinned digest.
