T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:21
- Finding
- Plaintext Access to Sensitive Camera and Device-Control APIs<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 21–54 **Vulnerability Type**: Sensitive surveillance and device-control endpoints accessed over plaintext HTTP without documented authentication or network-access restrictions **Risk Level**: Medium ### Vulnerable Code ```markdown Base URL: `http://<IP>:8080/` ### Visual Captures - **Standard Snapshot**: `/shot.jpg` (Fastest, current frame) - **Autofocus Snapshot**: `/photoaf.jpg` (Triggers autofocus before capture, highest quality) - **Video Recording**: - Start: `/startvideo?name=alert_123` - Stop: `/stopvideo` - List recordings: `/list_videos` (returns JSON/HTML) - Download: `/v/<filename>.mp4` ### Camera Control & Settings - **Focus Distance**: `/settings/focus_distance?set=<0.0-10.0>` (0.0 is often Infinity) - **Torch (Flash)**: `/enabletorch` | `/disabletorch` - **Focus Mode**: `/settings/focusmode?set=<on|off|macro|infinity|fixed>` - **Scene Mode**: `/settings/scenemode?set=<auto|night|action|party...>` - **White Balance**: `/settings/whitebalance?set=<auto|daylight|cloudy...>` ### Device Telemetry - **Sensors Data**: `/sensors.json` (Battery, light level, proximity, accelerometer) - **System Status**: `/status.json` (Camera state, recording status, uptime) ### Audio - **Audio Feed**: `/audio.wav` or `/audio.opus` (Live audio stream) ### Integration Examples (curl) ```bash # Get battery level via jq curl -s http://<IP>:8080/sensors.json | jq '.battery_level[0][1][0]' # Toggle flash remotely curl http://<IP>:8080/enabletorch ``` ``` ### Technical Analysis The Skill instructs users to access sensitive IP Webcam interfaces through unencrypted HTTP. The supplied `curl` examples do not use credentials, authentication headers, certificate validation, an encrypted tunnel, or any other access-control mechanism. These interfaces provide access to live images, live audio, stored recordings, sensor telemetry, video-recording controls, the torch, and camera settings. Plaintext ...[truncated 2247 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Enable IP Webcam authentication and require a unique, high-entropy password before allowing any client access. 2. Do not expose port 8080 directly to the public Internet or configure unauthenticated router port forwarding. 3. Restrict inbound access using host firewall rules, router ACLs, or a dedicated VLAN that permits only the OpenClaw host to contact the camera. 4. Protect traffic with an authenticated encrypted tunnel, such as WireGuard, or an HTTPS reverse proxy with valid certificate verification and access control. 5. Where supported, bind the camera service only to a trusted network interface rather than all available interfaces. 6. Update examples to use a protected URL and secure credential handling. Credentials should be read from a permission-restricted secret store or environment variable and must not be embedded in the Skill, committed to source control, or exposed in shell history. 7. Add explicit setup validation that rejects publicly routable camera addresses and warns when authentication or transport encryption is unavailable. 8. Limit access to audio, stored recordings, sensor telemetry, and state-changing endpoints unless each capability is required. 9. Document recording retention, AI-upload destinations, user consent, and deletion controls for alert-triggered frames. ]]>
