T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:33- Finding
Profiler Is Instructed to Run with Unnecessary Administrative Privileges
- Content
View full analysis
/scripts/gateway-profile.ps1", elevated=true) **Linux:** exec(command="bash /scripts/gateway-profile.sh", elevated=true) ``` ### Technical Analysis The documented invocation directs the agent to execute the profiler with `elevated=true` on both Windows and Linux. The reviewed Linux implementation only reads OpenClaw logs, stops and starts the Gateway, creates a temporary file, and writes reports. No reviewed operation establishes a legitimate need for administrator or root privileges. This violates the principle of least privilege. It also magnifies the consequences of any future script vulnerability, package modification, path substitution, or unauthorized change to the skill directory. On Windows, the command additionally disables PowerShell execution-policy enforcement for the referenced script. The advertised PowerShell script was not present in the audited project, so its behavior could not be verified. Instructing an agent to run an absent and unaudited script with elevation further increases the risk associated with a substituted file. ### Attack Path 1. An attacker obtains the ability to modify the skill script, replace the skill directory, or cause the `` placeholder to resolve to an attacker-controlled location. 2. The user requests Gateway restart profiling. 3. Following `SKILL.md`, the agent launches the referenced script with `elevated=true`. 4. The attacker-controlled script executes with root privileges on Linux or administrator privileges on Windows. 5. The script can then modify protected files, access data belonging to other users, alter system configuration, or install persistent components. The modification or path-control prerequisite is required; the reviewed Linux sc ...[truncated 586 chars]- Remediation
View remediation
