Back to skill

Security audit

Rdk X5 Media

Security checks for vulnerabilities and agentic risk

Overview

This media skill is mostly purpose-aligned, but it includes an unsafe RTSP credential example and VNC remote desktop enablement without enough security guidance.

Review before installing. Use this skill only on intended RDK X5 devices, avoid copying real camera credentials into command lines, prefer least-privileged camera accounts and protected credential handling, and only enable VNC on trusted networks with strong authentication and a clear plan to disable it when not needed.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:66
Finding
RTSP Credentials Exposed in Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 66–67 **Vulnerability Type**: Plaintext credential exposure through command-line arguments **Risk Level**: Medium ### Vulnerable Code ```bash ros2 launch hobot_rtsp_client hobot_rtsp_client.launch.py \ rtsp_url:="rtsp://admin:password@192.168.1.64:554/stream1" ``` ### Technical Analysis The RTSP example embeds a username and password directly in the URL passed as a command-line argument. Although the values appear to be illustrative, users may replace them with operational credentials while following the documentation. Credentials supplied this way can be exposed through: - Shell history files. - Process listings and `/proc` process metadata while the command is running. - ROS launch diagnostics or application logs. - Terminal recordings, screenshots, and copied troubleshooting output. - Scripts or deployment records created from the documented example. The URL uses the unencrypted `rtsp://` scheme. Unless the underlying media session is separately protected, credentials and video traffic may also be exposed to interception on an untrusted network. ### Attack Path 1. A user substitutes valid camera credentials into the documented RTSP URL. 2. The user executes the ROS 2 launch command. 3. The credentials are retained in shell history, exposed in process arguments, or recorded in logs and diagnostic output. 4. An attacker with access to the same host, its logs, terminal records, or relevant network traffic retrieves the credentials. 5. The attacker authenticates to the RTSP device using the disclosed account. 6. The attacker accesses camera streams or other device functions permitted by that account. ### Impact Assessment Successful exploitation can disclose the RTSP account credentials and permit unauthorized access within the privileges assigned to that account. Likely consequences include unauthorized viewing of camera streams, privacy loss, surveillance, and access to addit ...[truncated 479 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Do not place real credentials directly in command-line arguments or URLs. - Replace the example credentials with unmistakable placeholders and add an explicit warning not to enter production secrets directly on the command line. - Use a client-supported secure credential mechanism, such as an interactive password prompt, protected credential file, secret store, or environment/file-descriptor integration that does not expose the secret in process arguments. - Restrict any credential file to the service account that requires it, for example with owner-only permissions, and exclude it from version control and diagnostic bundles. - Configure ROS nodes and launch tooling to redact URLs containing user information before writing logs. - Disable or carefully manage shell history when sensitive commands cannot be avoided, while recognizing that this does not prevent exposure through process listings. - Prefer `rtsps://`, SRTP, a VPN, or another authenticated encrypted tunnel where supported. - Create a dedicated, least-privileged camera account for stream access rather than using an administrator account. - Rotate any credentials that may already have appeared in command histories, logs, screenshots, or shared troubleshooting records. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# 选择音频设备(PulseAudio 通道同步,v3.4.1+)
sudo srpi-config
# → Audio Options

# 查看设备
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# 选择音频设备(PulseAudio 通道同步,v3.4.1+)
sudo srpi-config
# → Audio Options

# 查看设备
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill manifest explicitly says it should not be used for running AI algorithms, but the RTSP section is labeled 'RTSP 拉流 + AI 推理' and directs users to launch a client and view inference-style results in a browser. This creates scope drift and may cause the agent to invoke a media skill for AI-related workflows outside its declared boundary, weakening tool selection and policy enforcement.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The RTSP example embeds a username and password directly in the connection URI without any warning about credential handling. Users may copy this pattern into shell history, logs, screenshots, or shared docs, leading to credential disclosure and reuse risks on cameras or related systems.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
### 8. VNC 远程桌面

```bash
sudo srpi-config
# → Interface Options → VNC → Enable
```
Confidence
81% confidence
Finding
Enabling a VNC server via an elevated configuration tool exposes a remote desktop service, potentially increasing the attack surface if authentication, network exposure, and encryption are not addressed. In a media skill, remote desktop setup is sensitive because it can grant broad interactive access to the device beyond media functions.

Context-Inappropriate Capability

Low
Confidence
72% confidence
Finding
The manifest enumerates audio handling, video codec use, RTSP streaming, display configuration, LCD adaptation, and VNC server setup, but does not mention running a WebSocket-based preview service. Exposing media through a separate WebSocket service is an additional serving capability that is not clearly declared in the skill's stated scope.

Static analysis

No suspicious patterns detected.