T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:18
- Finding
- Unverified Remote Installation Script Is Piped Directly to Bash<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:18-22`; `setup.sh:5-6` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code `SKILL.md:18-22`: ```bash ### On the phone (run in Termux) ```bash curl -s https://albionwakes.com/phone_setup.sh | bash bash ~/start_node.sh ``` ``` `setup.sh:5-6`: ```bash # Usage: paste this URL in Termux browser, or: # curl -s http://albionwakes.com/phone_setup.sh | bash ``` ### Technical Analysis The documented installation process downloads shell source from `albionwakes.com` and streams it directly into Bash. The payload is neither pinned to a specific release nor checked against a cryptographic signature or checksum. Consequently, the code executed by users can differ from the bundled and audited `setup.sh`. The packaged script also advertises an HTTP version of this command. Although that occurrence is a comment containing usage instructions rather than code executed automatically, users following it would receive no transport authentication or integrity protection. A network-positioned attacker could replace the response before Bash processes it. This behavior is not required to provision the node: the repository already contains a local setup script that can be inspected before execution. ### Attack Path 1. A user follows the installation command from `SKILL.md` or the usage comment in `setup.sh`. 2. An attacker compromises the hosting domain, DNS, web server, deployment account, or network path. Plain HTTP additionally permits direct in-transit modification. 3. The attacker replaces `phone_setup.sh` with arbitrary shell commands. 4. `curl` streams the attacker-controlled response directly into Bash. 5. The payload executes immediately with the permissions of the Termux user. ### Impact Assessment An attacker can execute arbitrary commands in the Termux environment and access everything available to that application user. Potential impact incl ...[truncated 538 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all `curl | bash` and `wget | shell` installation instructions. 2. Prefer executing the packaged, reviewable script: ```bash bash ./setup.sh ``` 3. If downloading is unavoidable: - Publish immutable, versioned release artifacts. - Require HTTPS. - Download the script to a file rather than piping it into a shell. - Publish and verify a SHA-256 digest or cryptographic signature before execution. - Display the source and require an explicit user action before running it. 4. Remove the plain-HTTP URL from `setup.sh`. 5. Ensure the documentation refers to exactly the same version of the script that was audited. 6. Configure downloads to fail visibly and securely, such as with `curl --fail --show-error --location`. ]]>
