install.ps1
Legitimate installer with integrity checks
PowerShell downloads, extracts and launches filesCode embeds unconditional PowerShell loop
SHA-256c16ec9f64b61f0aedd3c42a676a98668e48910950447419fb765b27949f5cc18
Evidence
5:8… red, no admin elevation.
6#
7# Usage (one-liner — recommended):
8# irm https://cua.ai/driver/install.ps1 | iex
9#
10# Pin a version:
⋯4 lines
124:2… AutoStartRequested = [bool]$AutoStart -and
125 (Test-Path variable:PSBoundParameters) -and
126 $PSBoundParameters.ContainsKey('AutoStart')
127
128Set-StrictMode -Version Latest
129$ErrorActionPreference = "Stop"
130# Invoke-WebRequest's progress bar is ~10x slower than the actual download
131# over PowerShell ISE and Windows PowerShell 5 — silence it. Restored
137:38… urity / .Archive first, fails to load
138# them, and Get-FileHash, Get-AuthenticodeSignature and Expand-Archive are
139# "not recognized". Put this edition's own modules first and drop the
140# PowerShell 7 module paths before any of them is used.
141if ($PSVersionTable.PSEdition -eq 'Desktop') {
142 $desktopModules = Join-Path $PSHOME 'Modules'
143 $modulePaths = @($desktopModules) + @(($env:PSModulePath -split ';') …
811:50… elevated shell can invoke
812 # the binary.
813 $proc = Start-Process -FilePath $InstalledBinary `
814 -ArgumentList @("autostart", "enable") `
815 -Verb RunAs -Wait -PassThru -ErrorAction Stop
816 if ($proc.ExitCode -ne 0) {
817 throw "cua-driver autostart enable failed in …
1456:102… he Authenticode check"
1457 return
1458 }
1459 foreach ($file in Get-ChildItem -LiteralPath $stageDir -Recurse -File -Filter *.exe) {
1460 $signature = Get-AuthenticodeSignature -FilePath $file.FullName
1461 if ($signature.Status -ne 'Valid') {
1462 Write-ErrorStep "invalid Authenticode signature on $($file.Name): $($signature.StatusMessage); refusing to install it."
1463 exit 1
1464 }
1465 if ($signature.SignerCertificate.Subject -notmatch 'CN="?Cua AI, Inc\."?') {
1466 Write-ErrorStep "unexpected Authenticode signer on $($file.Name): $($signature. …