T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/endo/endo-check.sh:13- Finding
Direct Access to Agent Memory and Cross-Skill State
- Content
View full analysis
/dev/null) [ -z "$count" ] && count=0 echo $count else echo 0 fi } # 获取对话轮数 get_turn_count() { local memory_file="/root/.openclaw/workspace/memory/$(date +%Y-%m-%d).md" if [ -f "$memory_file" ]; then grep -c "^## " "$memory_file" 2>/dev/null || echo 0 else echo 0 fi } ``` ### Technical Analysis The script directly opens the Agent's daily persistent memory file and another Skill's task-state file. Although the current implementation only calculates file-size, heading-count, and active-task metrics, it crosses component boundaries instead of using a dedicated, least-privilege telemetry interface. The hard-coded `/root/.openclaw/workspace` paths also assume execution in a privileged account's workspace. If the Skill is invoked with access to that workspace, it can inspect metadata derived from persistent Agent activity and from another Skill's state. The current code does not transmit the underlying contents and does not provide a direct mechanism for obtaining additional operating-system privileges. ### Attack Path 1. The Skill is invoked in an environment where it can read `/root/.openclaw/workspace`. 2. `get_token_usage` opens the current da ...[truncated 1234 chars]- Remediation
View remediation
