T03 · Remote Payload Retrieval and Execution
- Location
setup.sh:9- Finding
Unverified Mutable Remote Code Is Downloaded and Executed
- Content
View full analysis
/dev/null || pip install -r requirements.txt -q nohup python3 app.py > /tmp/hk3-crm.log 2>&1 & CRM_PID=$! echo $CRM_PID > "$CRM_DIR/.pid" ``` ### Technical Analysis The installer clones or updates a GitHub repository and then directly executes content obtained from that repository. It does not pin the repository to an immutable commit, validate an expected cryptographic hash, or verify a trusted signature. Consequently, the effective code executed by the Skill can change after the local Skill package has been audited. Both initial installation through `git clone` and later updates through `git pull` trust the current remote repository state. The remote repository controls `app.py` and `requirements.txt`, providing multiple code-execution opportunities. The local files do not prove that the current remote repository is malicious. The vulnerability is the unrestricted and unverified remote execution channel. ### Attack Path 1. An attacker compromises the GitHub repository, its maintainer account, or another mechanism capable of changing its default branch. 2. The attacker adds malicious instructions to `app.py`, changes `requirements.txt`, or modifies other code imported by the application. 3. A user or Agent invokes the Skill. 4. The installer retrieves the attacker-controlled revision through `git clone` or `git pull`. 5. The installer runs dependency installation and launches `python3 app.py` without validating the downloaded revision. 6. The malicious code executes with the operating-system privileges and environment access of the user runnin ...[truncated 686 chars]- Remediation
View remediation
