T03 · Remote Payload Retrieval and Execution
Error
- Location
- README.md:15
- Finding
- Unpinned Remote Repository Content Executed with PowerShell Policy Bypass<![CDATA[ ## Vulnerability Details **File Location**: `README.md:15-26`; `SKILL.md:16-18` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code From `README.md:15-26`: ```markdown ## Installation Clone this repo and place it inside your OpenClaw workspace `skills/` folder. ```powershell git clone https://github.com/alesys/openclaw-skill-audio-mastering-cli.git ``` ## Usage (examples) Audio to WAV + MP3: ```powershell powershell -ExecutionPolicy Bypass -File ".\scripts\master_media.ps1" -InputFile ".\water.wav" -MakeMp3 ``` ``` From `SKILL.md:16-18`: ```markdown ## Flujo 1. Verifica que existe el archivo de entrada. 2. Ejecuta: `powershell -ExecutionPolicy Bypass -File "{baseDir}/scripts/master_media.ps1" -InputFile "<ruta-archivo>" -MakeMp3` ``` ### Technical Analysis The installation instructions clone a mutable Git repository without pinning a reviewed commit, signed tag, release artifact, or cryptographic checksum. The usage instructions then execute `scripts/master_media.ps1` using PowerShell's `-ExecutionPolicy Bypass` option. The referenced script is absent from the audited artifact, which contains only `README.md` and `SKILL.md`. Its actual behavior—including command construction, filesystem access, network operations, FFmpeg invocation, and input validation—therefore cannot be verified. The effective executable payload is determined by the remote repository contents retrieved at installation time and may differ from the content that was originally reviewed. `-ExecutionPolicy Bypass` does not itself elevate operating-system privileges. However, it suppresses PowerShell execution-policy restrictions for that process, reducing a defense-in-depth barrier that might otherwise prevent or warn about script execution. This behavior best matches **T03: Remote Payload Retrieval and Execution**, because externally hosted, mutable content is retrieved and subsequently executed. ### Attack Path 1. A ...[truncated 1543 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include `scripts/master_media.ps1` in the distributed and reviewed skill artifact so its behavior can be audited together with the documentation. 2. Pin installation instructions to an immutable, reviewed Git commit rather than cloning the mutable default branch: ```powershell git clone https://github.com/alesys/openclaw-skill-audio-mastering-cli.git Set-Location audio-mastering-cli git checkout --detach <reviewed-full-commit-hash> ``` 3. Prefer signed release artifacts and verify both the publisher signature and a documented SHA-256 checksum before execution. 4. Remove `-ExecutionPolicy Bypass` unless it is strictly necessary. If it is unavoidable, document the reason and constrain its use to the reviewed script and process. 5. Sign the PowerShell script and use an execution policy that validates trusted publisher signatures where supported. 6. Review the script for command injection, unsafe path handling, unintended network access, insecure temporary files, destructive output behavior, and improper quoting before distribution. 7. Execute media processing with least privilege, without administrator rights, and within a restricted working directory or sandbox where practical. 8. Add automated integrity checks that fail closed when the script hash or checked-out commit differs from the reviewed version. ]]>
