00496658 /$ 53 PUSH EBX
00496659 |. 56 PUSH ESI
0049665A |. 57 PUSH EDI
0049665B |. 55 PUSH EBP
0049665C |. 81C4 04F0FFF>ADD ESP, -0FFC
00496662 |. BD 98914C00 MOV EBP, old_Olly.004C9198 ; ASCII "*.dll"
00496667 |. 50 PUSH EAX
00496668 |. 81C4 B0FBFFF>ADD ESP, -450
0049666E |. 68 004B0000 PUSH 4B00 ; /Arg3 = 00004B00
00496673 |. 6A 00 PUSH 0 ; |Arg2 = 00000000
00496675 |. 68 B40A4F00 PUSH old_Olly.004F0AB4 ; |Arg1 = 004F0AB4
0049667A |. E8 21CF0000 CALL old_Olly.004A35A0 ; \old_Olly.004A35A0
0049667F |. 33C0 XOR EAX, EAX
00496681 |. 83C4 0C ADD ESP, 0C
00496684 |. A3 B4554F00 MOV DWORD PTR DS:[4F55B4], EAX ; 4F55B4是保存插件个数量的地址
00496689 |. 33C0 XOR EAX, EAX
0049668B |. 83C9 FF OR ECX, FFFFFFFF
0049668E |. BF 703A4D00 MOV EDI, old_Olly.004D3A70
00496693 |. F2:AE REPNE SCAS BYTE PTR ES:[EDI]
00496695 |. F7D1 NOT ECX
00496697 |. 2BF9 SUB EDI, ECX
00496699 |. 8DB424 0C110>LEA ESI, DWORD PTR SS:[ESP+110C]
004966A0 |. 87F7 XCHG EDI, ESI
004966A2 |. 8BD1 MOV EDX, ECX
004966A4 |. 8BC7 MOV EAX, EDI
004966A6 |. C1E9 02 SHR ECX, 2
004966A9 |. 8D8424 0C110>LEA EAX, DWORD PTR SS:[ESP+110C]
004966B0 |. F3:A5 REP MOVS DWORD PTR ES:[EDI], DWORD PTR DS:[ESI]
004966B2 |. 8BCA MOV ECX, EDX
004966B4 |. 83E1 03 AND ECX, 3
004966B7 |. F3:A4 REP MOVS BYTE PTR ES:[EDI], BYTE PTR DS:[ESI]
004966B9 |. 50 PUSH EAX
004966BA |. E8 15D00000 CALL old_Olly.004A36D4
004966BF |. 59 POP ECX
004966C0 |. 8BF8 MOV EDI, EAX
004966C2 |. 85FF TEST EDI, EDI
004966C4 |. 7E 17 JLE SHORT old_Olly.004966DD
004966C6 |. 33C0 XOR EAX, EAX
004966C8 |. 8A843C 0B110>MOV AL, BYTE PTR SS:[ESP+EDI+110B]
004966CF |. 83F8 5C CMP EAX, 5C
004966D2 |. 74 09 JE SHORT old_Olly.004966DD
004966D4 |. C6843C 0C110>MOV BYTE PTR SS:[ESP+EDI+110C], 5C
004966DC |. 47 INC EDI
004966DD |> 8D9424 0C110>LEA EDX, DWORD PTR SS:[ESP+110C]
004966E4 |. 8BF5 MOV ESI, EBP
004966E6 |. 03FA ADD EDI, EDX
004966E8 |. 57 PUSH EDI
004966E9 |. 8BC7 MOV EAX, EDI
004966EB |. A5 MOVS DWORD PTR ES:[EDI], DWORD PTR DS:[ESI]
004966EC |. 66:A5 MOVS WORD PTR ES:[EDI], WORD PTR DS:[ESI]
004966EE |. 5F POP EDI
004966EF |. 8D9424 10130>LEA EDX, DWORD PTR SS:[ESP+1310]
004966F6 |. 52 PUSH EDX ; /pFindFileData
004966F7 |. 8D8C24 10110>LEA ECX, DWORD PTR SS:[ESP+1110] ; |
004966FE |. 51 PUSH ECX ; |FileName
004966FF |. E8 F0880100 CALL <JMP.&KERNEL32.FindFirstFileA> ; \FindFirstFileA
00496704 |. 894424 04 MOV DWORD PTR SS:[ESP+4], EAX
00496708 |. 837C24 04 FF CMP DWORD PTR SS:[ESP+4], -1
0049670D |. 75 07 JNZ SHORT old_Olly.00496716
0049670F |. 33C0 XOR EAX, EAX
00496711 |. E9 2A040000 JMP old_Olly.00496B40
00496716 |> E8 758C0100 CALL <JMP.&USER32.CreateMenu> ; [CreateMenu
0049671B |. 894424 08 MOV DWORD PTR SS:[ESP+8], EAX
0049671F |. 837C24 08 00 CMP DWORD PTR SS:[ESP+8], 0
00496724 |. 75 07 JNZ SHORT old_Olly.0049672D
00496726 |. 33C0 XOR EAX, EAX
00496728 |. E9 13040000 JMP old_Olly.00496B40
0049672D |> 33F6 /XOR ESI, ESI
0049672F |. 6A 00 |PUSH 0
00496731 |. 8D8424 14120>|LEA EAX, DWORD PTR SS:[ESP+1214]
00496738 |. 50 |PUSH EAX
00496739 |. 6A 00 |PUSH 0
0049673B |. 6A 00 |PUSH 0
0049673D |. 8D9424 4C130>|LEA EDX, DWORD PTR SS:[ESP+134C]
00496744 |. 52 |PUSH EDX
00496745 |. E8 72EA0000 |CALL old_Olly.004A51BC
0049674A |. 83C4 14 |ADD ESP, 14
0049674D |. 8D4D 06 |LEA ECX, DWORD PTR SS:[EBP+6]
00496750 |. 51 |PUSH ECX ; /Arg2
00496751 |. 8D8424 14120>|LEA EAX, DWORD PTR SS:[ESP+1214] ; |
00496758 |. 50 |PUSH EAX ; |Arg1
00496759 |. E8 5ED10000 |CALL old_Olly.004A38BC ; \old_Olly.004A38BC
0049675E |. 83C4 08 |ADD ESP, 8
00496761 |. 85C0 |TEST EAX, EAX
00496763 |. 0F84 6A03000>|JE old_Olly.00496AD3
00496769 |. 8D55 0C |LEA EDX, [ARG.2]
0049676C |. 52 |PUSH EDX ; /Arg2
0049676D |. 8D8C24 14120>|LEA ECX, DWORD PTR SS:[ESP+1214] ; |
00496774 |. 51 |PUSH ECX ; |Arg1
00496775 |. E8 42D10000 |CALL old_Olly.004A38BC ; \old_Olly.004A38BC
0049677A |. 83C4 08 |ADD ESP, 8
0049677D |. 85C0 |TEST EAX, EAX
0049677F |. 0F84 4E03000>|JE old_Olly.00496AD3
00496785 |. 33C0 |XOR EAX, EAX
00496787 |. 83C9 FF |OR ECX, FFFFFFFF
0049678A |. BF 703A4D00 |MOV EDI, old_Olly.004D3A70
0049678F |. 8DB424 0C110>|LEA ESI, DWORD PTR SS:[ESP+110C]
00496796 |. F2:AE |REPNE SCAS BYTE PTR ES:[EDI]
00496798 |. F7D1 |NOT ECX
0049679A |. 2BF9 |SUB EDI, ECX
0049679C |. 8BD1 |MOV EDX, ECX
0049679E |. 87F7 |XCHG EDI, ESI
004967A0 |. C1E9 02 |SHR ECX, 2
004967A3 |. 8BC7 |MOV EAX, EDI
004967A5 |. F3:A5 |REP MOVS DWORD PTR ES:[EDI], DWORD PTR DS:[ESI]
004967A7 |. 8BCA |MOV ECX, EDX
004967A9 |. 8D8424 0C110>|LEA EAX, DWORD PTR SS:[ESP+110C]
004967B0 |. 83E1 03 |AND ECX, 3
004967B3 |. F3:A4 |REP MOVS BYTE PTR ES:[EDI], BYTE PTR DS:[ESI]
004967B5 |. 50 |PUSH EAX
004967B6 |. E8 19CF0000 |CALL old_Olly.004A36D4
004967BB |. 59 |POP ECX
004967BC |. 8BF8 |MOV EDI, EAX
004967BE |. 85FF |TEST EDI, EDI
004967C0 |. 7E 17 |JLE SHORT old_Olly.004967D9
004967C2 |. 33C0 |XOR EAX, EAX
004967C4 |. 8A843C 0B110>|MOV AL, BYTE PTR SS:[ESP+EDI+110B]
004967CB |. 83F8 5C |CMP EAX, 5C
004967CE |. 74 09 |JE SHORT old_Olly.004967D9
004967D0 |. C6843C 0C110>|MOV BYTE PTR SS:[ESP+EDI+110C], 5C
004967D8 |. 47 |INC EDI
004967D9 |> 8D9424 0C110>|LEA EDX, DWORD PTR SS:[ESP+110C]
004967E0 |. 33C0 |XOR EAX, EAX
004967E2 |. 03FA |ADD EDI, EDX
004967E4 |. 83C9 FF |OR ECX, FFFFFFFF
004967E7 |. 57 |PUSH EDI
004967E8 |. 8BF7 |MOV ESI, EDI
004967EA |. 8DBC24 40130>|LEA EDI, DWORD PTR SS:[ESP+1340]
004967F1 |. F2:AE |REPNE SCAS BYTE PTR ES:[EDI]
004967F3 |. F7D1 |NOT ECX
004967F5 |. 2BF9 |SUB EDI, ECX
004967F7 |. 8BD1 |MOV EDX, ECX
004967F9 |. 87F7 |XCHG EDI, ESI
004967FB |. C1E9 02 |SHR ECX, 2
004967FE |. 8BC7 |MOV EAX, EDI
00496800 |. F3:A5 |REP MOVS DWORD PTR ES:[EDI], DWORD PTR DS:[ESI]
00496802 |. 8BCA |MOV ECX, EDX
00496804 |. 83E1 03 |AND ECX, 3
00496807 |. F3:A4 |REP MOVS BYTE PTR ES:[EDI], BYTE PTR DS:[ESI]
00496809 |. 5F |POP EDI
0049680A |. 8D8424 0C110>|LEA EAX, DWORD PTR SS:[ESP+110C]
00496811 |. 50 |PUSH EAX ; /FileName
00496812 |. E8 21890100 |CALL <JMP.&KERNEL32.LoadLibraryA> ; \LoadLibraryA
00496817 |. 8BF0 |MOV ESI, EAX ; 读取插件
00496819 |. 85F6 |TEST ESI, ESI
0049681B |. 0F84 B202000>|JE old_Olly.00496AD3
00496821 |. 8D45 14 |LEA EAX, [ARG.4]
00496824 |. 50 |PUSH EAX ; /ProcNameOrOrdinal
00496825 |. 56 |PUSH ESI ; |hModule
00496826 |. E8 65880100 |CALL <JMP.&KERNEL32.GetProcAddress> ; \GetProcAddress
0049682B |. 8BD8 |MOV EBX, EAX
0049682D |. 8D45 25 |LEA EAX, DWORD PTR SS:[EBP+25]
00496830 |. 50 |PUSH EAX ; /ProcNameOrOrdinal
00496831 |. 56 |PUSH ESI ; |hModule
00496832 |. E8 59880100 |CALL <JMP.&KERNEL32.GetProcAddress> ; \GetProcAddress
00496837 |. 8BF8 |MOV EDI, EAX
00496839 |. 85DB |TEST EBX, EBX
0049683B |. 0F84 9202000>|JE old_Olly.00496AD3
00496841 |. 85FF |TEST EDI, EDI
00496843 |. 0F84 8A02000>|JE old_Olly.00496AD3
00496849 |. C64424 0C 00 |MOV BYTE PTR SS:[ESP+C], 0
0049684E |. 8D4424 0C |LEA EAX, DWORD PTR SS:[ESP+C]
00496852 |. 50 |PUSH EAX
00496853 |. FFD3 |CALL EBX
00496855 |. 59 |POP ECX
00496856 |. 8BC8 |MOV ECX, EAX
00496858 |. 83F9 6A |CMP ECX, 6A
0049685B |. 7C 0C |JL SHORT old_Olly.00496869
0049685D |. 83F9 6E |CMP ECX, 6E
00496860 |. 7F 07 |JG SHORT old_Olly.00496869
00496862 |. 807C24 0C 00 |CMP BYTE PTR SS:[ESP+C], 0
00496867 |. 75 33 |JNZ SHORT old_Olly.0049689C
00496869 |> 8BC1 |MOV EAX, ECX
0049686B |. BB 64000000 |MOV EBX, 64
00496870 |. 99 |CDQ
00496871 |. F7FB |IDIV EBX
00496873 |. 52 |PUSH EDX ; /Arg6
00496874 |. 8BC1 |MOV EAX, ECX ; |
00496876 |. B9 64000000 |MOV ECX, 64 ; |
0049687B |. 99 |CDQ ; |
0049687C |. F7F9 |IDIV ECX ; |
0049687E |. 50 |PUSH EAX ; |Arg5
0049687F |. 8D8424 18120>|LEA EAX, DWORD PTR SS:[ESP+1218] ; |
00496886 |. 50 |PUSH EAX ; |Arg4
00496887 |. 8D55 36 |LEA EDX, DWORD PTR SS:[EBP+36] ; |
0049688A |. 52 |PUSH EDX ; |Arg3
0049688B |. 6A 00 |PUSH 0 ; |Arg2 = 00000000
0049688D |. 6A 00 |PUSH 0 ; |Arg1 = 00000000
0049688F |. E8 783DFCFF |CALL old_Olly._Addtolist ; \_Addtolist
00496894 |. 83C4 18 |ADD ESP, 18
00496897 |. E9 37020000 |JMP old_Olly.00496AD3
0049689C |> 8B1D B4554F0>|MOV EBX, DWORD PTR DS:[4F55B4] ; 读插件数量到ebx
004968A2 |. C1E3 03 |SHL EBX, 3 ; 问题就是这几行了
004968A5 |. 8D1C5B |LEA EBX, DWORD PTR DS:[EBX+EBX*2] ; 这里计算内存地址用来保存插件的信息
004968A8 |. 8D1C9B |LEA EBX, DWORD PTR DS:[EBX+EBX*4]
004968AB |. 8D1C9B |LEA EBX, DWORD PTR DS:[EBX+EBX*4]
004968AE |. 81C3 B40A4F0>|ADD EBX, old_Olly.004F0AB4 ; 如果插件数大于32这样就会把4F55B4这个用来保存数量的内存改写了
004968B4 |. 8933 |MOV DWORD PTR DS:[EBX], ESI
004968B6 |. 8D43 04 |LEA EAX, DWORD PTR DS:[EBX+4]
004968B9 |. 56 |PUSH ESI
004968BA |. 8BF0 |MOV ESI, EAX
004968BC |. 57 |PUSH EDI
004968BD |. 33C0 |XOR EAX, EAX
当4F55B4被改写了后当然不能正常读取插件的信息了
现在来修复一下
加一个新的段把 读写 4F0AB4 的地址改写到新段中问题就可解决
我在OllyDbg.V1.10聆风听雨汉化第二版的基础上修改好了一个版本大家测试一下吧
没上传权到这下吧
http://free.ys168.com/?freecat 脱壳学习里
1.修正插件文件数量超过32个文件时内存读出错的问题(改为最多100)
2.修改绝对路径问题,取当前OD目录中的 UDD,PLUGIN,LIB
(注:这三个目录可改 AutoPath.ini中的设置)
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课