T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:25- Finding
Unverified Remote Executables Are Downloaded, Installed, and Run with Account Access
- Content
View full analysis
- Remediation
View remediation
" ARCHIVE="$(mktemp "${TMPDIR:-/tmp}/xhs.XXXXXX.tar.gz")" curl --fail --show-error --location \ --proto '=https' --tlsv1.2 \ --output "$ARCHIVE" \ "https://github.com/xpzouying/xiaohongshu-mcp/releases/download/${TAG}/xiaohongshu-mcp-darwin-amd64.tar.gz" printf '%s %s\n' "$EXPECTED_SHA256" "$ARCHIVE" | shasum -a 256 -c - ``` 4. **Stage and inspect archive contents** - Extract into a newly created temporary directory rather than directly into `~/.local/bin`. - Reject absolute paths, parent-directory traversal entries, symbolic-link surprises, unexpected filenames, and extra executables. - Confirm that only the two documented binaries are present before installation. 5. **Avoid silent replacement** - Do not use forced moves to overwrite existing executable files without explicit user approval. - Install versioned filenames and use an intentional, auditable activation step. - Record the installed version and verified digest. 6. ...[truncated 861 chars]
