T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:31- Finding
Mutable Remote Installer Is Executed Directly Through Bash
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Alibaba Cloud remote-log helper, but its setup guidance can run unverified remote code, make broad persistent CLI plugin changes, and expose cloud credentials if followed literally.
Review before installing. Prefer a package-manager or pinned, checksum-verified Alibaba Cloud CLI installation; do not pipe remote scripts to bash; avoid global plugin updates and persistent auto-plugin-install unless you accept that broader CLI change; use least-privilege RAM permissions; do not paste AccessKeys or STS tokens into commands, chats, scripts, or CI logs; and only retrieve device logs with clear authorization and minimal time windows.
SKILL.md:31Mutable Remote Installer Is Executed Directly Through Bash
references/cli-installation-guide.md:74Unverified Mutable Binaries Are Installed into a Privileged Executable Path
SKILL.md:40Automatic Plugin Installation and Global Updates Introduce Unpinned Executable Dependencies
references/cli-installation-guide.md:146Credential Guide Recommends Supplying Access Secrets Through Command-Line Arguments
The skill includes a one-liner that downloads a remote script and pipes it directly into bash, which prevents inspection before execution and creates a supply-chain/code-execution risk. Even though the text warns about safer alternatives, presenting the dangerous pattern as a standard installation path can lead users or agents to execute arbitrary code from a remote host if the CDN, TLS path, or served content is compromised.
aliyun version
# If not installed or version too low (script served by Alibaba Cloud official CDN over HTTPS):
curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh | bash
aliyun version
The | bash construct chains network retrieval directly into command execution, collapsing trust decisions into a single step and making it easy to execute unreviewed remote content. In an agent-skill context, this is particularly dangerous because automation may reproduce the command non-interactively, increasing the chance of silent compromise of the local environment.
aliyun version
# If not installed or version too low (script served by Alibaba Cloud official CDN over HTTPS):
curl -fsSL --connect-timeout 10 --max-time 120 https://aliyuncli.alicdn.com/setup.sh | bash
aliyun version
This duplicate finding points to the same remote-script-to-shell pattern, which remains hazardous despite being discussed as a risk. The presence of such a pattern in the installation ecosystem materially raises supply-chain and arbitrary code execution concerns for users of the skill.
| Risk | Where it shows up | Mitigation |
|---|---|---|
| **Remote script piped to shell** (`curl … \| bash`) | SKILL.md Installation section | Use the [Safer installation flow](#safer-installation-flow) below — download, inspect, then execute. |
| **Privilege elevation via `sudo mv … /usr/local/bin/`** | macOS / Debian / Ubuntu / CentOS / RHEL / ARM64 binary install | Only run `sudo` after verifying the downloaded archive's source (HTTPS host = `aliyuncli.alicdn.com`) and contents (`file aliyun` to confirm it's an ELF/Mach-O executable, not a shell script). Prefer per-user installs (`~/.local/bin`, no `sudo`) where possible. |
| **System-wide PATH modification** (`SetEnvironmentVariable(..., Machine)` on Windows) | Windows PowerShell flow | Requires Administrator. Only do this for binaries you've verified you trust. Prefer the user-scope target (`User`) when a per-user install is acceptable. |
| **Tampered binary** (compromised CDN, MITM bypassing TLS, malicious mirror) | All download flows | Pin checksums when Aliyun publishes them; otherwise verify the host (`aliyuncli.alicdn.com`) and rely on HTTPS. Don't pull binaries from third-party mirrors. |
This duplicate finding points to the same remote-script-to-shell pattern, which remains hazardous despite being discussed as a risk. The presence of such a pattern in the installation ecosystem materially raises supply-chain and arbitrary code execution concerns for users of the skill.
| Risk | Where it shows up | Mitigation |
|---|---|---|
| **Remote script piped to shell** (`curl ... \| bash`) | SKILL.md Installation section | Use the [Safer installation flow](#safer-installation-flow) below — download, inspect, then execute. |
| **Privilege elevation via `sudo mv ... /usr/local/bin/`** | macOS / Debian / Ubuntu / CentOS / RHEL / ARM64 binary install | Only run `sudo` after verifying the downloaded archive's source (HTTPS host = `aliyuncli.alicdn.com`) and contents (`file aliyun` to confirm it's an ELF/Mach-O executable, not a shell script). Prefer per-user installs (`~/.local/bin`, no `sudo`) where possible. |
| **System-wide PATH modification** (`SetEnvironmentVariable(..., Machine)` on Windows) | Windows PowerShell flow | Requires Administrator. Only do this for binaries you've verified you trust. Prefer the user-scope target (`User`) when a per-user install is acceptable. |
| **Tampered binary** (compromised CDN, MITM bypassing TLS, malicious mirror) | All download flows | Pin checksums when Aliyun publishes them; otherwise verify the host (`aliyuncli.alicdn.com`) and rely on HTTPS. Don't pull binaries from third-party mirrors. |
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
aliyun version
rm /tmp/aliyun-setup.sh
The same principle applies to the binary archives below: `wget` first, run `file aliyun` and (when checksums are available) `sha256sum -c`, then move into `/usr/local/bin/` with `sudo`.
The trigger list includes broad phrases such as "remote log", "tlog", and "log retrieval", which can cause the skill to activate in contexts where the user did not clearly intend to perform sensitive log-access operations. Because this skill retrieves end-user device logs, unintended invocation increases the chance of privacy-invasive actions or accidental exposure of user data.
The scenario description explains how to retrieve and query end-user device logs but does not prominently warn that these logs may contain sensitive personal data, secrets, or regulated information. In a log-collection skill, that omission is risky because it normalizes privacy-sensitive operations without requiring explicit user acknowledgement or minimizing collected data.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
>
> **[MUST] RegionId is fixed** — EMAS APM service is ONLY available in `cn-shanghai`.
> Always pass `--region cn-shanghai` regardless of the credential's default region
> (e.g., even if `aliyun configure list` shows `cn-hangzhou`). Do NOT ask the user
> to confirm RegionId, and do NOT try other regions on failure.
| Parameter | Required | Description | Example |
This reference file substantially broadens the skill from EMAS APM remote-log operations into general Alibaba Cloud CLI installation, authentication, and multi-service usage. In an agent setting, this scope expansion increases the chance the skill is used to configure broad cloud access or invoke unrelated services, which violates least-privilege expectations and enlarges the attack surface.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| Risk | Where it shows up | Mitigation |
|---|---|---|
| **Remote script piped to shell** (`curl … \| bash`) | SKILL.md Installation section | Use the [Safer installation flow](#safer-installation-flow) below — download, inspect, then execute. |
| **Privilege elevation via `sudo mv … /usr/local/bin/`** | macOS / Debian / Ubuntu / CentOS / RHEL / ARM64 binary install | Only run `sudo` after verifying the downloaded archive's source (HTTPS host = `aliyuncli.alicdn.com`) and contents (`file aliyun` to confirm it's an ELF/Mach-O executable, not a shell script). Prefer per-user installs (`~/.local/bin`, no `sudo`) where possible. |
| **System-wide PATH modification** (`SetEnvironmentVariable(..., Machine)` on Windows) | Windows PowerShell flow | Requires Administrator. Only do this for binaries you've verified you trust. Prefer the user-scope target (`User`) when a per-user install is acceptable. |
| **Tampered binary** (compromised CDN, MITM bypassing TLS, malicious mirror) | All download flows | Pin checksums when Aliyun publishes them; otherwise verify the host (`aliyuncli.alicdn.com`) and rely on HTTPS. Don't pull binaries from third-party mirrors. |
This install flow tells users to move a downloaded binary into a system path with sudo, which grants a network-fetched artifact privileged trust on the host. Although common in documentation, it is risky because any compromised or spoofed binary becomes executable system-wide with admin involvement.
tar -xzf aliyun-cli-macosx-latest-amd64.tgz
# Move to PATH
sudo mv aliyun /usr/local/bin/
# Verify
aliyun version
The Debian/Ubuntu example uses sudo to place a downloaded binary into /usr/local/bin, creating a privileged installation path for externally sourced code. In enterprise or agent-managed systems, this can turn a supply-chain issue into host-wide execution impact.
# Extract and install
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/
# Verify
aliyun version
The CentOS/RHEL example repeats a privileged move of a downloaded binary into a system PATH directory. This is dangerous if the archive is tampered with or if operators follow the instructions without adequate verification.
# Extract and install
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/
# Verify
aliyun version
The ARM64 example also instructs a sudo-based system-wide install of a downloaded binary. This expands the blast radius of any compromised artifact and is more sensitive in automated environments where elevation may be preapproved.
tar -xzf aliyun-cli-linux-latest-arm64.tgz sudo mv aliyun /usr/local/bin/
### Windows
The examples pass access keys and secrets directly on the command line, which can expose credentials via shell history, process listings, terminal logging, and audit tools. In agent-driven or shared environments, this creates a realistic path to credential theft and subsequent cloud-account compromise.
The document recommends non-interactive credential flags for automation without warning that these values may be captured by CI logs, workflow traces, build metadata, and process telemetry. In automated agent contexts, this materially increases the chance of long-lived secret leakage at scale.
The guide encourages creating and saving persistent AccessKey credentials, which promotes long-lived secret material in a skill that could instead emphasize temporary credentials or instance roles. Persistent keys increase exposure windows and are especially risky in automation and agent contexts where secrets may be reused broadly.
1. Log in to Aliyun Console: https://ram.console.aliyun.com/
2. Navigate to: AccessKey Management
3. Create a new AccessKey pair
4. Save the secret immediately — it's only shown once
### Configuration Modes
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Restrict permissions
chmod 600 ~/.aliyun/config.json
The guide explicitly encourages installation of arbitrary Alibaba Cloud product plugins unrelated to this skill's stated purpose. That enables capability expansion beyond remote log retrieval and can let an agent or operator pivot into managing other cloud resources from the same CLI environment.
The document grants and normalizes permissions for remote log retrieval and log search, which can expose sensitive application and user data contained in mobile logs, but it does not warn about the sensitivity of those logs or recommend restricting access. In a skill specifically designed to collect and query remote logs, omission of privacy and access-control guidance increases the chance of overbroad access and misuse by operators.
The document provides step-by-step commands for enumerating devices, creating remote log collection tasks, and searching device logs without any warning that these operations can access sensitive user and device data. In the context of an agent skill, this increases the risk of unauthorized or privacy-impacting use because operators may treat the workflow as routine administration rather than access to potentially regulated telemetry and personal data.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| API | Documentation |
|-----|---------------|
| GetTlogDeviceList | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceList |
| GetTlogDeviceInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceInfo |
| CreateTlogTask | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/CreateTlogTask |
| GetTlogTaskInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogTaskInfo |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| API | Documentation |
|-----|---------------|
| GetTlogDeviceList | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceList |
| GetTlogDeviceInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceInfo |
| CreateTlogTask | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/CreateTlogTask |
| GetTlogTaskInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogTaskInfo |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| API | Documentation |
|-----|---------------|
| GetTlogDeviceList | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceList |
| GetTlogDeviceInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceInfo |
| CreateTlogTask | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/CreateTlogTask |
| GetTlogTaskInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogTaskInfo |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| API | Documentation |
|-----|---------------|
| GetTlogDeviceList | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceList |
| GetTlogDeviceInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogDeviceInfo |
| CreateTlogTask | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/CreateTlogTask |
| GetTlogTaskInfo | https://api.aliyun.com/api/emas-appmonitor/2019-06-11/GetTlogTaskInfo |
No suspicious patterns detected.