Benign powershell Download

ps12exe 0.6.5

PowerShell dynamic scriptblock invokePowerShell compiles C# source at runtime

Evidence

Encoded URL references Microsoft documentation ps12exe.ps1 · lines 48–51
48:89r culture)
49- Options: additional compiler options (see https://msdn.microsoft.com/en-us/library/78f4aasd.aspx)
50- KeepSource: keep the generated C# source for debugging (default: $false)
51- Minify: scriptblock
Windows public or temp directory path ps12exe.ps1 · lines 51–57
51:32 the script before compiling
52- TempDir: directory for storing temporary files (default: random directory in %temp%)
53
54.PARAMETER Resources
55A hashtable of version resources embedded into the compiled executable.
56Supported keys are 'Icon', 'Title', 'Description', 'Company', 'Product', 'Copyright', 'Trademark', 'Version'.
57Icon can be a file path or URL to an icon file. All other values are
PowerShell dynamic scriptblock invoke ps12exe.ps1 · lines 343–354
343:8et-Command $minifyer -ErrorAction Ignore) {
344 $minifyer = "$minifyer `$_"
345 }
346 $minifyer = [scriptblock]::Create($minifyer)
347 }
348 if ($minifyer) {
6 lines
PowerShell compiles C# source at runtime CodeDomCompiler.ps1 · lines 132–156
132:25$script:CacheRoot ("build_" + [Guid]::NewGuid().ToString('N'))
133 New-Item -ItemType Directory -Path $buildDir -Force | Out-Null
134 try {
135 $phPath = Join-Path $buildDir $ResourceName
136 [System.IO.File]::WriteAllBytes($phPath, [byte[]]::new($Bucket))
137 $templateOut = Join-Path $buildDir $AssemblyName
138 $p = New-CompilerParameters $templateOut $Options $FALSE
139 [VOID]$p.EmbeddedResources.Add($phPath)
140 $r = $cop.CompileAssemblyFromSource($p, $Source)
141 if ($r.Errors.Count -gt 0) { throw ($r.Errors -join "`n") }
142 $bytes = [System.IO.File]::ReadAllBytes($templateOut)
143 Set-CachedBytes $cachePath $bytes
144 return , $bytes
145 }
146 finally {
147 Remove-Item -LiteralPath $buildDir -Recurse -Force -ErrorAction Ignore
148 }
149 }
7 lines
Delete script files using del es-ES.ps1 · lines 336–340
336:7DoesNotExist = "El archivo no existe."
337 EnterOutputFile = "Introduce la ruta del archivo de salida (dejar en blanco para <exe>.ps1 en la misma carpeta):"
338 OutputFileExtensionError = "El archivo de salida debe ser '.ps1'. Se añadirá la extensión."
339 AdditionalInfoPrompt = "[Y/N]"
340 ConvertAnother = "�

Showing the top 5 files — 7 more files (114 regions) not shown.

No evidence locations were recorded for this file. Raw result

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.