T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:407
- Finding
- Privileged Android Control Interface Exposed over Cleartext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:10-13` and `SKILL.md:407-420` **Vulnerability Type**: Cleartext transmission and network exposure of a privileged control API **Risk Level**: High ### Vulnerable Code Snippet ```markdown cua add redmi 192.168.0.105 <token> cua ping ``` ```text ┌─────────────────────────────────────────────┐ │ Android Device │ │ │ │ :http process main process │ │ ┌──────────────┐ ┌──────────────────┐ │ │ │ BridgeService│ HTTP │ AccessibilityBridge│ │ │ │ NanoHTTPD │─────→│ A11yInternalServer│ │ │ │ 0.0.0.0:7333│proxy │ 127.0.0.1:7334 │ │ │ └──────────────┘ └──────────────────┘ │ │ ↑ auth+CORS ↑ a11y service │ │ ↑ auto-unlock ↑ gesture dispatch │ │ ↑ config/status ↑ tree traversal │ └────────────────────────────────────────────── ┘ ↑ HTTP ┌────────────┐ │ Agent/CLI │ cua commands / curl └────────────┘ ``` ### Technical Analysis The documented bridge listens on `0.0.0.0:7333`, exposing the service on every available network interface. Communication between the client and the device is explicitly described as HTTP. Although the architecture mentions authentication, it does not document TLS, certificate validation, request signing, nonce-based replay protection, or another secure transport. A bearer token transmitted over cleartext HTTP may be observed by an attacker with access to the same network path. HTTP request and response bodies may also expose screenshots, UI trees, clipboard contents, messages, contacts, files, location information, and action parameters. The API is particularly sensitive because the documented capabilities include accessibility actions, application launching, calls, SMS operations, camera access, file operations, clipboard access, location retrieval, device unlocking, and automated permission management. Exposu ...[truncated 1845 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace cleartext HTTP with TLS and require strict certificate validation. 2. Prefer binding the control service to `127.0.0.1` and accessing it through an authenticated, encrypted tunnel. 3. If LAN exposure is required, bind only to an explicitly configured trusted interface and enforce host firewall allowlists. 4. Replace long-lived bearer tokens with short-lived, device-bound credentials. 5. Introduce request timestamps, unique nonces, and authenticated request signatures to prevent replay. 6. Separate privileges into narrowly scoped capabilities, such as read-only screen access, UI control, messaging, camera, and file access. 7. Require explicit confirmation or stronger authorization for destructive and privacy-sensitive actions. 8. Rotate credentials after suspected disclosure and provide a device-side mechanism to revoke active clients immediately. 9. Store credentials using the Android Keystore rather than plaintext configuration. 10. Avoid logging tokens, unlock PINs, message contents, screenshots, or other sensitive request data. 11. Document the authentication protocol and add tests verifying that unauthenticated, expired, replayed, and improperly scoped requests are rejected. ]]>
