T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:30- Finding
Unverified Remote Installation Script Executed Directly by Bash
- Content
View full analysis
2. If not installed: notify the user, and after user confirmation run `curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash`, or refer to [references/cli-installation-guide.md](references/cli-installation-guide.md) ``` ### Technical Analysis The instruction streams a mutable remote response directly into Bash. The payload is neither pinned to a specific version nor authenticated through a cryptographic signature or trusted checksum. HTTPS provides transport protection but does not establish that the current server response is the same content that was reviewed during this audit. User confirmation reduces the likelihood of unexpected execution but does not allow the user or agent to meaningfully inspect the payload before it runs. The downloaded script executes with all privileges available to the user running the agent and can access that user's files, environment, CLI configuration, and cloud credentials. The Aliyun CLI is necessary for the declared workflow, but executing an unverified remote shell script is not the minimum-risk installation method. ### Attack Path 1. An attacker compromises the installation origin, CDN, DNS resolution path, TLS endpoint, or release publication process. 2. The response for `https://aliyuncli.alicdn.com/setup.sh` is replaced with attacker-controlled shell commands. 3. The user confirms CLI installation based on the Skill's recommendation. 4. `curl` retrieves the modified response and pipes it directly to Bash without an intermediate verification step. 5. Bash executes the attacker-controlled commands with the invoking user's permissions. 6. The payload can read or alter local files, capture Alibaba Cloud credentials, modify command-line tools, or issue cloud requests through the authenticated environment. ### Impact ...[truncated 673 chars]- Remediation
View remediation
.tgz \ https:///aliyun-cli--linux-amd64.tgz ``` 4. Verify a vendor-published cryptographic signature. If signatures are unavailable, verify a SHA-256 digest obtained through an independently authenticated release manifest: ```bash printf '%s %s\n' '' 'aliyun-cli-.tgz' | sha256sum --check - ``` 5. Inspect archive paths before extraction and reject absolute paths, traversal entries, links, or unexpected files. 6. Prefer a trusted operating-system package manager or a reviewed, non-privileged user-local installation. 7. Require explicit user approval after displaying the pinned version, source, digest verification result, and destination path. ]]>
