Back to skill

Security audit

Claw Use Android

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Android phone-control tool, but it exposes very powerful device access with unsafe update, permission, unlock, and cleartext network-control patterns that require careful review before use.

Install only if you intend to give an AI agent broad control over a real Android device. Use a dedicated test phone, isolate it on a trusted network, avoid storing a real lockscreen PIN if possible, do not grant unnecessary permissions, and do not use the LAN HTTP APK update flow unless you independently verify the APK source, hash, package name, and signing identity.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

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. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:304
Finding
Unverified APK Download and Automated Installation over Plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:304-327`, `SKILL.md:367-376`, `flows.md:15-42`, and `flows.md:85-98` **Vulnerability Type**: Remote payload retrieval without integrity verification **Risk Level**: High ### Vulnerable Code Snippet ```markdown ## Self-Update (OTA via LAN) Update a device to a new APK version without ADB: ```bash # Serve APK on LAN (from the machine with the APK) cd /path/to/apk && python3 -m http.server 9090 & # On the device, open browser to download cua -d <name> intent '{"action":"android.intent.action.VIEW","uri":"http://<lan-ip>:9090/app.apk"}' # Or via browser navigation for MIUI browser: cua -d <name> click "浏览器" cua -d <name> click "搜索或输入网址" cua -d <name> type "http://<lan-ip>:9090/app.apk" # ... then handle download + install prompts # MIUI install flow (after APK opens in installer) cua -d <name> flow '{ "steps": [ {"wait": "继续安装", "then": "tap", "timeout": 15000}, {"wait": "已了解此应用未经安全检测", "then": "tap", "timeout": 10000, "optional": true}, {"wait": "继续更新", "then": "tap", "timeout": 15000} ] }' ``` ``` ```json { "app": "com.brave.browser", "flow": "download-apk-from-lan", "desc": "通过 Brave 浏览器从局域网 HTTP 服务器下载 APK 并安装", "acts": [ {"click": "Brave"}, {"screen": true, "note": "确认 Brave 已打开,找到地址栏 ref"}, {"click": "url_bar_ref", "note": "点击地址栏(用 ref)"}, {"type": "http://<lan-ip>:<port>/<apk-name>"}, {"screen": true, "note": "点击第一个搜索建议"}, {"wait": "是否重新下载文件?", "then": "none", "timeout": 3000, "optional": true, "note": "可能出现重复下载确认"}, {"wait": "下载", "then": "tap", "timeout": 5000, "note": "点击下载按钮"}, {"wait": "无法安全地下载文件", "then": "none", "timeout": 5000, "optional": true}, {"wait": "保留", "then": "tap", "timeout": 5000}, {"wait": "打开", "then": "tap", "timeout": 30000, "note": "等待下载完成后点打开"} ] }, { "app": "com.miui.packageinstaller", "flow": "miui-install-apk", "desc": "MIUI 安装 APK 的确认流程(安全警告、权限确认等)", "acts": [ {"wait": "是否允许", "then ...[truncated 4029 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Discontinue APK distribution over plaintext HTTP. 2. Retrieve releases through HTTPS from an authenticated, controlled origin with strict certificate validation. 3. Publish a signed update manifest containing the package name, version, file size, SHA-256 digest, and signing-certificate fingerprint. 4. Verify the APK digest and signing certificate before invoking the package installer. 5. Confirm that the APK package name exactly matches the expected application identifier. 6. Reject version downgrades unless a separately authorized rollback process is used. 7. Abort installation when the browser or installer reports an unsafe, modified, unscanned, or untrusted package instead of automatically dismissing the warning. 8. Require explicit human confirmation that displays the verified package name, version, signing identity, and digest for high-risk updates. 9. Protect release-signing keys using hardware-backed or isolated signing infrastructure. 10. Restrict the update server to authenticated clients and prevent untrusted write access to its served directory. 11. Where feasible, use an established signed update mechanism or managed application distribution platform instead of browser-driven installation. 12. Add negative tests demonstrating that packages with an incorrect digest, package name, signing certificate, or version are rejected before installation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Self-Modification

High
Category
Rogue Agent
Content
---

## Self-Update (OTA via LAN)

Update a device to a new APK version without ADB:
Confidence
90% confidence
Finding
The self-update capability enables the skill ecosystem to modify the device-resident software used for control, and the documented flow encourages unattended OTA installation. In context, self-modification is dangerous because it can persistently alter the trusted control component and amplify any compromise through malicious or unverified updates.

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill includes a reusable flow to download an APK over LAN via plain HTTP, bypass browser safety warnings ('保留'), and then open it for installation. In the context of an agent skill, this operationalizes sideloading from an untrusted source and normalizes overriding security prompts, which can directly lead to malware installation or unauthorized software deployment on the device.

Missing User Warnings

High
Confidence
99% confidence
Finding
The permission-granting flow explicitly directs the agent to navigate to an app's settings and authorize all permissions. This creates a powerful privilege-escalation primitive for any target app, enabling access to sensitive data and device capabilities without granular review or meaningful user consent.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file includes mandatory natural-language instructions in Chinese, such as requiring the agent to read `flows.md` and persist new flows, without offering a language choice or indicating that Chinese is optional. This is a language/locale policy concern because it imposes a specific language on users or operators without opt-in.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
This section documents highly sensitive device operations such as clipboard access, camera capture, contacts/SMS access, file read/write, location retrieval, and call/SMS actions without prominent privacy, consent, or data-handling warnings. In a skill intended for AI agents, these capabilities materially increase the risk of unauthorized surveillance, data exfiltration, or destructive actions if the agent is misused or insufficiently constrained.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs users to store a lockscreen PIN and enables automatic device unlocking, which weakens a core device security boundary and creates a reusable secret-handling risk. If the agent, host, config store, or network path is compromised, an attacker could unlock and fully control the device, turning all other exposed capabilities into high-impact compromise.

External Transmission

Medium
Category
Data Exfiltration
Content
### Click with Retry
```bash
# Atomic find-and-tap: retries until element appears
curl -X POST /click -d '{"text":"继续安装","retry":3,"retryMs":2000}'
```

---
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The self-update workflow automates APK installation from a LAN-hosted server and includes steps to click through security warnings about unverified apps, but does not require integrity verification or trusted-source validation. This creates a supply-chain risk where a tampered APK or MITM-delivered package could be installed with minimal user awareness, leading to device compromise.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The guidance 'desc: 一句话描述,中文优先' sets a language preference in the skill content without indicating user choice or a justified locale-specific constraint. This is a natural-language policy issue because it prescribes a specific language by default rather than offering opt-in or documenting a regional requirement.

Static analysis

No suspicious patterns detected.