Back to skill

Security audit

Clawpaw Android Control Template

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Android remote-control tool, but it grants very broad phone access over under-protected channels and needs careful review before use.

Install only if you trust the ClawPaw app and the network path to the phone. Prefer Gateway or a protected tunnel over direct WiFi HTTP, grant only the Android permissions you actually need, avoid enabling vision analysis on sensitive screens, and require explicit user confirmation before SMS, calls, purchases, notification actions, file reads, contacts, photos, location, or screen uploads.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/clawpaw_controller.py:60
Finding
Privileged Android Control Uses Unauthenticated Cleartext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `scripts/clawpaw_controller.py`, lines 60-122 **Vulnerability Type**: Cleartext transmission of sensitive data and privileged commands **Risk Level**: High ### Vulnerable Code ```python self.base_url = f"http://{self.host}:{self.port}" ``` ```python def get_layout(self) -> str: """ 获取当前界面布局(XML) Returns: 解码后的 XML 布局字符串 """ resp = requests.get(f"{self.base_url}/api/layout", timeout=self.timeout) data = resp.json() layout_b64 = data.get("layout", "") return base64.b64decode(layout_b64).decode("utf-8", errors="ignore") ``` ```python def get_screenshot(self, save_path: Optional[str] = None) -> bytes: """ 获取截图 Args: save_path: 可选,保存截图到文件 Returns: 截图的 PNG 数据 """ resp = requests.get(f"{self.base_url}/api/screenshot", timeout=self.timeout) data = resp.json() screenshot_b64 = data.get("screenshot", "") png_data = base64.b64decode(screenshot_b64) if save_path: with open(save_path, "wb") as f: f.write(png_data) return png_data ``` ```python def execute(self, action: str, **kwargs) -> Dict[str, Any]: """ 执行命令 Args: action: 动作类型 (click, input_text, swipe, back, open_amap, screenshot, get_layout) **kwargs: 动作参数 Returns: 执行结果 """ payload = {"action": action, **kwargs} resp = requests.post( f"{self.base_url}/api/execute", json=payload, timeout=self.timeout ) return resp.json() ``` ### Technical Analysis The direct-control client constructs every device API URL with the `http://` scheme. It does not attach an authentication token, verify a server identity, encrypt the transport, or implement request integrity and replay protection. These API requests can contain or return highly sensitive information, including: - Screen captures and accessibility layout XML - Text entered into applications - Location, notific ...[truncated 1985 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require authenticated HTTPS for direct network connections. 2. Reject non-loopback `http://` endpoints unless the user explicitly enables an acknowledged development-only override. 3. Prefer an authenticated encrypted tunnel for local operation. 4. Add per-device authentication using short-lived, scoped credentials rather than a shared static secret. 5. Validate the server certificate and hostname; do not disable certificate verification. 6. Add request timestamps, nonces, and integrity protection to prevent replay. 7. Bind the phone service to the narrowest possible interface and restrict access with host firewall rules. 8. Separate read-only information operations from high-impact control operations and require stronger authorization for the latter. 9. Avoid returning layouts after every control operation unless explicitly requested, reducing unnecessary sensitive-data transfer. 10. Clearly warn users that direct WiFi mode exposes privileged device traffic unless transport security is configured. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/clawpaw_controller.py:625
Finding
Screenshots, Accessibility Layouts, and API Credentials Can Be Sent to an Unrestricted External Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `scripts/clawpaw_controller.py`, lines 625-779 **Vulnerability Type**: Unrestricted external transmission of sensitive screen data **Risk Level**: Medium ### Vulnerable Code ```python def _call_vision_api(self, api_base: str, api_key: str, model: str, image_b64: str, prompt: str) -> Dict[str, Any]: """ 调用视觉大模型分析图片(通用 OpenAI 格式) Args: api_base: API 基础 URL api_key: API Key model: 模型名称 image_b64: Base64 编码的图片数据 prompt: 分析提示词 Returns: 模型返回的分析结果 """ # 构建请求 resp = requests.post( f"{api_base}/chat/completions", headers={ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" }, json={ "model": model, "messages": [{ "role": "user", "content": [ {"type": "text", "text": prompt}, {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_b64}"}} ] }], "temperature": 0.1, "max_tokens": 500 }, timeout=120 ) resp.raise_for_status() result = resp.json() content = result["choices"][0]["message"]["content"] ``` ```python # 获取截图和 XML screenshot_b64 = self._get_screenshot_base64() layout_xml = "" if include_layout: try: layout_xml = self.get_layout() except Exception as e: print(f"⚠️ 获取布局失败:{e},仅使用截图分析") # 可选保存 saved_path = None if save and screenshot_b64: saved_path = self._save_screenshot_by_timestamp(screenshot_b64) print(f"📸 截图已保存:{saved_path}") # 构建增强提示词 enhanced_prompt = f"""【任务】{prompt} 【截图】见下方图片 【XML 布局】 ```xml {layout_xml[:30000]} ``` 【要求】 1. 结合截图和 XML 布局,找到目标元素 2. 返回 JSON 格式:{{"action": "click", "x": 500, "y": 1200, "reason": "说明"}}""" # 调用 LLM API print(f"🔍 分析中(截图 + XML)...") result = self._call_vision_api(api_b ...[truncated 2469 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require `https://` for all vision API endpoints and reject cleartext URLs. 2. Maintain an explicit allowlist of trusted providers or require an additional confirmation for custom endpoints. 3. Show the endpoint hostname and categories of data to be transmitted before enabling vision analysis. 4. Request confirmation before each upload when the active application or screen may contain sensitive information. 5. Redact password fields, notification contents, authentication codes, payment information, and other sensitive regions. 6. Do not send layout XML by default; include only the minimum nodes required for the requested analysis. 7. Reduce screenshot resolution or crop to a user-selected region where possible. 8. Use provider-specific, narrowly scoped credentials and store them in an operating-system secret store rather than plaintext YAML. 9. Add destination-change warnings so that modification of `api_base` cannot silently redirect future uploads. 10. Document data retention, third-party processing, and the fact that screenshots and XML leave the local environment. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:219
Finding
Privileged Components and Python Dependencies Are Installed Without Version or Integrity Pinning<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 219-248 **Vulnerability Type**: Unpinned third-party dependencies and mutable application release source **Risk Level**: Medium ### Vulnerable Code ```markdown ### 1. 手机端安装 ClawPaw App 1. 下载 [ClawPaw App](https://github.com/klscool/ClawPaw/releases) 2. 安装到 Android 手机(Android 10+) 3. 开启无障碍服务: ``` 设置 → 辅助功能 → 已下载的服务 → ClawPaw Accessibility Service → 开启 ``` 4. (可选)按需授予权限:位置、通知、联系人、照片等 ``` ```bash # 使用 Python 脚本 pip3 install requests pyyaml cd ~/.openclaw/skills/clawpaw-android-control/scripts python3 clawpaw_controller.py device_info ``` ### Technical Analysis The installation instructions retrieve Python packages without specifying reviewed versions or cryptographic hashes. They also direct users to a mutable releases page for the Android application without identifying a specific reviewed release, package digest, or signing-certificate fingerprint. No typo-squatted dependency or known malicious package is present in the audited content. The risk arises from non-reproducible dependency resolution and reliance on mutable upstream artifacts. This is particularly significant because the Android application is expected to receive accessibility access and may also receive camera, location, contact, notification, SMS, telephone, photo, and file permissions. A compromised upstream artifact would therefore execute with unusually broad access. ### Attack Path 1. An attacker compromises an upstream package account, release workflow, repository, distribution channel, or developer credential. 2. A malicious version is published under the expected package or application source. 3. A user follows the documented unpinned installation instructions. 4. Package resolution selects the modified dependency, or the user downloads the modified latest application release. 5. The malicious component executes on the host or Android device. 6. If the Android application is compromised, it can misuse a ...[truncated 737 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Provide a locked dependency file with exact reviewed versions. 2. Include cryptographic hashes and install Python dependencies with hash verification enabled. 3. Link to a specific reviewed ClawPaw application release rather than the mutable releases index. 4. Publish the expected APK SHA-256 digest and Android signing-certificate fingerprint. 5. Document steps for verifying the APK signature before installation. 6. Use automated dependency scanning and review updates before changing pinned versions. 7. Generate and publish a software bill of materials for host and Android components. 8. Prefer isolated Python environments so dependency installation cannot unexpectedly alter unrelated host tooling. 9. Record the exact reviewed commit or release corresponding to the Skill version. 10. Apply least privilege on Android even after integrity verification, granting optional permissions only when a task requires them. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Vague Triggers

High
Confidence
97% confidence
Finding
The README states that after setup, users can issue broad natural-language requests like ordering food or checking notifications and that OpenClaw will automatically call this skill. For a skill that can remotely control a phone, access screenshots, notifications, SMS, contacts, and other sensitive data, this broad invocation model encourages use without explicit scoping, consent boundaries, or confirmation for high-risk actions, increasing the chance of unauthorized device actions or privacy-invasive behavior.

Vague Triggers

High
Confidence
97% confidence
Finding
The Chinese section repeats the same unsafe pattern by implying that general user requests will automatically trigger the skill to operate the phone. Because the skill supports remote UI control and access to sensitive phone data, this broad activation language can normalize silent execution of risky actions without explicit consent or guardrails.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The documented behavior goes far beyond the declared purpose of simple Android UI automation, including access to contacts, notifications, photos, calendar data, files, device state, telephony, and third-party visual analysis. This mismatch is dangerous because users and reviewers may consent to a seemingly narrow automation skill while it actually enables broad surveillance, data exfiltration, and device-control operations.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The controller exposes broad access to sensitive device data and system capabilities, including contacts, notifications, photos, calendar data, location, files, camera, Bluetooth, and Wi‑Fi controls. While such access may be technically possible for a phone automation tool, it materially exceeds the narrow examples in the description and creates a high-risk remote-control/data-exfiltration surface if invoked by an agent or other untrusted caller.

Missing User Warnings

High
Confidence
97% confidence
Finding
The code transmits screen contents to an external API using a bearer-authenticated HTTP request without any user-facing confirmation, disclosure, or interactive consent at the time of upload. Since screenshots can reveal private conversations, MFA codes, financial data, and account details, this silent transmission is highly sensitive and dangerous in an automation context.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill includes logic to send screenshots and up to 30,000 characters of UI layout XML to an external vision LLM endpoint, which is a separate data flow not implied by basic Android control. Screens and layouts can contain passwords, messages, tokens, personal data, and app context, so uploading them off-device without strong consent and boundaries creates a serious confidentiality risk.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The README advertises remote control capabilities and access to screenshots, layout XML, notifications, photos, contacts, calendar, SMS, and location, but does not prominently warn about privacy, surveillance, account misuse, or unintended device-impact risks. In the context of a remote phone-control skill, omission of these warnings can lead users to over-grant permissions and deploy the skill in unsafe ways.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README normalizes granting an accessibility service as sufficient for broad UI automation, including screen reading, screenshots, input, app launching, and interaction across other apps, but does not clearly warn that this effectively grants near-global observation and control over the device UI. In the context of an agent skill for remote Android control, this omission can cause users to underestimate the sensitivity of the permission and enable invasive surveillance or unauthorized actions in other apps.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises extensive file and network-capable behavior but does not declare an explicit tool scope such as permissions or allowed-tools. That omission weakens reviewability and containment, making it easier for an agent to invoke sensitive local file reads and network interactions without clear policy boundaries.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill is presented as Android automation control, but the documented commands include broad personal-data access and device-administration functions unrelated to basic UI automation. That framing understates the sensitivity of the skill and can lead operators to authorize a much more invasive capability set than intended.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The documentation exposes sensitive actions such as reading contacts, SMS, photos, files, notifications, placing calls, sending SMS, and changing device settings without strong privacy, consent, or irreversible-impact warnings. In an agent setting, this increases the chance of unsafe execution because operators may not realize these commands can access private data or trigger real-world side effects.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The HTTP-mode visual analysis feature depends on an external API key and model configuration, implying screenshots and possibly layout XML may be sent to a third-party service, but this is not disclosed in the manifest. Undisclosed outbound transfer of screen content is especially sensitive because screens may contain credentials, messages, financial data, or other personal information.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This YAML file contains natural-language comments and usage instructions exclusively in Chinese, including operational guidance and configuration explanations. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale constraint is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This markdown template is entirely written in Chinese and presents itself as a general-purpose guide template, with no indication that Chinese is optional or that the template is intended only for a Chinese-speaking or region-specific context. That creates a natural-language policy concern because it implicitly enforces a specific language without user opt-in.

External Transmission

Medium
Category
Data Exfiltration
Content
执行结果
        """
        payload = {"action": action, **kwargs}
        resp = requests.post(
            f"{self.base_url}/api/execute",
            json=payload,
            timeout=self.timeout
Confidence
80% 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
90% confidence
Finding
The skill exposes methods to collect sensitive device data such as contacts, photos, calendar events, notifications, location, and file contents, but the code provides no disclosure, scoping, or consent controls around those actions. In an agent skill, this makes passive overcollection or opportunistic exfiltration much more likely because the interface is simple and broad.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The external vision-model integration is not necessary for the core function of issuing Android control commands over HTTP and introduces an additional third-party exfiltration path. Because the feature processes highly sensitive on-screen content, the mismatch between stated purpose and actual behavior increases the chance of unsafe deployment and misuse.

External Transmission

Medium
Category
Data Exfiltration
Content
模型返回的分析结果
        """
        # 构建请求
        resp = requests.post(
            f"{api_base}/chat/completions",
            headers={
                "Authorization": f"Bearer {api_key}",
Confidence
96% confidence
Finding
This request sends screenshot data to a configurable external vision API endpoint together with an authorization token. Because the payload can contain sensitive screen and UI information and the destination is third-party/configurable, this is a concrete data-exfiltration path with substantial privacy and secrecy impact.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The document presents all operational guidance in Chinese and does not indicate that other languages are supported or that the user can opt into this locale. Under the policy rule for natural-language constraints, a skill that forces a specific language without user choice can be a locale-policy violation.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
This markdown file uses Chinese throughout, including the title and instructions, with no indication that the skill or reference is intended only for a Chinese-speaking audience. Under the language/locale policy rule, forcing a specific language without user opt-in or justification is a natural-language policy concern.

Static analysis

No suspicious patterns detected.