T03 · Remote Payload Retrieval and Execution
- Location
scripts/install.sh:25- Finding
Unverified Remote Binary Download and Execution
- Content
View full analysis
/dev/null; then curl -fSL "$URL" -o "${INSTALL_DIR}/awi" elif command -v wget &>/dev/null; then wget -q "$URL" -O "${INSTALL_DIR}/awi" else echo "❌ Need curl or wget"; exit 1 fi chmod +x "${INSTALL_DIR}/awi" # Verify if "${INSTALL_DIR}/awi" --help &>/dev/null; then ``` ### Technical Analysis The installation script downloads a precompiled executable from a GitHub release directly into `~/bin/awi`, marks it executable, and immediately invokes it with `--help`. It performs no cryptographic checksum validation, digital-signature verification, or trusted-manifest verification before execution. HTTPS protects the download while in transit but does not establish that the release asset itself matches the artifact reviewed or intended by the skill author. If the repository, maintainer account, release process, or hosted asset is compromised, an attacker can replace the binary while leaving the reviewed installation script unchanged. Passing `--help` is not a security check because a malicious executable can perform arbitrary actions before displaying help or returning success. ### Attack Path 1. An attacker compromises the upstream GitHub repository, a maintainer account, the release pipeline, or the `v0.1.0` release asset. 2. The attacker replaces the relevant `awi-*` asset with a malicious executable while retaining the expected filename. 3. A user or agent invokes `scripts/install.sh`. 4. The script downloads the altered asset without checking a pinned digest or trusted signature. 5. The script applies executable p ...[truncated 796 chars]- Remediation
View remediation
&2 exit 1 fi chmod 0755 "$TMP_BINARY" mkdir -p "$INSTALL_DIR" mv "$TMP_BINARY" "${INSTALL_DIR}/awi" ``` On macOS, use an equivalent trusted SHA-256 utility such as `shasum -a 256`. A signed manifest is preferable when release artifacts must be updated without editing the installer for every digest. ]]>
