windows-ui-inject
Fail
Audited by Gen Agent Trust Hub on Oct 11, 2026
Risk Level: HIGHCOMMAND_EXECUTIONDYNAMIC_EXECUTIONPERSISTENCECREDENTIALS_UNSAFEINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses PowerShell to execute commands that interact directly with the Windows UI subsystem. It specifically automates the
mstsc.exe(Remote Desktop) client and seeds credentials using thecmdkeyutility. - Evidence:
scripts/Invoke-MstscConnect.ps1callscmdkey /generic:"TERMSRV/$HostAddress" /user:$User /pass:$Passwordand usesmouse_eventfor UI interaction. - [DYNAMIC_EXECUTION]: The PowerShell script dynamically compiles C# source code at runtime to access low-level Windows APIs (P/Invoke) for mouse and keyboard control.
- Evidence:
scripts/Invoke-MstscConnect.ps1usesAdd-Type -TypeDefinition $codewhere$codecontains C# code foruser32.dllimports likeSetCursorPos,mouse_event, andGetWindowRect. - [PERSISTENCE]: The skill utilizes the Windows Credential Manager to store RDP credentials persistently on the host system.
- Evidence: The command
cmdkey /generic:"TERMSRV/$HostAddress" /user:$User /pass:$Passwordinscripts/Invoke-MstscConnect.ps1saves the provided password in the system's persistent credential store. - [CREDENTIALS_UNSAFE]: The automation script accepts a plaintext password as a command-line parameter, which may be exposed in process logs or history.
- Evidence:
param([Parameter(Mandatory = $true)][string]$Password)inscripts/Invoke-MstscConnect.ps1. - [INDIRECT_PROMPT_INJECTION]: The skill relies on screenshots to identify UI targets, creating a surface for indirect prompt injection if the agent views malicious content (e.g., in a browser or remote session) that imitates system UI elements.
- Ingestion points: Screenshots of the Windows desktop, browser windows, and RDP sessions (
SKILL.md). - Boundary markers: None identified; the agent is instructed to re-measure and act based on the screenshot content.
- Capability inventory: UI injection (mouse/keyboard) via
user32.dll, credential storage viacmdkey, process management (Stop-Process,Start-Process), and file system writes (Set-Content). - Sanitization: No sanitization or validation of the visual elements in the screenshots is described.
Recommendations
- AI detected serious security threats
Audit Metadata