Back to skill

Security audit

Android Remote Browser Debug

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Android browser debugging guide, but it gives broad access to sensitive live browser state and JavaScript execution without enough consent, privacy, or containment guidance.

Install only if you intend to debug your own or authorized Android browser sessions. Treat console logs, DOM dumps, network data, screenshots, and evaluated JavaScript as sensitive; avoid running state-changing JavaScript unless explicitly requested, store temporary outputs in a private per-run directory, and review cleanup commands before running them.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:175
Finding

Predictable Temporary Files Enable Symlink-Based File Overwrite and Data Exposure

Content
View full analysis
/tmp/phone_out.txt 2>&1 cat /tmp/phone_out.txt ``` ```bash node tmp_phone_debug.js 1>/tmp/dbg.txt 2>/tmp/dbg_err.txt; echo "---stdout---"; cat /tmp/dbg.txt; echo "---stderr---"; cat /tmp/dbg_err.txt ``` ### Technical Analysis The instructions use fixed, predictable filenames in the shared `/tmp` directory. Both shell redirection and Node.js `writeFileSync()` normally follow symbolic links. A local attacker who can write to `/tmp` may therefore create one of these paths as a symbolic link before the instructions are run. When the invoking user subsequently writes debugging output or a screenshot, the operation can overwrite the symlink target with that user's permissions. The fixed filenames also create confidentiality risks: screenshots, console output, page data, URLs, error messages, or evaluated JavaScript results may remain accessible after debugging. Permissions for newly created shell output files depend on the user's `umask`, while a pre-existing file retains its existing ownership and permission characteristics. The behavior is not required for Android remote debugging. Secure, per-run temporary storage would provide the same functionality with less risk. ### Attack Path 1. An attacker with local access monitors or anticipates use of the documented debugging procedure. 2. The attacker creates a predictable path as a symbolic link, for example: ```bash ln -s /path/writable/by/victim /tmp/phone_out.txt ``` 3. The victim runs the documented command. 4. Shell redirection or `writeFileSync()` follows the symbolic link. 5. The target is truncated or overwritten using the victim's file ...[truncated 1024 chars]
Remediation
View remediation
"$debug_dir/output.txt" 2>"$debug_dir/error.txt" cat -- "$debug_dir/output.txt" cat -- "$debug_dir/error.txt" ``` Pass the generated directory to Node.js rather than hardcoding `/tmp/phone_screenshot.png`. For files that must not already exist, open them with exclusive creation semantics, such as the Node.js `wx` flag: ```javascript const fs = require('fs'); const path = require('path'); const outputPath = path.join(process.env.DEBUG_DIR, 'phone_screenshot.png'); fs.writeFileSync(outputPath, buf, { flag: 'wx', mode: 0o600 }); ``` Additional hardening measures: - Do not run these debugging commands as root or another privileged account. - Avoid retaining browser data longer than necessary. - Validate that the temporary directory is owned by the current user. - Avoid following attacker-controlled symbolic links. - Document cleanup behavior and securely remove all generated artifacts after use. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:253
Finding

Overbroad Wildcard Cleanup Can Delete Unrelated JavaScript Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

bash
# 列出可调试的页面
curl -s http://localhost:9222/json/list | python3 -m json.tool

# 查看浏览器版本信息
curl -s http://localhost:9222/json/version | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

bash
# 列出可调试的页面
curl -s http://localhost:9222/json/list | python3 -m json.tool

# 查看浏览器版本信息
curl -s http://localhost:9222/json/version | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

curl -s http://localhost:9222/json/list | python3 -m json.tool

查看浏览器版本信息

curl -s http://localhost:9222/json/version | python3 -m json.tool

text

## 调试操作

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description advertises capabilities to inspect console logs, network requests, DOM snapshots, and screenshots from a mobile browser but does not warn that these actions may expose credentials, personal data, tokens, or private browsing content. In this context, the omission is security-relevant because the skill directly facilitates access to sensitive data from a physically connected device.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger text is broad enough to activate on general 'phone debugging' or 'mobile console' requests without clearly requiring explicit user intent to inspect a connected Android device. Because this skill enables deep inspection of browser state, network traffic, DOM content, screenshots, and JavaScript execution on a mobile device, overbroad activation raises the chance of unintended privacy-sensitive use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill includes a ready-made Runtime.evaluate template for arbitrary JavaScript execution against the connected mobile page without warning about side effects. Executing JS in a live authenticated session can alter page state, submit forms, exfiltrate accessible page data, or interfere with the user's account/session, making this more dangerous than passive inspection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire skill description and operating instructions are presented only in Chinese, with no indication that the skill is region-specific or that users may choose another language. This creates a locale policy concern because it imposes a language constraint without opt-in or justification.

Content

No source excerpt is available for this finding.