T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/restore-claude-telegram.sh:7- Finding
Persistent Remote AI Agent Runs with Permission Controls Disabled
- Content
View full analysis
0 )); then log "claude recovered (was at attempt $fail_count)" fi fail_count=0 else fail_count=$((fail_count + 1)) if (( fail_count > MAX_FAILURES )); then log "COOLDOWN: $MAX_FAILURES consecutive failures, sleeping 1 hour before retry" log "Manual restart: tmux new-session -d -s $SESSION -c $WORKDIR && tmux send-keys -t $SESSION '$CLAUDE_CMD' Enter" sleep 3600 fail_count=0 log "cooldown over, resuming monitor" continue fi start_claude continue fi sleep "$CHECK_INTERVAL" done ``` The documented LaunchAgent wrapper uses: ```xml RunAtLoad KeepAlive ``` ### Technical Analysis The wrapper launches Claude with both `--dangerously-skip-permissions` and `--permission-mode bypassPermissions`. These options explicitly remove interactive authorization barriers that would otherwise constrain filesystem access and command execution. The same command enables a Telegram channel, creating a remote input path into the agent. The wrapper continuously monitors the process and restarts it after termination, while the prescribed LaunchAgent configuration starts the wrapper at login and relaunches it if the wrapper exits. Service persistence is the declared purpose of the Skill, and a user-level LaunchAgent is relevant to that pur ...[truncated 1704 chars]- Remediation
View remediation
