T09 · Insecure Skill Coding Practices
- Location
SKILL.md:37- Finding
Deployment archive integrity verification is incorrectly implemented
- Content
View full analysis
&& sha256sum .sha256 > /tmp/sha256sum-.txt ``` Periodically check the verification result: ```bash cat /tmp/sha256sum-.txt ``` Success criterion: the result contains ": Success" ``` ### Technical Analysis The command calculates the SHA-256 digest of the checksum file itself rather than validating the deployment archive against that checksum file. Proper GNU `sha256sum` verification ordinarily requires `sha256sum -c `. In addition, `nohup cd ` is not a reliable way to run this operation because `cd` is normally a shell builtin rather than a standalone executable that `nohup` can invoke directly. The command therefore may fail before verification occurs. The documented success criterion does not correspond to output that this command would normally produce. As a result, the workflow provides no reliable integrity guarantee before extracting the archive and executing its bundled `bocctl` program. ### Attack Path 1. An attacker with write access to the deployment location replaces or modifies the deployment archive. 2. The attacker may also replace the adjacent checksum file. 3. The Skill runs the documented command, which hashes the checksum file instead of validating the archive. 4. The workflow treats the ineffective or incorrectly interpreted result as package validation. 5. The modified archive is extracted. 6. The attacker-controlled `bocctl` executable is run through `./bocctl init`. ### Impact Assessment Successful exploitation can result in arbitrary code execution under the account used to initialize th ...[truncated 307 chars]- Remediation
View remediation
