T09 · Insecure Skill Coding Practices
- Location
src/clawshorts/device_monitor.py:164- Finding
Predictable shared temporary files enable local symlink and data-tampering attacks
- Content
View full analysis
/dev/null adb -s "$ip:5555" pull /sdcard/ui.xml /tmp/ui.xml 2>/dev/null pct=$(python3 -c " import re try: c=open('/tmp/ui.xml').read() ``` ### Technical Analysis Both implementations use fixed filenames in the globally shared `/tmp` directory. No secure creation operation, exclusive-open check, symlink rejection, ownership verification, or cleanup is performed. An untrusted local process can anticipate these filenames and create a regular file or symbolic link before ClawShorts runs. Depending on how the installed ADB client handles an existing destination, this can result in: - Overwriting a symlink target writable by the ClawShorts user. - Reading attacker-controlled XML and producing a forged Shorts classification. - Exposing Fire TV UI hierarchy data to other local users through an inadequately protected temporary file. - Cross-process collisions when multiple status checks or fallback daemons run concurrently. - Persistent retention of UI metadata after the operation finishes. The pulled UI hierarchy may contain text and interface metadata visible on the Fire TV. Although no external exfiltration was found, storing this information a ...[truncated 1364 chars]- Remediation
View remediation
