T03 · Remote Payload Retrieval and Execution
- Location
scripts/install-teslamate.sh:145- Finding
Mutable Docker Images Are Downloaded from a Personal Repository and Executed
- Content
View full analysis
/dev/null)) || die "$f SHA256 verification failed" done for f in $(echo "$files" | sort); do cat "${tmpdir}/${f//\//_}" done | gunzip | docker load ``` The fallback is automatically reached when a registry pull fails: ```bash if sudo docker pull "$img" 2>/dev/null; then ok "$img pulled successfully" else warn "docker pull $img failed; trying GitHub" download_github_image "$img" fi ``` The troubleshooting guide also recommends loading an archive without verification: ```bash curl -sL https://raw.githubusercontent.com/martinbj2008/docker_images/main/postgres/17/postgres-17.tar.gz \ | gunzip | docker load ``` ### Technical Analysis The installer downloads executable Docker image archives from the mutable `main` branch of a personal GitHub repository. Although SHA-256 checks are performed in the installer, the checksum manifest is downloaded from the same mutable repository and trust domain as the payload. An attacker who can modify the repository can replace both the image and its expected checksum. The resulting image is imported into Docker and later started by ` ...[truncated 1430 chars]- Remediation
View remediation
``` 4. If offline archives are necessary, publish them as immutable signed releases rather than files on a mutable branch. 5. Verify signatures using a separately established trust root, such as Cosign with a pinned public key. 6. Store expected digests in the audited Skill package rather than downloading checksums from the payload source. 7. Download to a file, verify it completely, inspect the expected image identity, and only then run `docker load`. 8. Remove the unverified `curl | gunzip | docker load` instructions from the troubleshooting guide. ]]>
