分析的比较仓促,有一部分行为也没有仔细分析,请大家多多指教哈^_^
一、概述
本文档讲述关于极虎病毒变种的行为、技术细节;
该病毒主要通过互联网和局域网传播,其大小为248,832 字节 ,编写语言不详。运行后先判断自身模块位置,如为0x0040000则认为是exe文件,此时打开指定服务,搜索指定的dll文件,找到合适之后将自身修改成dll路径替换之。如果不为0x0040000则认定自身为dll文件然后破坏安全模式,结束杀毒软件,下载木马,感染指定类型的文件,感染可移动磁盘,攻击局域网用户。
二、行为预览
1) 病毒名称:极虎病毒(又名虎虎生威) 2) 病毒类型:感染型病毒 3) 病毒大小:248,832 字节
4) 传播方式:互联网,局域网,可移动存储介质,网页挂马 5) 相关文件:
a 【极虎病毒】分析报告.doc : 病毒分析报告 b 极虎病毒exe.v : 病毒样本;
c 极虎病毒.idb : 病毒IDA打开文件;
6) 病毒具体行为:
a 获取自身模块地址和0x0040000作比较,不同则判断成exe文件运行。此时将自身读入内存并修改成dll属性,然后查找指定的服务,找到其中停止的服务,并查找对应的dll用自身替换之。
b 当为dll被加载时首先搜寻avp.exe,bdagent.exe进程,如果找到则写入一堆nop跳过之后将其删除。在临时文件夹下释放驱动文件加载后删除。获取自身模块对应的服务将其设置成开机启动。
c 利用驱动干扰和结束杀毒软件,分别向驱动发送IRP吗添加劫持和结束杀软。其中被结束的杀软名有:KVMonXP.kxp.KVSrvXP.exe.avp.exe.avp.exe.avp.exe.RavMonD.exe.RavTask.exe.RsAgent.exe.rsnetsvr.exe.RsTray.exe.ScanFrm.exe.CCenter.exe.kavstart.exe.kissvc.exe.kpfw32.exe.kpfwsvc.exe.kswebshield.exe.kwatch.exe.kmailmon.exe.egui.exe.ekrn.exe.ccSvcHst.exe.ccSvcHst.exe.ccSvcHst.exe.Mcagent.exe.mcmscsvc.exe.McNASvc.exe.Mcods.exe.McProxy.exe.Mcshield.exe.mcsysmon.exe.mcvsshld.exe.MpfSrv.exe.McSACore.exe.msksrver.exe.sched.exe.avguard.exe.avmailc.exe.avwebgrd.
exe.avgnt.exe.sched.exe.avguard.exe.avcenter.exe.UfSeAgnt.exe.TMBMSRV.exe.SfCtlCom.exe.TmProxy.exe.360SoftMgrSvc.exe.360tray.exe.qutmserv.exe.bdagent.exe.livesrv.exe.seccenter.exe.vsserv.exe.MPSVC.exe.MPSVC1.exe.MPSVC2.exe.MPMon.exe.ast.exe.360speedld.exe.360SoftMgrSvc.exe.360tray.exe.修复工具.exe.360hotfix.exe.360rpt.exe.360safe.exe.360safebox.exe.krnl360svc.exe.zhudongfangyu.exe.360sd.exe.360rp.exe.360se.exe.safeboxTray.exe.
d 删除指定注册表SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal和SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Network来破坏安全模式。修改host文件。感染文件,其中感染文件类型如下:exe,asp,aspx,asp,htm,html,rar。对exe文件主要是在添加一个.tc节头,然后在末尾写上一串shell代码,对rar文件则首先解压到临时文件夹内,然后感染之再打包压回。其他文件则在末尾写上一串脚本。感染之前跳过系统路径包括WinRAR,WindowsUpdate,Windows NT,Windows Media Player,Outlook Express,NetMeeting,MSN Gaming Zone,Movie Maker microsoft frontpage,Messenger,Internet Explorer,InstallShield Installation InformationComPlus Applications,Common Files,RECYCLER,System Volume InformationDocuments and Settings,WinNT,WINDOWS。
三、清理方式
由于该病毒破坏安全模式并感染电脑上大部分文件,手动很难清除,故建议采用专杀工具清理。
【以下为正文】
四、正文
.text:00401B7E call $+5
.text:00401B83 mov eax, [esp+2Ch+var_2C] ; 取当前地址 .text:00401B86 mov [ebp+lpAddress], eax .text:00401B89 pop eax
.text:00401B8A push 1Ch ; size_t .text:00401B8C push 0 ; int .text:00401B8E lea eax, [ebp+Buffer]
.text:00401B91 push eax ; void * .text:00401B92 call memset .text:00401B97 add esp, 0Ch
.text:00401B9A push 1Ch ; dwLength .text:00401B9C lea eax, [ebp+Buffer]
.text:00401B9F push eax ; lpBuffer .text:00401BA0 push [ebp+lpAddress] ; lpAddress .text:00401BA3 call ds:VirtualQuery
.text:00401BA9 mov eax, [ebp+Buffer.AllocationBase] .text:00401BAC mov hModule, eax
.text:00401BB1 push 0 ; lpModuleName .text:00401BB3 call ds:GetModuleHandleA
.text:00401BB9 cmp eax, hModule ; 检查当前地址 .text:00401BBF jnz short DllFile ; 当是Dll文件时跳走 .text:00401BC1 push [ebp+arg_C] .text:00401BC4 push [ebp+arg_8] .text:00401BC7 push [ebp+arg_4] .text:00401BCA push [ebp+arg_0]
text:00401BCD call ExeRun .; 当该文件为exe执行 .text:00401BD2 mov [ebp+var_24], eax .text:00401BD5 jmp short loc_401BE8 .text:00401BD7 DllFile: .text:00401BD7 push [ebp+arg_8] .text:00401BDA push [ebp+arg_4] .text:00401BDD push [ebp+arg_0]
.text:00401BE0 call DllRun . ; 当是Dll时执行
当该文件为exe文件时首先创建管道\\\\\\\\.\\\\pipe\\\\96DBA249-E88E-4c47-98DC-E18E6E,如果成功就尝试从管道中读取数据,如果失败则通过判断错误码,如果是所有管道都在使用中则终止程序。实现过程如下:
.text:0040657E push 0 ; hTemplateFile .text:00406580 push 0 ; dwFlagsAndAttributes .text:00406582 push 3 ; dwCreationDisposition .text:00406584 push 0 ; lpSecurityAttributes
.text:00406586 push 0 ; dwShareMode .text:00406588 push 0C0000000h ; dwDesiredAccess .text:0040658D push [ebp+lpFileName] ; lpFileName
.text:00406590 call ds:CreateFileA ; 尝试打开管道\
.text:00406596 mov [ebp+hObject], eax
.text:00406599 cmp [ebp+hObject], 0FFFFFFFFh
.text:0040659D jnz short loc_4065C7 ; 打开成功跳走 .text:0040659F push 1 ; Buffer .text:004065A1 lea eax, [ebp+String2]
.text:004065A7 push eax ; lpBuffer
.text:004065A8 call CreateBin ; 打开成功,创建\文件
.text:004065AD call ds:GetLastError
.text:004065B3 cmp eax, 0E7h ; 错误吗意义:所有的管道范例都在使用中。
.text:004065B8 jnz short Over_0 ; 没有空闲的管道,跳出 .text:004065BA push 0 ; uExitCode
.text:004065BC call ds:ExitProcess ; 管道在使用终止程序
当打开管道成功后跳到这里
=============================================================
.text:004065C7 mov [ebp+Mode], 2 ; 管道模式 .text:004065CE push 0 ; lpCollectDataTimeout .text:004065D0 push 0 ; lpMaxCollectionCount
.text:004065D2 lea eax, [ebp+Mode] ; PIPE_READMODE_MESSAGE .text:004065D5 push eax ; lpMode .text:004065D6 push [ebp+hObject] ; hNamedPipe
.text:004065D9 call ds:SetNamedPipeHandleState ; 设置成读和阻塞模式
.text:004065DF push 0 ; lpOverlapped .text:004065E1 lea eax, [ebp+NumberOfBytesRead]
.text:004065E4 push eax ; lpNumberOfBytesWritten .text:004065E5 push 2 ; nNumberOfBytesToWrite .text:004065E7 push offset byte_40BE6C ; lpBuffer .text:004065EC push [ebp+hObject] ; hFile
.text:004065EF call ds:WriteFile ; 将DD写入管道中 .text:004065F5 push 0 ; lpOverlapped .text:004065F7 lea eax, [ebp+NumberOfBytesRead]
.text:004065FA push eax ; lpNumberOfBytesRead .text:004065FB push 104h ; nNumberOfBytesToRead .text:00406600 push offset String ; lpBuffer .text:00406605 push [ebp+hObject] ; hFile
.text:00406608 call ds:ReadFile ; 从管道中读取数据 .text:0040660E push offset String ; lpString .text:00406613 call ds:lstrlenA .text:00406619 test eax, eax
.text:0040661B jnz short ReadSucceed ; 从该管道读取数据成功 .text:0040661D push [ebp+hObject] ; hObject .text:00406620 call ds:CloseHandle
.text:00406626 push 1 ; Buffer .text:00406628 lea eax, [ebp+String2]
.text:0040662E push eax ; lpBuffer .text:0040662F call CreateBin
.text:00406634 push 0 ; uExitCode
.text:00406636 call ds:ExitProcess ; 管道读取数据失败终止程序
在管道中读取数据成功后则通过strrchr函数搜索以2E开头的ASCII吗字符串,之后反复打开上面管道,知道找不到文件为止,实现方法如下:
.text:0040666C Next: ; CODE XREF: .text:0040666C mov eax, [ebp+var_26C] .text:00406672 inc eax
.text:00406673 mov [ebp+var_26C], eax .text:00406679 loc_406679:
.text:00406679 cmp [ebp+var_26C], 64h .text:00406680 jge short Over_1
.text:00406682 push 0 ; hTemplateFile
.text:00406684 push 0 ; dwFlagsAndAttributes .text:00406686 push 3 ; dwCreationDisposition .text:00406688 push 0 ; lpSecurityAttributes .text:0040668A push 0 ; dwShareMode
.text:0040668C push 0C0000000h ; dwDesiredAccess .text:00406691 push [ebp+lpFileName] ; lpFileName
.text:00406694 call ds:CreateFileA ; 尝试打开\
.text:0040669A mov [ebp+hObject], eax
.text:0040669D cmp [ebp+hObject], 0FFFFFFFFh .text:004066A1 jnz short OpenPipeFail .text:004066A3 call ds:GetLastError
.text:004066A9 cmp eax, 2 ; 错误码:系统找不到指定文件 .text:004066AC jnz short Next_1
.text:004066AE jmp short Over_1 ; 反复打开管道,知道找不到文件后推出
.text:004066B0 Next_1:
.text:004066B0 jmp short GetNext .text:004066B2 OpenPipeFail:
.text:004066B2 push [ebp+hObject] ; hObject .text:004066B5 call ds:CloseHandle .text:004066BB GetNext:
.text:004066BB push 32h ; dwMilliseconds .text:004066BD call ds:Sleep ; 睡眠32h毫秒 .text:004066C3 jmp short Next
然后获取自身文件名完整路径,申请一块堆内存将自身读入内存并修改成dll属性,实现方法如下:
.text:00401C0B push 104h ; nSize .text:00401C10 lea eax, [ebp+FileName]
.text:00401C16 push eax ; lpFilename .text:00401C17 push [ebp+hModule] ; hModule .text:00401C1A call ds:GetModuleFileNameA .text:00401C20 and [ebp+var_120], 0 .text:00401C27 jmp short loc_401C36 .text:00401C29 loc_401C29:
.text:00401C29 mov eax, [ebp+var_120] .text:00401C2F inc eax
.text:00401C30 mov [ebp+var_120], eax .text:00401C36 loc_401C36:
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库极虎病毒分析报告在线全文阅读。
相关推荐: