T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:45- Finding
Global ClawHub CLI Modification Silently Asserts License Acceptance
- Content
View full analysis
/dev/null | head -1) # 检查是否已 patch grep -q "acceptLicenseTerms" "$PUBLISH_JS" && echo "已 patch" || \ # 在 payload 构建处加入 acceptLicenseTerms: true sed -i 's/skillName:/acceptLicenseTerms: true, skillName:/' "$PUBLISH_JS" && echo "patch 完成" ``` ### Technical Analysis The skill searches system-wide library directories for a ClawHub `publish.js` file and rewrites the first match in place. The injected property, `acceptLicenseTerms: true`, causes future publish requests to assert acceptance of legal terms without obtaining explicit consent through the supported interface. This violates tool-integrity and least-change principles. The selected file is determined by `find ... | head -1`, so systems with multiple ClawHub installations may have an unintended copy modified. The broad search path also does not verify the package version, file checksum, owner, or exact installation location before applying the substitution. The stated idempotence does not make the operation safe: the first occurrence of `skillName:` may not necessarily be the expected payload field, particularly after package updates. ### Attack Path 1. A user invokes the publishing skill. 2. The agent searches `/usr/local/lib` and `/usr/lib` for a matching `publish.js`. 3. The first matching file is accepted without provenance or integrity verification. 4. `sed -i` rewrites the globally installed module. 5. Subsequent ClawHub publishing operations execute the modified code and automatically send `acceptLicenseTerms: true`. 6. Other users or workflows relying on the same global installation inherit the modified behavior. ### Impact Assessment An invocation may modify shared, globally install ...[truncated 356 chars]- Remediation
View remediation
