Benign powershell Download

install.ps1

Invokes PowerShell HTTP request cmdletInvokes PowerShell REST request cmdlet
SHA-256305c38a2d96513e22665974485803beed1a66846e002dc5eec978bd61e1f5fc0

Evidence

Comment line documents piped eval lines 1–20
1:38… =========================
2# EigenFlux CLI Installer for Windows
3# Usage: irm https://www.eigenflux.ai/install.ps1 | iex
4# ============================================================
5
6param(
7 [ValidatePattern('^(?-i:EF-[0-9A-Za-z]{8})?$')]
8 [string]$Ref = "",
9 [string]$Endpoint = ""
10)
11
12$ErrorActionPreference = "Stop"
13$ProgressPreference = "SilentlyContinue"
14
15$CdnUrl = if ($env:EIGENFLUX_CDN_URL) { $env:EIGENFLUX_CDN_URL } else { "https://cdn.eigenflux.ai" }
16$GithubRepo = "phronesis-io/eigenflux"
17$Branch = "main"
18$ExplicitEigenfluxHome = $env:EIGENFLUX_HOME
19if (-not $Endpoint) {
20 …
HTTP URL string literal lines 20–26
20:16… if ($env:EIGENFLUX_API_URL) { $env:EIGENFLUX_API_URL } else { "https://www.eigenflux.ai" }
21}
22$Endpoint = $Endpoint.TrimEnd('/')
23
24function Info($msg) { Write-Host $msg -ForegroundColor Cyan }
25function Ok($msg) { Write-Host $msg -ForegroundColor Green }
26function Err($msg) { Write-Host $msg -ForegroundColor …
Windows user-profile folder path reference lines 39–50
39:7… itch ($InvokingHost) {
40 "codex" { return (Join-Path $env:USERPROFILE ".eigenflux-codex\.eigenflux") }
41 "openclaw" { return (Join-Path $env:USERPROFILE ".openclaw\.eigenflux") }
42 default { return (Join-Path $env:USERPROFILE ".eigenflux") }
43 }
44}
45
46# ── Helper: download with retry, temp file, optional SHA256 ──
47
48function Download-WithRetry {
49 param(
50 [str …
Invokes PowerShell HTTP request cmdlet lines 54–78
54:2… [switch]$CliInstallation
55 )
56
57 $tmpFile = Join-Path $env:TEMP ("eigenflux-dl-" + [System.IO.Path]::GetRandomFileName() + ".exe")
58 $attempt = 0
59 $downloaded = $false
60
61 try {
62 while ($attempt -lt $MaxRetries -and -not $downloaded) {
63 $attempt++
64 try {
65 if ($attempt -gt 1) { Info "Retry ${attempt}/${MaxRetries}..." }
66 Invoke-WebRequest -Uri $Url -OutFile $tmpFile -UseBasicParsing -TimeoutSec 30
67 $downloaded = $true
68 } catch {
69 if ($attempt -ge $MaxRetries) {
70 throw "Download failed after ${MaxRetries} attempts: ${Url}`n$($_.Exception.Message)"
71 }
72 Remove-Item -Force $tmpFile -ErrorAction SilentlyContinue
73 Start-Sleep -Seconds (2 * $attempt)
74 }
75 }
76
77 if ($Sha256Url) {
78 # A missing checksum is a failed release …
PowerShell decodes UTF-8 bytes into text lines 83–88
83:74… $($_.Exception.Message)"
84 }
85 $checksum = $response.Content
86 if ($checksum -is [byte[]]) { $checksum = [System.Text.Encoding]::UTF8.GetString($checksum) }
87 $expectedHash = ([string]$checksum).Trim()
88 if ($expectedHash -notmatch '^[a-fA-F0-9]{64}$') …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.