T09 · Insecure Skill Coding Practices
- Location
scripts/assisted-session.sh:440- Finding
Unauthenticated noVNC service exposes full browser control on all network interfaces
- Content
View full analysis
Vulnerability Details
File Location:
scripts/assisted-session.sh:440-448,scripts/assisted-session.sh:498-528, andscripts/open-protected-page.sh:350-365
Vulnerability Type: Unauthenticated remote browser access over plaintext transport
Risk Level: CriticalVulnerable Code
bash if ! pid_running "$(read_pid x11vnc)"; then start_process x11vnc "$LOG_DIR/x11vnc.log" \ env DISPLAY="$display" \ x11vnc -display "$display" -forever -shared -rfbport "$VNC_PORT" -localhost -nopw fi if ! pid_running "$(read_pid websockify)"; then start_process websockify "$LOG_DIR/websockify.log" \ websockify --web="$novnc_root" "0.0.0.0:$NOVNC_PORT" "localhost:$VNC_PORT" fiThe main wrapper automatically invokes this assisted-access path:
bash if printf '%s' "$CHALLENGE_JSON" | grep -q '"hasChallenge": *true'; then assisted_helper start --url "$INITIAL_URL" --origin "$ORIGIN" --session-key "$SESSION_KEY" >/dev/null ASSISTED_STATUS="$(assisted_helper status --url "$INITIAL_URL" --origin "$ORIGIN" --session-key "$SESSION_KEY")" emit_result "needs-user" "open-novnc" "$TARGET_ID" "" "$ASSISTED_STATUS" "challenge" "$CDP_PORT" exit 0 fi if printf '%s' "$LOGIN_JSON" | grep -q '"hasLoginWall": *true'; then assisted_helper start --url "$INITIAL_URL" --origin "$ORIGIN" --session-key "$SESSION_KEY" >/dev/null ASSISTED_STATUS="$(assisted_helper status --url "$INITIAL_URL" --origin "$ORIGIN" --session-key "$SESSION_KEY")" emit_result "needs-user" "open-novnc" "$TARGET_ID" "" "$ASSISTED_STATUS" "login-wall" "$CDP_PORT" exit 0 fiTechnical Analysis
x11vncis started with-nopw, explicitly disabling VNC authentication. Although the VNC listener itself is restricted to loopback by-localhost,websockifyforwards it through a listener bound to0.0.0.0, making the unauthenticated session reachable through every host network interface.The service pr ...[truncated 2384 chars]
- Remediation
View remediation
Remediation Suggestions
-
Bind websockify to loopback by default:
bash websockify --web="$novnc_root" "127.0.0.1:$NOVNC_PORT" "127.0.0.1:$VNC_PORT" -
Require users to access the service through an authenticated SSH tunnel unless LAN publication is explicitly requested.
-
Remove
-nopw. Use a strong, randomly generated, short-lived VNC credential or an authenticated reverse proxy. -
If direct network exposure is required, use TLS, a one-time access token, firewall allowlisting, and explicit user confirmation before binding a public interface.
-
Automatically stop
websockifyandx11vncimmediately after successful capture, cancellation, or timeout. -
Add a short maximum assisted-session lifetime and ensure cleanup occurs through signal traps and failure paths.
-
Do not return a LAN URL unless secure LAN publication was explicitly enabled.
-
Add tests asserting that the default listener is
127.0.0.1, authentication is enabled, and capture terminates the overlay.
-
