用ArmadilloFindProtected12.exe查看目标程序的保护方式是
Debug-Blocker+CopyMem-II.
用OD载入
006A3243 >/$ 55 PUSH EBP //停在这里
006A3244 |. 8BEC MOV EBP,ESP
006A3246 |. 6A FF PUSH -1
006A3248 |. 68 40CF6C00 PUSH scking.006CCF40
006A324D |. 68 802F6A00 PUSH scking.006A2F80 ; SE 处理程序安装
006A3252 |. 64:A1 0000000>MOV EAX,DWORD PTR FS:[0]
006A3258 |. 50 PUSH EAX
忽略所有异常,隐藏OD 下断点
bp WaitForDebugEvent SHIFT+F9运行
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
7C85A27D 8BF0 MOV ESI,EAX
7C85A27F 56 PUSH ESI
7C85A280 8D45 98 LEA EAX,DWORD PTR SS:[EBP-68]
7C85A283 50 PUSH EAX
7C85A284 E8 9A520200 CALL <JMP.&ntdll.DbgUiWaitStateChange>
7C85A289 3D 01010000 CMP EAX,101
7C85A28E ^ 74 EF JE SHORT kernel32.7C85A27F
7C85A290 3D C0000000 CMP EAX,0C0
7C85A295 ^ 74 E8 JE SHORT kernel32.7C85A27F
7C85A297 85C0 TEST EAX,EAX
--------------------------------------------------------------------
堆载情况如下
0012DC8C 00693386 /CALL 到 WaitForDebugEvent 来自 scking.00693380
0012DC90 0012ED7C |pDebugEvent = 0012ED7C
0012DC94 000003E8 \Timeout = 1000. ms
0012DC98 7C930738 ntdll.7C930738
0012DC9C 00000000
----------------------------------------------------------------------
0012DC90 0012ED7C |pDebugEvent = 0012ED7C
在这里 鼠标又键 数据窗口跟随 一直到结束
取消上面的一个断点 下断点bp WriteProcessMemory
0012DC8C 00693386 /CALL 到 WaitForDebugEvent 来自 scking.00693380
在这里 鼠标又键 在返汇编窗口跟随
00693386 . 85C0 TEST EAX,EAX //停在这里
00693388 . 0F84 64270000 JE scking.00695AF2
0069338E . 8B85 FCFDFFFF MOV EAX,DWORD PTR SS:[EBP-204]
00693394 . 25 FF000000 AND EAX,0FF
00693399 . 85C0 TEST EAX,EAX
0069339B . 74 13 JE SHORT scking.006933B0
0069339D . 8B0D D0E36C00 MOV ECX,DWORD PTR DS:[6CE3D0]
006933A3 . 8379 20 00 CMP DWORD PTR DS:[ECX+20],0
006933A7 . 74 07 JE SHORT scking.006933B0
006933A9 . C685 FCFDFFFF>MOV BYTE PTR SS:[EBP-204],0
006933B0 > 68 88E26C00 PUSH scking.006CE288 ; /pCriticalSection = scking.006CE288
006933B5 . FF15 A4716C00 CALL DWORD PTR DS:[<&KERNEL32.EnterCriti>; \EnterCriticalSection
006933BB . 60 PUSHAD
006933BC . 33C0 XOR EAX,EAX
006933BE . 75 02 JNZ SHORT scking.006933C2
006933C0 . EB 15 JMP SHORT scking.006933D7
006933C2 > EB 33 JMP SHORT scking.006933F7
006933C4 C0 DB C0
006933C5 . 75 18 JNZ SHORT scking.006933DF
006933C7 . 7A 0C JPE SHORT scking.006933D5
006933C9 > 70 0E JO SHORT scking.006933D9
然后按 CTRL+F 查找 or eax,0FFFFFFF8
0069390A > \83BD CCF5FFFF>CMP DWORD PTR SS:[EBP-A34],0
00693911 . 0F8C A8020000 JL scking.00693BBF
00693917 . 8B8D CCF5FFFF MOV ECX,DWORD PTR SS:[EBP-A34]
0069391D . 3B0D D4E36C00 CMP ECX,DWORD PTR DS:[6CE3D4]
00693923 . 0F8D 96020000 JGE scking.00693BBF
00693929 . 8B95 40F6FFFF MOV EDX,DWORD PTR SS:[EBP-9C0]
0069392F . 81E2 FF000000 AND EDX,0FF
00693935 . 85D2 TEST EDX,EDX
00693937 . 0F84 AD000000 JE scking.006939EA
0069393D . 6A 00 PUSH 0
0069393F . 8BB5 CCF5FFFF MOV ESI,DWORD PTR SS:[EBP-A34]
00693945 . C1E6 04 SHL ESI,4
00693948 . 8B85 CCF5FFFF MOV EAX,DWORD PTR SS:[EBP-A34]
0069394E . 25 07000080 AND EAX,80000007
00693953 . 79 05 JNS SHORT scking.0069395A
00693955 . 48 DEC EAX
00693956 . 83C8 F8 OR EAX,FFFFFFF8//停在这里 向上看
下面的步骤 在
0069390A > \83BD CCF5FFFF>CMP DWORD PTR SS:[EBP-A34],0
F2下断后,SHIFT+F9运行到所选
堆栈 SS:[0012ED68]=00000000
跳转来自 0069374D, 00693903
这里应该把数据清0才对 奇怪的就是 这里的数据就是0
我脱了2天了 FLY大侠的魔法转换我已经脱了N次 每次都成功
为什么这里的数值是0?因为这里是0 所以影响我了我脱壳后无法正常运行的效果?。。。
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)