Back to skill

Security audit

ClawMobile - Android Automation Toolkit

Security checks for vulnerabilities and agentic risk

Overview

This Android automation skill is not clearly malicious, but it needs review because its device-control API uses weak public defaults and broad network exposure.

Review before installing. Only use this on Android devices and apps you control, replace the default token, avoid exposing port 8765 beyond localhost or an encrypted tunnel, do not use plaintext HTTP for remote access, and be cautious with recording because screenshots and UI trees may capture sensitive data.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (6)

T09 · Insecure Skill Coding Practices

Error
Location
skill/api_server.py:374
Finding

Predictable Hardcoded Token Protects the Device-Control API

Content
View full analysis
Dict[str, str]: return { "Content-Type": "application/json", "Authorization": f"Bearer {self.token}" } ``` The shipped configuration combines that credential with an all-interface bind: ```yaml server: host: "0.0.0.0" port: 8765 workers: 4 debug: false auth: token_env: "CLAWMOBILE_API_TOKEN" default_token: "clawmobile-secret-token-change-in-production" token_header: "Authorization" token_prefix: "Bearer" ``` ### Technical Analysis The generated AutoX.js server authenticates requests using a static bearer token embedded in the public source. The Python client and default configuration repeat the same value, so it cannot be treated as a secret. The generated server calls `server.listen(8765)` without restricting the listening address, while the configuration explicitly specifies `0.0.0.0`. Consequently, the device-control API may be reachable from other systems on the same network. Anyone who can read the repository or guess the documented placeholder can authenticate. This exceeds least privilege because a ...[truncated 1040 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skill/client.py:178
Finding

Attacker-Controlled Task ID Enables Path Traversal and Arbitrary JSON-File Writes

Content
View full analysis
str: """ Write task to file system Args: task: Task definition Returns: Task file path """ import os import uuid # Ensure directories exist os.makedirs(self.tasks_dir, exist_ok=True) # Generate task ID if not provided if "id" not in task: task["id"] = f"task_{uuid.uuid4().hex[:6]}" # Write task file task_file = f"{self.tasks_dir}/{task['id']}.json" with open(task_file, 'w') as f: json.dump(task, f, indent=2) return task_file ``` ### Technical Analysis When a task already contains an `id`, the value is concatenated directly into a filesystem path. There is no validation against path separators, `..` components, absolute paths, or symbolic-link redirection. Although the implementation appends `.json`, traversal sequences can escape `self.tasks_dir` and overwrite another JSON file writable by the process. The existing `validate_task_id()` function in `skill/models.py` is not called by this method. ### Attack Path 1. An attacker or untrusted workflow supplies a task object with a crafted ID, such as `../../target`. 2. The task is passed to `WorkspaceFileManager.write_task()` directly or through `execute_workflow()`. 3. The method constructs a path equivalent to: `/sdcard/autox-workspace/ClawMobile/tasks/../../target.json`. 4. The operating system resolves the traversal outside the intended task directory. 5. `open(..., 'w')` creates or truncates the resolved JSON file. 6. The attacker-controlled task object is serialized into that file. ### Impact Assessment The attacker can create or overwrite `.json` files at locations writable by the running user or Android storage context. This can corrupt configuration, replace wor ...[truncated 196 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
skill/api_server.py:274
Finding

Membership Activation Accepts Fabricated Redeem Codes

Content
View full analysis
Dict[str, Any]: """ Activate membership using redeem code POST /api/v1/membership/redeem """ if not code or not user_id: return { "success": False, "error": "INVALID_CODE", "message": "兑换码格式无效" } # Validate code format if not MembershipAPI._validate_code_format(code): return { "success": False, "error": "INVALID_CODE", "message": "兑换码格式无效" } # Parse tier from code parts = code.split('-') tier_str = parts[0].lower() tier = tier_str if tier_str in ["vip", "svip"] else "vip" return { "success": True, "message": "兑换成功!", "tier": tier, "duration_days": 30, "expires_at": "2026-04-30T15:00:00Z" } @staticmethod def _validate_code_format(code: str) -> bool: """Validate redeem code format""" import re pattern = r'^(VIP|SVIP)-\d{4}-[A-Z0-9]{8}$' return bool(re.match(pattern, code)) ``` ### Technical Analysis Redeem-code validation only checks whether the user-controlled string matches a regular expression. It does not establish that the code was issued by a trusted authority. There is no cryptographic signature, authoritative issuance record, secret checksum, expiration validation, revocation check, user binding, or one-time-use enforcement. The requested tier is taken directly from the attacker-controlled prefix. The separate membership model similarly derives VIP or SVIP privileges from that prefix. A regular expression can validate syntax but cannot authenticate entitlement. ### Attack Path 1. An att ...[truncated 919 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skill/client.py:40
Finding

Bearer Credentials and Automation Tasks Are Transmitted over Plaintext HTTP

Content
View full analysis
Dict[str, str]: """Get request headers with authentication""" return { "Content-Type": "application/json", "Authorization": f"Bearer {self.token}" } def execute_task(self, task: Dict[str, Any]) -> TaskResult: try: response = requests.post( f"{self.base_url}/execute", json=task, headers=self._get_headers(), timeout=self.timeout ) ``` The default configuration also uses HTTP: ```yaml api: base_url: "http://localhost:8765" timeout: 30000 ``` ### Technical Analysis The client constructs its base URL with the `http://` scheme regardless of whether the target host is local or remote. It then transmits the reusable bearer token and complete task body over that connection. Plaintext HTTP provides no transport confidentiality, server authentication, or integrity protection. This is particularly unsafe because the project advertises both local and remote connection modes. Loopback HTTP has a narrower exposure, but a non-loopback remote host permits network observers to capture and alter traffic. ### Attack Path 1. A user configures the client to connect to a remote AutoX.js host. 2. The client sends a request using plaintext HTTP. 3. An attacker positioned on the same wireless network, gateway, proxy, or routing path observes the request. 4. The attacker recovers the `Authorization` bearer token and task content. 5. The attacker replays the token d ...[truncated 392 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/setup.sh:78
Finding

Setup Installs Unpinned Runtime and Development Dependencies into the Active Environment

Content
View full analysis
=2.31.0 # YAML Configuration PyYAML>=6.0 # Optional: Testing dependencies pytest>=7.0.0 pytest-cov>=4.0.0 # Optional: Code quality flake8>=6.0.0 black>=23.0.0 # Optional: Type checking mypy>=1.0.0 ``` ### Technical Analysis The setup script invokes `pip3` directly against the active Python environment. The requirements use lower bounds instead of exact reviewed versions and do not provide hashes. Consequently, installation results can change over time and may include newly released or compromised packages and transitive dependencies. The script also installs testing, formatting, linting, and type-checking packages that are not necessary for the declared runtime behavior. This unnecessarily expands the supply-chain attack surface and exceeds minimum dependency requirements. ### Attack Path 1. A dependency or one of its transitive dependencies publishes a compromised future release that still satisfies the `>=` constraint. 2. A user runs `scripts/setup.sh`. 3. `pip3` resolves the newest satisfying package versions. 4. Package installation executes build or installation logic with the invoking user's privileges. 5. Malicious dependency ...[truncated 402 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:305
Finding

Manual Archive Installation Does Not Verify Artifact Integrity

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (53)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · CHANGELOG.md (reported line 64)May include surrounding context.

md
- ✅ `GET /workflows/{id}` - Get workflow details
- ✅ `POST /workflows` - Create workflow
- ✅ `PUT /workflows/{id}` - Update workflow
- ✅ `DELETE /workflows/{id}` - Delete workflow
- ✅ `POST /recording/start` - Start recording
- ✅ `POST /recording/pause` - Pause recording
- ✅ `POST /recording/resume` - Resume recording

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description presents a full-featured Android automation/RPA toolkit. However, the provided code chunk does not implement or expose those runtime automation capabilities; it is a development/test script for validating that such components may exist elsewhere. Its actual purpose is QA/integration verification of Python modules, config files, metadata files, and some membership/model logic. While some tested components align with the declared product domain (client, API server, models, membership), the code itself materially differs in primary purpose and capabilities from the declared description, so this chunk should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents the skill as a full-featured Android automation and RPA toolkit. However, the supplied code chunk is only a validation utility for the skill's filesystem layout and runtime environment. It checks for files, directories, Python dependencies, ADB presence, environment variables, and API reachability. While ADB and API checks are tangentially related to the stated ecosystem, the primary behavior here is installation/readiness validation, not mobile automation, recording, workflow execution, or AI-assisted control. This is a material description-to-behavior mismatch for the provided code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

There is a substantial description-to-behavior mismatch. The declared purpose presents a comprehensive Android automation platform with recording, AI intervention, workflow management, membership system, and AutoX.js integration. The supplied code chunk is much narrower: it defines API endpoint routing, in-memory server state, simple task validation, mock step execution, and membership-related stubs. Several advertised features are absent or explicitly disabled in returned status (recording=false, ai_intervention=false, ocr=false). The code does relate to the declared domain via HTTP API communication, task execution concepts, and membership endpoints, but it does not substantiate the broad 'complete toolkit' claims. Therefore the description materially overstates the implemented capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The declared description presents a broad, full-featured Android automation platform with workflow management, recording, AI-assisted intervention, membership features, and HTTP API communication. The supplied code chunk, however, only provides an executor wrapper for basic automation actions (click/input/swipe), task submission via workspace files, status checks, task stopping, and idle waiting. While this behavior is consistent with part of an automation/RPA tool, it does not substantiate the much broader declared functionality. Therefore the description does not accurately represent what this specific code chunk actually does.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Documenting a destructive DELETE workflow endpoint without emphasizing authorization, confirmation, and scope restrictions can enable misuse or accidental deletion if implemented insecurely. In an automation platform, deleting workflows may disrupt business processes or remove operational artifacts relied on for unattended tasks.

Content

Scanner excerpt · SKILL.md (reported line 160)May include surrounding context.

md
- `GET /workflows/{id}` - 获取工作流详情
- `POST /workflows` - 创建工作流
- `PUT /workflows/{id}` - 更新工作流
- `DELETE /workflows/{id}` - 删除工作流
- `POST /api/v1/workflows/{id}/validate` - 验证工作流

### 2. 录制功能 ⏺️

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · SKILL.md (reported line 402)May include surrounding context.

ion: 3600 capture_screenshots: true capture_ui_tree: true

日志配置

logging: level: "INFO" file: "clawmobile.log" max_size: "10MB" backup_count: 5 EOF

text

**方法 B:使用环境变量**

```bash
# 设置环境变量
export CLAWMOBILE_API_URL="http://localhost:8765"
export CLAWMOBILE_API_TOKEN="your-autox-token-here"
export CLAWMOBILE_TIMEOUT="30000"

# 或添加到 ~/.bashrc
echo 'export CLAWMOBILE_API_URL="http://localhost:8765"' >> ~/.bashrc
echo 'export CLAWMOBILE_API_TOKEN="your-autox-token-here"' >> ~/.bashrc
source ~/.bashrc

4. 验证连接

bash
# 测试基本连接
curl http://localhost:8765/api/v1/health

# 预期响应:
# {"success": true, "health": {"status": "healthy", ...}}

# 使用 Python 客户端测试
python3 -c "
from skill.client import ClawMobileClient
client = ClawMobileClient()
health = client.get_health()
print(f'Health: {health}')
"

基本用法

使用 Python 客户端

python
from skill.client import ClawM

Instruction Override

High
Category
Prompt Injection
Confidence
70% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · config/schema.json (reported line 55)May include surrounding context.

json
},
        "debug": {
          "type": "boolean",
          "description": "Enable debug mode"
        }
      },
      "required": ["host", "port"]

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 113)May include surrounding context.

sh
setup_env() {
    print_info "Setting up environment variables..."

    ENV_FILE="$SKILL_ROOT/.env"

    if [ -f "$ENV_FILE" ]; then
        print_info ".env file already exists"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 197)May include surrounding context.

sh
setup_env() {
    print_info "Setting up environment variables..."

    ENV_FILE="$SKILL_ROOT/.env"

    if [ -f "$ENV_FILE" ]; then
        print_info ".env file already exists"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 116)May include surrounding context.

sh
ENV_FILE="$SKILL_ROOT/.env"

    if [ -f "$ENV_FILE" ]; then
        print_info ".env file already exists"
        read -p "Update .env file? (y/n) " -n 1 -r
        echo
        if [[ ! $REPLY =~ ^[Yy]$ ]]; then

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 117)May include surrounding context.

sh
ENV_FILE="$SKILL_ROOT/.env"

    if [ -f "$ENV_FILE" ]; then
        print_info ".env file already exists"
        read -p "Update .env file? (y/n) " -n 1 -r
        echo
        if [[ ! $REPLY =~ ^[Yy]$ ]]; then

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 137)May include surrounding context.

sh
ENV_FILE="$SKILL_ROOT/.env"

    if [ -f "$ENV_FILE" ]; then
        print_info ".env file already exists"
        read -p "Update .env file? (y/n) " -n 1 -r
        echo
        if [[ ! $REPLY =~ ^[Yy]$ ]]; then

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 138)May include surrounding context.

sh
ENV_FILE="$SKILL_ROOT/.env"

    if [ -f "$ENV_FILE" ]; then
        print_info ".env file already exists"
        read -p "Update .env file? (y/n) " -n 1 -r
        echo
        if [[ ! $REPLY =~ ^[Yy]$ ]]; then

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup.sh (reported line 196)May include surrounding context.

sh
ENV_FILE="$SKILL_ROOT/.env"

    if [ -f "$ENV_FILE" ]; then
        print_info ".env file already exists"
        read -p "Update .env file? (y/n) " -n 1 -r
        echo
        if [[ ! $REPLY =~ ^[Yy]$ ]]; then

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · skill/api_server.py (reported line 507)May include surrounding context.

python
}
    }

    // Reset state
    server_state.running = false;
    server_state.current_task = null;

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The changelog states support for local and remote connection management, and elsewhere documents execution and workflow CRUD endpoints, but provides no caution that these capabilities can trigger actions on connected devices or systems. For markdown files, omission of warnings about behaviors affecting user data or system integrity is in scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file advertises UI operation recording, screenshot capture, and UI tree capture, which can collect sensitive on-screen or application data. The description does not include any warning or disclosure about privacy impact, user consent, or handling of captured data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises full Android device control, workflow execution, and operation recording, but it does not clearly warn users about the privacy, consent, and system-impact risks of automating and recording interactions on real devices. In a toolkit designed for unattended automation and HTTP-controlled device actions, omission of these warnings can lead to unsafe deployment, misuse against sensitive apps or data, and accidental overreach by operators.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 124)May include surrounding context.

健康检查

bash
curl http://localhost:8765/api/v1/health

列出工作流

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The documented workflow deletion and automated execution features can modify app state, send inputs, delete configurations, or trigger actions on user devices, yet the description omits cautionary language. In an automation skill, users need explicit notice that actions may be destructive or irreversible, especially when workflows run unattended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill promotes recording screenshots, UI trees, and on-device interactions without clearly warning that these captures may contain passwords, messages, personal data, or business secrets. In an Android automation context, silent capture is more dangerous because mobile screens commonly expose highly sensitive content and users may not realize recordings persist or are transmitted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill describes HTTP API usage with bearer tokens and automation payloads but does not warn that using plain HTTP can expose tokens and task data to interception on shared or remote networks. Because this skill controls Android automation and may carry screenshots, workflow parameters, or membership data, network exposure raises confidentiality and integrity risks.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 283)May include surrounding context.

md
clawhub install clawmobile

# 验证安装
ls -la ~/.openclaw/skills/clawmobile/SKILL.md

# 刷新 OpenClaw
openclaw gateway restart