T09 · Insecure Skill Coding Practices
- Location
capture.py:125- Finding
Unauthenticated Network Exposure of Camera Images and the Shared Temporary Directory
- Content
View full analysis
/dev/null 2>&1; then cd /tmp && python3 -m http.server 8765 & sleep 1 fi echo "HTTP 服务器已启动: http://192.168.3.210:8765" ``` ### Technical Analysis The Python standard-library HTTP server binds to all available network interfaces by default when no `--bind` argument is supplied. The code changes its working directory to `/tmp` before launching the server, making the entire shared temporary directory the HTTP document root. The server provides no authentication, authorization, transport encryption, randomized access token, or client-address restriction. Python's default HTTP handler also generates directory listings where no index file exists. Consequently, a client capable of reaching TCP port 8765 can enumerate and download readable files from `/tmp`, including the generated `/tmp/cam_capture.png`. The exposure is broader than the Skill's documented requirement to serve one camera image. `/tmp` is a shared location that can contain temporary information created by unrelated applications and users. The HTTP server remains available after capture because the process handle is not retained and the server is not terminated after the image is retrieved. ### Attack Path 1. A user invokes the camera-capture Skill. 2. The Skill captures the Photo Booth window and wr ...[truncated 1341 chars]- Remediation
View remediation
