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 the cmdkey utility.
  • Evidence: scripts/Invoke-MstscConnect.ps1 calls cmdkey /generic:"TERMSRV/$HostAddress" /user:$User /pass:$Password and uses mouse_event for 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.ps1 uses Add-Type -TypeDefinition $code where $code contains C# code for user32.dll imports like SetCursorPos, mouse_event, and GetWindowRect.
  • [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:$Password in scripts/Invoke-MstscConnect.ps1 saves 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) in scripts/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 via cmdkey, 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
Risk Level
HIGH
Analyzed
Oct 11, 2026, 11:55 AM