T03 · Remote Payload Retrieval and Execution
- Location
providers/gdrive.sh:26- Finding
Unverified Remote Installer Executed with Shell and Root Privileges
- Content
View full analysis
/dev/null; then log "rclone not found. Installing..." case "$(uname -s)" in Darwin) brew install rclone 2>/dev/null || curl https://rclone.org/install.sh | bash ;; Linux) curl https://rclone.org/install.sh | sudo bash ;; esac fi } ``` Equivalent installation logic appears in all four listed provider implementations. ### Technical Analysis When `rclone` is unavailable, the provider automatically downloads a mutable script from `https://rclone.org/install.sh` and streams it directly into `bash`. On Linux, the script is executed through `sudo bash`, granting the downloaded payload root privileges. The implementation does not: - Pin an immutable rclone release. - Download the installer before execution. - Verify a cryptographic signature or expected checksum. - Display the downloaded code for review. - Obtain separate consent before executing a root-level installer. The domain is the expected upstream rclone domain, but HTTPS alone does not protect against compromise of the upstream publication process, domain, TLS termination, or installer hosting infrastructure. The effective code executed on a user's machine can change after this Skill has been reviewed. Installing rclone is relevant to the provider functionality, but executing mutable remote code—particularly as root—exceeds the minimum privileges necessary. ### Attack Path 1. A user selects Google Drive, Dropbox, S3, or WebDAV as the storage provider. 2. The corresponding setup function invokes `ensure_rclone`. 3. The machine does not already have `rclone`. 4. An attacker compromises or intercepts the remote installer source, DNS resolution, ...[truncated 864 chars]- Remediation
View remediation
