Armadillo V4.4 CopyMemII+Debugblocker+IAT Elimination+Code Splicing±£»¤·½Ê½¼Çʱ¾ÍÑ¿Ç
¡¾ÍÑ¿ÇÈí¼þ¡¿£ºÓÃWIN98¼Çʱ¾¼Ó¿Ç¡£
¡¾×÷ÕßÉùÃ÷¡¿£º³öÓÚѧϰĿµÄ£¬Ê§ÎóÖ®´¦¾´ÇëÖîλ´óÏÀ´Í½Ì¡£
¡¾µ÷ÊÔ¹¤¾ß¡¿£ºWinXP¡¢OllyDbg¡¢PEiD¡¢LordPE,arminline0.7¡¢pupe¡¢ArmaDetach¡¢RecImport¡£
¡¾±£»¤·½Ê½¡¿£º Armadillo V4.4 CopyMemII+Debugblocker+IAT Elimination+Code Splicing±£»¤·½Ê½ÍÑ¿Ç
³õѧÍÑ¿Ç£¬ÃÉflyÐֵܵİïÖúÓë¹ÄÀø£¬×ÜËãÍê³ÉÁËÍѿǹý³Ì£¬ÔÚ´ËÊ×ÏȸÐлflyÐֵܡ£
Ò²·Ç³£¸Ðл¸÷λ´óÏÀÃǵÄÓйؽ̳̲ο¼¡£
×¢²á¡¶¿´Ñ©¡·ÒѺܳ¤Ê±¼äÁË£¬³öÓÚ¶Ô¸÷λ´óÏÀµÄ×ðÖØ£¬²»¸Ò·¢Ò»¸öÖ÷Ìâ¡°°àÃÅŪ¸«¡±¡£ÕâÊÇÊ׸öÖ÷Ì⣬ËãÊǸø¡¶¿´Ñ©¡·Ò»¸ö»ã±¨°É¡£
ODÔØÈë¡£¡£¡£¡£¡£¡£
00449C43 > 55 push ebp
00449C44 8BEC mov ebp,esp
00449C46 6A FF push -1
00449C48 68 902F4700 push ÂÒÐò+Ô¶?00472F90
00449C4D 68 80994400 push ÂÒÐò+Ô¶?00449980
00449C52 64:A1 00000000 mov eax,dword ptr fs:[0]
00449C58 50 push eax
00449C59 64:8925 0000000>mov dword ptr fs:[0],esp
---------------------------------------------------------------------------------------------
϶Ï:BP WaitForDebugEvent
7C85A268 > 8BFF mov edi,edi
7C85A26A 55 push ebp
7C85A26B 8BEC mov ebp,esp
7C85A26D 83EC 68 sub esp,68
7C85A270 56 push esi
7C85A271 FF75 0C push dword ptr ss:[ebp+C]
7C85A274 8D45 F8 lea eax,dword ptr ss:[ebp-8]
7C85A277 50 push eax
7C85A278 E8 F381FAFF call kernel32.7C802470
½ø³Ì½«Òª¸´ÖƸø×Ó½ø³ÌµÚÒ»¸ö¿éµÄÐÅÏ¢,ÔÚ¶ÑÕ»´°¿ÚÖУº
========================================================================
0012DC8C 00439D86 /CALL µ½ WaitForDebugEvent À´×Ô ÂÒÐò+Ô¶?00439D80
0012DC90 0012ED7C |pDebugEvent = 0012ED7C
0012DC94 000003E8 \Timeout = 1000. ms
========================================================================
¡øpDebugEvent=0012CD90Êý¾Ý´°¿Ú¸úËæºó£¬Êý¾Ý´°¿ÚÒ»Ö±±£³ÖÔÚÕâÀµ½½áÊø¡£¡ø
BC WaitForDebugEvent Çå³ýÕâ¸ö¶Ïµã¡£µ±È»Ò²¿ÉÒÔF2È¡Ïû¡£
--------------------------------------------------------------------------------------------
--×Ó½ø³ÌOEP¡¢PID--
BP WriteProcessMemory£¬Shirt+F9 ,µ½BytesToWrite=1000¡£
7C80220F > 8BFF mov edi,edi
7C802211 55 push ebp
7C802212 8BEC mov ebp,esp
7C802214 51 push ecx
7C802215 51 push ecx
7C802216 8B45 0C mov eax,dword ptr ss:[ebp+C]
7C802219 53 push ebx
7C80221A 8B5D 14 mov ebx,dword ptr ss:[ebp+14]
--×Ó½ø³ÌOEP¡¢PID--
=======================================================================
0012DB2C 0043DD57 /CALL µ½ WriteProcessMemory À´×Ô ÂÒÐò+Ô¶?0043DD51
0012DB30 0000004C |hProcess = 0000004C (window)
0012DB34 00401000 |Address = 401000
0012DB38 003C3560 |Buffer = 003C3560
0012DB3C 00001000 |BytesToWrite = 1000 (4096.)
0012DB40 0012DC48 \pBytesWritten = 0012DC48
=======================================================================
PID=0FA4 OEP=4010CC
==========================================================================
0012ED7C 01 00 00 00 A4 0F 00 00 7C 0C 00 00 01 00 00 80 ...?..|.....€
0012ED8C 00 00 00 00 00 00 00 00 CC 10 40 00 02 00 00 00 ........?@....
0012ED9C 00 00 00 00 CC 10 40 00 CC 10 40 00 06 00 00 00 ....?@.?@....
0012EDAC 00 00 00 00 E8 1C 88 B4 00 00 00 00 00 00 00 00 ....?ˆ´........
0012EDBC 13 00 00 00 00 0D 88 00 64 CD 45 B4 F1 2F 4E 80 .....?dÍE´ñ/N€
0012EDCC 00 00 00 00 CC 10 40 00 01 00 00 00 01 00 00 00 ....?@.......
0012EDDC 01 EE 12 00 00 00 00 00 00 00 00 00 00 00 00 00 ?.............
==========================================================================
--nop¼ÓÃÜCLL--
ÔÚ¶ÑÕ»´°¿ÚÓÒ¼ü-->·´»ã±à´°¿Ú
========================================================================
0012DB2C 0043DD57 /CALL µ½ WriteProcessMemory À´×Ô ÂÒÐò+Ô¶?0043DD51 ; ÓÒ¼ü-->·´»ã±à´°¿Ú¸úËæ
========================================================================
·´»ã±à´°¿Ú¸úËæµ½ÕâÀ϶ϣ¬F9Ò»´Î¡£
0043DD57 85C0 test eax,eax
0043DD59 75 4B jnz short IAT+SP.0043DDA6
0043DD5B 50 push eax
0043DD5C F7D0 not eax
0043DD5E 0FC8 bswap eax
0043DD60 58 pop eax
0043DD61 73 00 jnb short IAT+SP.0043DD63
ÔÚ¶ÑÕ»´°¿ÚÏòÏ»عö£¬µ½ÕâÀï¡£
==========================================================================
0012DC38 00000020
0012DC3C 00401000 ÂÒÐò+Ô¶?00401000
0012DC40 00000020
0012DC44 003C4560
0012DC48 00001000
0012DC4C 003C4560
0012DC50 /0012DC84
0012DC54 |0043C9C5 ·µ»Øµ½ ÂÒÐò+Ô¶?0043C9C5 À´×Ô ÂÒÐò+Ô¶?0043CD0D
==========================================================================
ÔÚ·´»ã±à´°¿Ú Ctrl+G: 0043CD0D£¬µ½ÕâÀï¡£
0043CD0D 55 push ebp
0043CD0E 8BEC mov ebp,esp
0043CD10 81EC 00010000 sub esp,100
0043CD16 53 push ebx
0043CD17 56 push esi
0043CD18 57 push edi
0043CD19 8B45 08 mov eax,dword ptr ss:[ebp+8]
Ctrl+R£¬Ñ¡ÔñµÚ¶þ¸öCALLË«»÷¡£
=====================================================================
²Î¿¼Î»ÓÚ ÂÒÐò+Ô¶?.text1 µ½ 0043CD0D
µØÖ· ·´»ã±à ×¢ÊÍ
0043C9C0 call ÂÒÐò+Ô¶?0043CD0D
0043CC95 call ÂÒÐò+Ô¶?0043CD0D ; Ñ¡ÔñÕâ¸öCALL
0043CD0D push ebp £¨³õʼ CPU Ñ¡Ôñ£©
=====================================================================
µ½ÕâÀïÁË£¬½«0043CC95Õâ¸öCALL£¬nopµô¡£
0043CC95 E8 73000000 call ÂÒÐò+Ô¶?0043CD0D ; nopÕâ¸öCALL
0043CC9A 83C4 0C add esp,0C
0043CC9D 50 push eax
0043CC9E F7D0 not eax
0043CCA0 0FC8 bswap eax
0043CCA2 58 pop eax
ÔÚ¶ÑÕ»´°¿ÚCtrl+G£º0012ED7C
=======================================
0012ED94 |004010CC ÂÒÐò+Ô¶?004010CC
0012ED98 |00000002
0012ED9C |00000000
0012EDA0 |004010CC ÂÒÐò+Ô¶?004010CC
0012EDA4 |004010CC ÂÒÐò+Ô¶?004010CC
=======================================
¡ø×Ó½ø³ÌOEPΪ004010CC,×¢Ò⣬ÎÒÃÇÉÔºó»áÐèÒªÕâÈý¸öµØÖ·¡£¡ø
---------------------------------------------------------------------------------------------
--ÐγÉÑ»·--
´ò¿ªPUPE,´ò¿ª³ÌÐò(¼ÇµÃʹÓÃÕýÈ·µÄ½ø³Ì),¼üÈë×Ó½ø³ÌµÄOEP=004010CC¡£
Ñ¡Ôñ×Ó½ø³ÌPID=0FA4
Ô×Ö½Ú: 55 B8£¬ ÐÞ¸ÄΪ£ºEBFE¡£
¹Ø±ÕPUPE¡£
»Øµ½Olly¡£
Çå³ýËùÓжϵ㡣
ÏÂ¶Ï bp WaitForDebugEvent £¬F9¡£
È¡Ïû bc WaitForDebugEvent
7C85A268 > 8BFF mov edi,edi
7C85A26A 55 push ebp
7C85A26B 8BEC mov ebp,esp
7C85A26D 83EC 68 sub esp,68
7C85A270 56 push esi
7C85A271 FF75 0C push dword ptr ss:[ebp+C]
7C85A274 8D45 F8 lea eax,dword ptr ss:[ebp-8]
ÖжϺó,ÔÚ0012DC8C"ÔÚ·´»ã±à´°¿ÚÖиúËæ"¡£
¶ÑÕ»ÖУº
=======================================================================
0012DC8C 00439D86 /CALL µ½ WaitForDebugEvent À´×Ô ÂÒÐò+Ô¶?00439D80 ; ÔÚ·´»ã±à´°¿ÚÖиúËæ
0012DC90 0012ED7C |pDebugEvent = 0012ED7C
0012DC94 000003E8 \Timeout = 1000. ms
=======================================================================
--н¨EIP--
ÔÚ·´»ã±à´°¿ÚÖиúËæµ½ÕâÀÓÒ¼ü-->н¨EIP£¬»ý´æÆ÷ÖÐEIPÒ²±äÁË¡£
00439D86 85C0 test eax,eax ; н¨EIP¡£
nopµô00439D76~~00439D81¡£
00439D76 |0300 add eax,dword ptr ds:[eax]
00439D78 |008B 95DCF5FF add byte ptr ds:[ebx+FFF5DC95],c>
00439D7E |FF52 FF call dword ptr ds:[edx-1]
00439D81 |15 E0D04600 adc eax,<&KERNEL32.WaitForDebugE>
--¸Ä±äÌøת--
½«00439D88¸Ä±ä³Éjmp 00401000¡£
00439D86 85C0 test eax,eax
00439D88 0F84 64270000 je ÂÒÐò+Ô¶?0043C4F2 ; ¸Ä±äÌøת¡£
00439D8E 8B85 FCFDFFFF mov eax,dword ptr ss:[ebp-204]
00439D94 25 FF000000 and eax,0FF
00439D99 85C0 test eax,eax
00439D9B 74 13 je short ÂÒÐò+Ô¶?00439DB0
¸Ä¶¯ºó¡£
==========================================================
00439D85 90 nop
00439D86 85C0 test eax,eax
00439D88 - E9 7372FCFF jmp ÂÒÐò+Ô¶?00401000 ; ¸Ä¶¯ºó¡£
00439D8D 90 nop ; ¼ÇסÕâ¸öµØÖ·£¡
00439D8E 8B85 FCFDFFFF mov eax,dword ptr ss:[ebp-204]
---------------------------------------------------------------------------------------------
--ÐÞ¸Ä×Ó½ø³ÌµÄ3¸öOEP--
ÔÚÊý¾Ý´°¿Ú£¬Ñ¡Ôñ×Ó½ø³ÌµÄ3¸öOEPÖµ£¬Ctrl+E,±à¼¸Ä³É400000¡£
ÔÚת´æÖÐÐÞ¸Ä×Ó½ø³ÌOEP=00400000¡£
===========================================================================
0012ED7C 01 00 00 00 A4 0F 00 00 7C 0C 00 00 01 00 00 80 ...?..|.....€
0012ED8C 00 00 00 00 00 00 00 00 00 00 40 00 02 00 00 00 ..........@....
0012ED9C 00 00 00 00 00 00 40 00 00 00 40 00 06 00 00 00 ......@...@....
0012EDAC 00 00 00 00 E8 1C 88 B4 00 00 00 00 00 00 00 00 ....?ˆ´........
0012EDBC 13 00 00 00 00 0D 88 00 64 CD 45 B4 F1 2F 4E 80 .....?dÍE´ñ/N€
0012EDCC 00 00 00 00 CC 10 40 00 01 00 00 00 01 00 00 00 ....?@.......
0012EDDC 01 EE 12 00 00 00 00 00 00 00 00 00 00 00 00 00 ?.............
===========================================================================
Ctrl+G£º0012ED94£¬¼ÇסÏÂÃæµØÖ·
=======================================
0012ED94 00400000 ÂÒÐò+Ô¶?00400000 ; ²¹¶¡ÓõØÖ·1
0012ED98 00000002
0012ED9C 00000000
0012EDA0 00400000 ÂÒÐò+Ô¶?00400000 ; ²¹¶¡ÓõØÖ·2
0012EDA4 00400000 ÂÒÐò+Ô¶?00400000 ; ²¹¶¡ÓõØÖ·3
=======================================
ÏÖÔÚ£¬¿ÉÒÔ´Ó00439D88¿ªÊ¼F8²½½ø£¬ÔÚ00439D88Ìøת´¦£¬Ìøµ½ÁË00401000¡£
×¢Ò⣺Çå³ýËùÓжϵ㣡
---------------------------------------------------------------------------------------------
--ÎÒÃÇ¿ªÊ¼¼üÈëÒÔϲ¹¶¡--
00401000 8105 A8CD1200 > add dword ptr ds:[12ED94],1000 ; ²¹¶¡ÓõØÖ·1
0040100A 8105 B4CD1200 > add dword ptr ds:[12EDA0],1000 ; ²¹¶¡ÓõØÖ·2
00401014 8105 B8CD1200 > add dword ptr ds:[12EDA4],1000 ; ²¹¶¡ÓõØÖ·3
0040101E 813D B8CD1200 > cmp dword ptr ds:[12EDA4],00405000
00401028 - 0F85 B8544F00 jnz 00439D8D
0040102E 68 2C090000 push 0FA4 ¡ïPID¡ï
00401033 E8 5993457C call DebugActiveProcessStop
00401038 90 nop ; ÕâÀïÖжϡ£
00401039 90 nop
ÖжϺó¶ÑÕ»ÖС£
===========================================================================
0012ED7C 01 00 00 00 A4 0F 00 00 7C 0C 00 00 01 00 00 80 ...?..|.....€
0012ED8C 00 00 00 00 00 00 00 00 00 50 40 00 02 00 00 00 .........P@....
0012ED9C 00 00 00 00 00 50 40 00 00 50 40 00 06 00 00 00 .....P@..P@....
0012EDAC 00 00 00 00 E8 1C 88 B4 00 00 00 00 00 00 00 00 ....?ˆ´........
0012EDBC 13 00 00 00 00 0D 88 00 64 CD 45 B4 F1 2F 4E 80 .....?dÍE´ñ/N€
0012EDCC 00 00 00 00 CC 10 40 00 01 00 00 00 01 00 00 00 ....?@.......
0012EDDC 01 EE 12 00 00 00 00 00 00 00 00 00 00 00 00 00 ?.............
===========================================================================
¿´»ý´æÆ÷ÖУ¬EAX=1£¬OK¡£
EAX=00000001£¬¾ÍÒâζ×Ŷù×ÓÍÑÀ븸Ç×ÁË¡£
-----------------------------------------------------------------------------------------------
¹Ø±ÕOllyDbg£¬ÔÙÖØдò¿ª£¬Ñ¡Ôñ¸½¼Ó--->×Ó½ø³ÌPID=0FA4£¬ÏÖÔÚÖ»ÓÐÒ»¸ö¡£
Í£ÔÚÕâÀïÁË£¬F9£¬F12¡£
7C921231 C3 retn
7C921232 8BFF mov edi,edi
7C921234 90 nop
7C921235 90 nop
µ½ÁËÕâÀï¡£
004010CC - EB FE jmp short IAT+SP.004010CC
004010CE EC in al,dx
004010CF 83EC 44 sub esp,44
004010D2 56 push esi
004010D3 FF15 6414>call dword ptr ds:[D91464]
Ctrl+E£¬½«×Ó½ø³ÌµÄÈë¿Ú¸Ä»ØÀ´£¬ EB FE-->55 8B
¸Ä±äºó¡£
004010CC 55 push ebp
004010CD 8BEC mov ebp,esp
004010CF 83EC 44 sub esp,44
004010D2 56 push esi
004010D3 FF15 6414>call dword ptr ds:[D91464]
Ctrl+B£¬ FF 25
µ½ÕâÀïÁË£¬ÓÒ¼ü-->Êý¾Ý´°¿Ú¸úËæ-->ÄÚ´æµØÖ·£¬Êý¾Ý´°¿ÚÓÒ¼ü-->³¤ÐÍ-->µØÖ·¡£
00404FAA - FF25 4811>jmp dword ptr ds:[D91148] ; comdlg32.CommDlgExtendedError
00404FB0 - FF25 9813>jmp dword ptr ds:[D91398] ; comdlg32.GetSaveFileNameA
00404FB6 - FF25 5811>jmp dword ptr ds:[D91158] ; comdlg32.PageSetupDlgA
00404FBC - FF25 F011>jmp dword ptr ds:[D911F0] ; comdlg32.FindTextA
00404FC2 - FF25 3413>jmp dword ptr ds:[D91334] ; comdlg32.ChooseFontA
00404FC8 - FF25 5814>jmp dword ptr ds:[D91458] ; comdlg32.GetOpenFileNameA
00404FCE - FF25 3013>jmp dword ptr ds:[D91330] ; comdlg32.GetFileTitleA
00404FD4 0000 add byte ptr ds:[eax],al
µ½Êý¾Ý´°¿ÚÖС£
00D91148 763300CE comdlg32.CommDlgExtendedError
00D9114C 00BA7405
00D91150 00BA73EE
00D91154 00BA751D
00D91158 763447B1 comdlg32.PageSetupDlgA
00D9115C 7C826E0C kernel32.GetDateFormatA
ÏòÉϻعö£¬µ½IAT START
00D91104 77EF6CA6 GDI32.DeleteDC
00D91108 00BA7446
00D9110C 00BA7519
00D91110 77EF5D0B GDI32.SetBkMode
00D91114 77D1DED3 USER32.SetWindowLongA
00D91118 7C822D88 kernel32.LocalLock
00D9111C 77F0E45F GDI32.SetViewportExtEx
¡£¡£¡£¡£¡£¡£
ÏòÏ»عö£¬µ½IAT END
00D91510 77D2190B USER32.CreateWindowExA
00D91514 00BA73B9
00D91518 77EFA8F7 GDI32.SetMapMode
00D9151C 00BA74E9
00D91520 00BA73F7
00D91524 7C822D47 kernel32.GetProfileStringA
IAT START£º00D91104
IAT END£º00D91524
Size: 00D91524-00D91104=420
Ñ¡ÔñIAT STARTµ½IAT END,µÈ´ýÕ³ÌùеÄIAT¡£
----------------------------------------------------------------------------------------------
´ò¿ªArmaDetach£¬ÍÏקδÍѿǵijÌÐòµ½ËüµÄÉÏÃ棬ÉÔºòÊýÃëÆô¶¯½áÊø¡£
×¢ÒâÉÏÃæÓÐ×Ó½ø³ÌPID£¬Èë¿Ú¸Ä¶¯µÄ4¸ö×Ö½Ú¡£
=============================
DONE!
Child process ID: 00000B14
Entry point: 00449C43
Original bytes: 558B
=============================
ÔÙдò¿ªÒ»¸öOD£¬Ñ¡ÔñÐÂÆô¶¯µÄ×Ó½ø³ÌPID=B14£¬¸½¼Ó¡£F9£¬F12£¬ÐÞ¸ÄÈë¿Ú×Ö½Ú¡£
7C921231 C3 retn
7C921232 8BFF mov edi,edi
7C921234 90 nop
7C921235 90 nop
F9£¬F12¡£ÐÞ¸ÄÈë¿Ú×Ö½Ú¡£
00449C43 >- EB FE jmp short ÂÒÐò+Ô¶?<ModuleEntryPoint>
00449C45 EC in al,dx
00449C46 6A FF push -1
00449C48 68 902F47>push ÂÒÐò+Ô¶?00472F90
00449C4D 68 809944>push ÂÒÐò+Ô¶?00449980
00449C52 64:A1 000>mov eax,dword ptr fs:[0]
Ctrl+E£¬ÐÞ¸ÄÈë¿Ú×Ö½Ú55 8B¡£
00449C43 > 55 push ebp
00449C44 8BEC mov ebp,esp
00449C46 6A FF push -1
00449C48 68 902F47>push ÂÒÐò+Ô¶?00472F90
00449C4D 68 809944>push ÂÒÐò+Ô¶?00449980
---------------------------------------------------------------------------------------------
--Magic Jump--
϶ϣºhe GetModuleHandleA¡£
µ½ÕâÀïÁË¡£
7C80B529 > 8BFF mov edi,edi
7C80B52B 55 push ebp
7C80B52C 8BEC mov ebp,esp
7C80B52E 837D 08 0>cmp dword ptr ss:[ebp+8],0
7C80B532 74 18 je short kernel32.7C80B54C
=====================================================================
0012FF38 00449D0B /CALL µ½ GetModuleHandleA À´×Ô ÂÒÐò+Ô¶?00449D05
0012FF3C 00000000 \pModule = NULL
0012E5F0 74683BEE /CALL µ½ GetModuleHandleA À´×Ô 74683BE8
0012E5F4 0012E5F8 \pModule = "D:\WINDOWS.0\system32\ntdll.dll"
0012E5F8 74683BEE /CALL µ½ GetModuleHandleA À´×Ô 74683BE8
0012E5FC 0012E600 \pModule = "D:\WINDOWS.0\system32\imm32.dll"
0012E544 74683BEE /CALL µ½ GetModuleHandleA À´×Ô 74683BE8
0012E548 0012E54C \pModule = "D:\WINDOWS.0\system32\KERNEL32"
0012ECFC 7365D4A4 /CALL µ½ GetModuleHandleA À´×Ô msctfime.7365D49E
0012ED00 0012ED04 \pModule = "D:\WINDOWS.0\system32\ntdll.dll"
0012EE4C 5D175394 /CALL µ½ GetModuleHandleA À´×Ô 5D17538E
0012EE50 5D1753E0 \pModule = "kernel32.dll"
0012EF0C 77F45BB0 /CALL µ½ GetModuleHandleA À´×Ô SHLWAPI.77F45BAA
0012EF10 77F44FF4 \pModule = "KERNEL32.DLL"
0012F73C 004348F3 /CALL µ½ GetModuleHandleA À´×Ô ÂÒÐò+Ô¶?004348ED
0012F740 00000000 \pModule = NULL
00129528 00BB7105 /CALL µ½ GetModuleHandleA À´×Ô 00BB70FF
0012952C 00BCBC1C \pModule = "kernel32.dll"
00129530 00BCCEC4 ASCII "VirtualAlloc"
00129528 00BB7122 /CALL µ½ GetModuleHandleA À´×Ô 00BB711C
0012952C 00BCBC1C \pModule = "kernel32.dll"
00129530 00BCCEB8 ASCII "VirtualFree"
0012928C 00BA5FC9 /CALL µ½ GetModuleHandleA À´×Ô 00BA5FC3
00129290 001293DC \pModule = "kernel32.dll"
µ½ÁË£¬È¡Ïû¶Ïµã£¬Alt+F9·µ»Ø¡£
00BA5FC9 8B0D AC40>mov ecx,dword ptr ds:[BD40AC]
00BA5FCF 89040E mov dword ptr ds:[esi+ecx],eax
00BA5FD2 A1 AC40BD>mov eax,dword ptr ds:[BD40AC]
00BA5FD7 391C06 cmp dword ptr ds:[esi+eax],ebx
00BA5FDA 75 16 jnz short 00BA5FF2
00BA5FDC 8D85 B4FE>lea eax,dword ptr ss:[ebp-14C]
00BA5FE2 50 push eax
00BA5FE3 FF15 BC62>call dword ptr ds:[BC62BC]
00BA5FE9 8B0D AC40>mov ecx,dword ptr ds:[BD40AC]
00BA5FEF 89040E mov dword ptr ds:[esi+ecx],eax
00BA5FF2 A1 AC40BD>mov eax,dword ptr ds:[BD40AC]
00BA5FF7 391C06 cmp dword ptr ds:[esi+eax],ebx
00BA5FFA 0F84 2F01>je 00BA612F ; Magic Jump£¬¸Äjmp£¡
00BA6000 33C9 xor ecx,ecx
00BA6002 8B07 mov eax,dword ptr ds:[edi]
00BA6004 3918 cmp dword ptr ds:[eax],ebx
00BA6006 74 06 je short 00BA600E
----------------------------------------------------------------------------------------------
--OEP--
϶ÏBP GetCurrentThreadId¡£
7C809737 > 64:A1 180>mov eax,dword ptr fs:[18]
7C80973D 8B40 24 mov eax,dword ptr ds:[eax+24]
7C809740 C3 retn
=====================================================================
00128B34 66001E3A /CALL µ½ GetCurrentThreadId À´×Ô 66001E34
00128B38 00000001
00128B3C 66001C1E ·µ»Øµ½ 66001C1E À´×Ô 66001DE6
00128B40 66001B64 ·µ»Øµ½ 66001B64 À´×Ô 66001B90
00128B14 66003505 /CALL µ½ GetCurrentThreadId À´×Ô 660034FF
00128B18 00000000
00128B1C 6610E470
0012F648 746908FE /CALL µ½ GetCurrentThreadId À´×Ô MSCTF.746908F8
0012F64C 00000004
0012F650 00050004
0012F620 7468FA53 /CALL µ½ GetCurrentThreadId À´×Ô MSCTF.7468FA4D
0012F624 00000000
0012F648 746908FE /CALL µ½ GetCurrentThreadId À´×Ô MSCTF.746908F8
0012F64C 00000004
0012F650 00050004
0012F648 746908FE /CALL µ½ GetCurrentThreadId À´×Ô MSCTF.746908F8
0012F64C 00000004
0012F650 00050004
0012F6A0 77D6B4E2 /CALL µ½ GetCurrentThreadId À´×Ô USER32.77D6B4DC
0012F6A4 0012F6AC
0012F6A8 0072A768
0012F720 00BA63D4 /CALL µ½ GetCurrentThreadId À´×Ô 00BA63CE
0012F724 00000000
0012F728 00000164
µ½ÁË£¬È¡Ïû¶Ïµã£¬Alt+F9·µ»Ø¡£
00BA63D4 50 push eax
00BA63D5 FF75 FC push dword ptr ss:[ebp-4]
00BA63D8 E8 05000000 call 00BA63E2
00BA63DD 83C4 0C add esp,0C
00BA63E0 C9 leave
00BA63E1 C3 retn
¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
À´µ½ÕâÀï
00BBF9A5 030D FC00BD00 add ecx,dword ptr ds:[BD00FC]
00BBF9AB 8B17 mov edx,dword ptr ds:[edi]
00BBF9AD 85D2 test edx,edx
00BBF9AF 75 18 jnz short 00BBF9C9
00BBF9B1 FF77 18 push dword ptr ds:[edi+18]
00BBF9B4 FF77 14 push dword ptr ds:[edi+14]
00BBF9B7 FF77 10 push dword ptr ds:[edi+10]
00BBF9BA 8B50 60 mov edx,dword ptr ds:[eax+60]
00BBF9BD 3350 44 xor edx,dword ptr ds:[eax+44]
00BBF9C0 3350 1C xor edx,dword ptr ds:[eax+1C]
00BBF9C3 2BCA sub ecx,edx
00BBF9C5 FFD1 call ecx
00BBF9C7 EB 1D jmp short 00BBF9E6
00BBF9C9 83FA 01 cmp edx,1
00BBF9CC 75 1B jnz short 00BBF9E9
00BBF9CE FF77 04 push dword ptr ds:[edi+4]
00BBF9D1 FF77 08 push dword ptr ds:[edi+8]
00BBF9D4 6A 00 push 0
00BBF9D6 FF77 0C push dword ptr ds:[edi+C]
00BBF9D9 8B50 60 mov edx,dword ptr ds:[eax+60]
00BBF9DC 3350 44 xor edx,dword ptr ds:[eax+44]
00BBF9DF 3350 1C xor edx,dword ptr ds:[eax+1C]
00BBF9E2 2BCA sub ecx,edx
00BBF9E4 FFD1 call ecx ; ÀïÃæ¾ÍÊÇOEP£¬½øÈ¥¿´£¡
00BBF9E6 8945 E4 mov dword ptr ss:[ebp-1C],eax
00BBF9E9 8B45 E4 mov eax,dword ptr ss:[ebp-1C]
½øÀ´¿´£¬ÊÇ°É¡£
004010CC 55 push ebp ; OEP£¡
004010CD 8BEC mov ebp,esp
004010CF 83EC 44 sub esp,44
004010D2 56 push esi
004010D3 FF15 E4634000 call dword ptr ds:[4063E4] ;
kernel32.GetCommandLineA
004010D9 8BF0 mov esi,eax
004010DB 8A00 mov al,byte ptr ds:[eax]
004010DD 3C 22 cmp al,22
004010DF 75 1B jnz short TEST-2.004010FC
----------------------------------------------------------------------------------------------
--ÕÒµ½¸É¾»µÄIAT--
ÔÚ¡°ÃüÁÖмüÈë¡°? USER32.DispatchMessageA¡±£¬»Ø³µ¡£
Alt+Mµ½ÄÚ´æ´°¿Ú, Ctrl+B£¬ËÑË÷¡°ÃüÁÐÐÓұߣ¬HEX£ºXXXXXXXX
OK£¬ËÑË÷¡£
Alt+Cµ½CPU´°¿Ú, Ctrl+G£º00D81930 ת´æ´°¿ÚÊ×ÐеØÖ·¡£
ÓÒ¼ü-->ÔÚÊý¾Ý´°¿Ú¸úËæ-->Ñ¡Ôñ²¿·Ö£¬ÔÚÊý¾Ý´°¿ÚÏòÉϻعö£¬ÕÒµ½IAT
ÔÚÊý¾Ý´°¿ÚÏòÉϻعö£¬ÕÒµ½IAT START
00D8194C 77EF6CA6 GDI32.DeleteDC
00D81950 00BA7446
00D81954 00BA7519
00D81958 77EF5D0B GDI32.SetBkMode
00D8195C 77D1DED3 USER32.SetWindowLongA
00D81960 7C822D88 kernel32.LocalLock
00D81964 77F0E45F GDI32.SetViewportExtEx
¡£¡£¡£¡£¡£¡£
ÔÚÊý¾Ý´°¿ÚÏòÏ»عö£¬ÕÒµ½IAT END
00D81D60 77EFA8F7 GDI32.SetMapMode
00D81D64 00BA74E9
00D81D68 00BA73F7
00D81D6C 7C822D47 kernel32.GetProfileStringA
00D81D70 7C827778 kernel32._lcreat
IAT START£º00D8194C
IAT END£º00D81D70
Size: 00D81D70-00D8194C=424
Ñ¡ÔñIAT STARTµ½IAT END,¶þ½øÖƸ´ÖÆIAT¡£
----------------------------------------------------------------------------------------------
--IAT Elimination + Code SplicingÐÞ¸´--
µ½ÁíÒ»¸öOD£¬¼´¸½¼Ó×Ó½ø³Ì£¬Ñ¡ÔñIAT¿ªÊ¼µ½IAT½áÊøµÄ²¿·Ö¶þ½øÖÆÕ³Ìù
ÎÒÃÇÒѾÕÒµ½²¢ÖжÏÔÚOEP´¦£¬¿ªÊ¼½â¾öIAT Elimination+code splicingÁË¡£
Alt+M£¬ ´ò¿ªÄÚ´æ´°¿Ú£¬
ÄÚ´æÓ³É䣬ÏîÄ¿ 23
µØÖ·=00401000
´óС=00004000 (16384.)
ÎïÖ÷=IAT+SP 00400000
Çø¶Î=.text
ÀàÐÍ=Imag 01001002
·ÃÎÊ=R
³õʼ·ÃÎÊ=RWE
µã·ÃÎÊ---->ÅÅÐò,ÕÒµÚÒ»¸öÀàÐÍΪpriv ·ÃÎÊ=RWEµÄÏîÄ¿¡£
ÄÚ´æÓ³É䣬ÏîÄ¿ 52
µØÖ·=01E20000
´óС=00012000 (73728.)
ÎïÖ÷= 01E20000 £¨×ÔÉí£©
Çø¶Î=
ÀàÐÍ=Priv 00021020
·ÃÎÊ=R E
³õʼ·ÃÎÊ=RWE
´ò¿ªarminline0.7¡£
[sleiv] process ID = ¿´Îļþ-->¸½¼Ó-->ID
Start Of Target Code = 00401000
Length Of Target Code = 00004000
ÔÚArmInlineµÄCode SplicingÑ¡ÏîÌíÈ룺
===================================
Start Of Spliced Code = 01E20000
Length Of spliced Code = 00012000
µã¡°remove splicing¡±¡£
Patch succesfulÐÞ¸´³É¹¦¡£
-----------------------------------
ÔÚImport EliminationÑ¡ÏîÌíÈ룺
Base Of Existing IAT=00D91104
Length Of Existing IAT=424
New Base RVA Of IAT=497000
µã¡°rebase IAT¡±¡£
IAT EliminationÐÞ¸´³É¹¦¡£
===================================
´ò¿ªloardpe Ñ¡Ôñantitracks dump ÍêÕûת´æ¡£
ÔÙ´ò¿ª importrec1.6 Ñ¡Ôñantitracks
ÌîOEP=10CC, RVA=97000 , Size=500.
getimport»ñÈ¡ÊäÈë±í£¬cutÎÞЧº¯Êý£¬ÓÐ138¸öÖ¸Õë¡£
fixdump ÐÞ¸´×¥È¡Îļþ£¬±£´æΪdump.exe¡£
ÓÃPeiD¿´ÎªMicrosoft Visual C++ 6.0 SPx Method¡£
----------------------------------------------------------------------------------------------
OK£¬½áÊø¡£
Ϊ·½±ãÅóÓÑÃÇÁ·ÊÖ£¬¸½ÉϼӿǼÇʱ¾¡£