T09 · Insecure Skill Coding Practices
- Location
SKILL.md:27- Finding
PowerShell Execution Policy Is Systematically Bypassed
- Content
View full analysis
.ps1" -Action [params] ``` The error-handling guidance also explicitly recommends the bypass: ```markdown | `Script execution policy` | PowerShell execution restricted | Use `-ExecutionPolicy Bypass` flag | ``` The same flag is included throughout the documented invocation examples. ### Technical Analysis `-ExecutionPolicy Bypass` disables PowerShell execution-policy enforcement for the launched process. Consequently, the documented execution method does not apply policy warnings or signature requirements that might otherwise prevent an unauthorized, unsigned, or modified script from running. This does not independently grant elevated privileges or let an unprivileged attacker overwrite protected files. Exploitation requires an attacker, compromised process, or supply-chain actor to alter the Skill scripts or influence the referenced script location. Once that precondition exists, the bypass removes an execution-control layer that could otherwise detect or block the modified script. The concern is amplified because the Skill exposes sensitive desktop capabilities, including process termination, application launch, keyboard and mouse injection, screenshots, and clipboard access. ### Attack Path 1. An attacker or compromised process obtains write access to the Skill directory or replaces one of the referenced PowerShell scripts during installation or update. 2. The Agent follows the documented command and invokes the script with `-ExecutionPolicy Bypass`. 3. PowerShell runs the altered or unsigned script without applying the host's normal execution-policy restrictions. 4. The substituted script executes with the privileges of th ...[truncated 697 chars]- Remediation
View remediation
