T03 · Remote Payload Retrieval and Execution
- Location
scripts/install-tracebit.sh:23- Finding
Mutable Remote Installer Is Downloaded and Executed
- Content
View full analysis
/dev/null 2>&1; then RELEASE_JSON=$(curl -fsSL "$GITHUB_API" 2>/dev/null) || RELEASE_JSON="" elif command -v wget >/dev/null 2>&1; then RELEASE_JSON=$(wget -qO- "$GITHUB_API" 2>/dev/null) || RELEASE_JSON="" fi ... TMPDIR_INSTALL=$(mktemp -d) trap 'rm -rf "$TMPDIR_INSTALL"' EXIT FILENAME="${DOWNLOAD_URL##*/}" DEST="$TMPDIR_INSTALL/$FILENAME" info "Downloading $FILENAME..." if command -v curl >/dev/null 2>&1; then curl -fSL --progress-bar "$DOWNLOAD_URL" -o "$DEST" elif command -v wget >/dev/null 2>&1; then wget -q --show-progress "$DOWNLOAD_URL" -O "$DEST" else die "Neither curl nor wget is available. Install one and retry." fi ... if [[ "$ACTUAL_SHA256" == "$EXPECTED_SHA256" ]]; then success "SHA256 checksum verified via ${VERIFY_SOURCE}: $ACTUAL_SHA256" else die "SHA256 MISMATCH! Expected: $EXPECTED_SHA256, Got: $ACTUAL_SHA256 — download may be corrupted or tampered with." fi ... if [[ "$OS" == "linux" ]]; then info "Running Linux installer..." chmod +x "$DEST" bash "$DEST" success "Tracebit CLI installed." ``` ### Technical Analysis The installation script resolves the mutable GitHub `latest` release, downloads an installer, and executes it with the current user's privileges. Although a SHA-256 check is mandatory, the expected digest is obtained from GitHub release metadata or a checksum asset in the same mutable release. This protects against accidental corruption but does not establish an independent trust root. An attacker who compromises the repository, release workflow, maintainer cred ...[truncated 1708 chars]- Remediation
View remediation
