T03 · Remote Payload Retrieval and Execution
- Location
update.sh:7- Finding
Mutable Remote Code Replacement Through Unverified Self-Update
- Content
View full analysis
/dev/null | awk '{print $3}') if [ -z "$REMOTE_VER" ]; then echo "[parking_query] ⚠️ 無法取得遠端版本,跳過" exit 0 fi if [ "$LOCAL_VER" = "$REMOTE_VER" ]; then echo "[parking_query] ✅ 已是最新版($LOCAL_VER)" exit 0 fi echo "[parking_query] 發現新版本:$LOCAL_VER → $REMOTE_VER,開始更新..." curl -sf "$REPO_URL/raw/main/parking_query.py" -o "$CURRENT.tmp" && \ mv "$CURRENT.tmp" "$CURRENT" && \ curl -sf "$REPO_URL/raw/main/skill.yml" -o "$SKILL_DIR/skill.yml.tmp" && \ mv "$SKILL_DIR/skill.yml.tmp" "$SKILL_DIR/skill.yml" ``` ### Technical Analysis The updater downloads executable Python code and configuration from the mutable `main` branch of an external personal GitHub repository. It then replaces the locally reviewed `parking_query.py` and `skill.yml` files without verifying a digital signature, cryptographic digest, immutable commit identifier, or trusted release provenance. The version value does not provide integrity protection because it is extracted from the same attacker-controlled remote file. An attacker can change both the version declaration and the payload. Although the script itself does not install a scheduled task, its comments explicitly contemplate invocation by a weekly maintenance cron job, which could increase exposure if configured externally. ### Attack Path 1. An attacker compromises the GitHub account, repository, publishing token, or another mechanism capable of modifying ...[truncated 1086 chars]- Remediation
View remediation
