- UID
- 37363
注册时间2007-11-5
阅读权限20
最后登录1970-1-1
以武会友
该用户从未签到
|
软件下载地址:http://www.skycn.com/soft/29456.html
下载后是最新版 V4.80版的。
加壳类型:PECompact 2.x -> Jeremy Collake
脱壳后是:Borland Delphi 6.0 - 7.0
先运行一下原程序,随便输入注册名和注册码,提示“注册失败”!
手头没工具脱,只好手工了,利用ESP定律来脱。好用OD装入软件,程序停在:
00401000 > B8 68816E00 MOV EAX,ssQss.006E8168
00401005 50 PUSH EAX
00401006 64:FF35 0000000>PUSH DWORD PTR FS:[0]
0040100D 64:8925 0000000>MOV DWORD PTR FS:[0],ESP
00401014 33C0 XOR EAX,EAX
00401016 8908 MOV DWORD PTR DS:[EAX],ECX
00401018 50 PUSH EAX
00401019 45 INC EBP
0040101A 43 INC EBX
0040101B 6F OUTS DX,DWORD PTR ES:[EDI] ; I/O 命令
0040101C 6D INS DWORD PTR ES:[EDI],DX ; I/O 命令
0040101D 70 61 JO SHORT ssQss.00401080
0040101F 637432 00 ARPL WORD PTR DS:[EDX+ESI],SI
00401023 87B1 C7F98E13 XCHG DWORD PTR DS:[ECX+138EF9C7],ESI
00401029 FC CLD
0040102A C6 ??? ; 未知命令
..........................................................
ESP 0012FFC4
两次F8看到:
ESP 0012FFC0
利用ESP定律下 HR 0012FFC0 f9运行,再Shift+F9后程序到:
7C957826 3B45 F8 CMP EAX,DWORD PTR SS:[EBP-8]
7C957829 72 09 JB SHORT ntdll.7C957834
7C95782B 3B45 F4 CMP EAX,DWORD PTR SS:[EBP-C]
7C95782E ^ 0F82 F731FFFF JB ntdll.7C94AA2B
7C957834 50 PUSH EAX
7C957835 E8 67000000 CALL ntdll.7C9578A1
7C95783A 84C0 TEST AL,AL
7C95783C ^ 0F84 E931FFFF JE ntdll.7C94AA2B
7C957842 F605 5AC3997C 8>TEST BYTE PTR DS:[7C99C35A],80
7C957849 0F85 20720100 JNZ ntdll.7C96EA6F
7C95784F FF73 04 PUSH DWORD PTR DS:[EBX+4]
7C957852 8D45 EC LEA EAX,DWORD PTR SS:[EBP-14]
7C957855 50 PUSH EAX
7C957856 FF75 0C PUSH DWORD PTR SS:[EBP+C]
7C957859 53 PUSH EBX
7C95785A 56 PUSH ESI
7C95785B E8 F3BEFCFF CALL ntdll.7C923753
7C957860 F605 5AC3997C 8>TEST BYTE PTR DS:[7C99C35A],80
.....................
一路F8:
006E8222 8BC6 MOV EAX,ESI ; ssQss.006306A0
006E8224 5A POP EDX
006E8225 5E POP ESI
006E8226 5F POP EDI
006E8227 59 POP ECX
006E8228 5B POP EBX
006E8229 5D POP EBP
006E822A FFE0 JMP EAX ;到这里继续F8后即可到达OEP了
006E822C A0 06630050 MOV AL,BYTE PTR DS:[50006306]
006E8231 826E 00 84 SUB BYTE PTR DS:[ESI],-7C
006E8235 826E 00 48 SUB BYTE PTR DS:[ESI],48
006E8239 826E 00 4C SUB BYTE PTR DS:[ESI],4C
006E823D 826E 00 00 SUB BYTE PTR DS:[ESI],0
006E8241 0000 ADD BYTE PTR DS:[EAX],AL
006E8243 0000 ADD BYTE PTR DS:[EAX],AL
006E8245 0000 ADD BYTE PTR DS:[EAX],AL
006E8247 0000 ADD BYTE PTR DS:[EAX],AL
006E8249 0000 ADD BYTE PTR DS:[EAX],AL
006E824B 0000 ADD BYTE PTR DS:[EAX],AL
006E824D 0000 ADD BYTE PTR DS:[EAX],AL
..............................................
在 006E822A FFE0 JMP EAX F8后:
......................................................
006306A0 55 PUSH EBP
006306A1 8BEC MOV EBP,ESP
006306A3 83C4 F0 ADD ESP,-10
006306A6 B8 98FE6200 MOV EAX,ssQss.0062FE98
006306AB E8 9C67DDFF CALL ssQss.00406E4C
006306B0 A1 F8C76300 MOV EAX,DWORD PTR DS:[63C7F8]
006306B5 8B00 MOV EAX,DWORD PTR DS:[EAX]
006306B7 E8 CC6EE5FF CALL ssQss.00487588
006306BC 8B0D 64C56300 MOV ECX,DWORD PTR DS:[63C564] ; ssQss.006551C8
006306C2 A1 F8C76300 MOV EAX,DWORD PTR DS:[63C7F8]
006306C7 8B00 MOV EAX,DWORD PTR DS:[EAX]
006306C9 8B15 70AA6000 MOV EDX,DWORD PTR DS:[60AA70] ; ssQss.0060AABC
006306CF E8 CC6EE5FF CALL ssQss.004875A0
006306D4 A1 F8C76300 MOV EAX,DWORD PTR DS:[63C7F8]
006306D9 8B00 MOV EAX,DWORD PTR DS:[EAX]
006306DB E8 406FE5FF CALL ssQss.00487620
006306E0 E8 573FDDFF CALL ssQss.0040463C
006306E5 8D40 00 LEA EAX,DWORD PTR DS:[EAX]
006306E8 0000 ADD BYTE PTR DS:[EAX],AL
.................................................
好了,可以脱壳保存文件了,右键选“用ollyDump脱壳调试进程”后,再“脱壳“按钮”保存文件为:
un.exe。
运行脱壳的文件,唉!一运行就退出,看来有自校验了,本人是新人,没办法去掉自校验,只好用笨方法
了(高人不会笑哦)。
用OD装入脱壳后的文件un.exe,右键选择“超级字符串参考”,再选择“查找UNICODE”(不选择“查找
ASCII”),在打开的窗口中,查找“注册失败”,找到后,双击程序到这里:
0005F7248 |. 8B55 F4 MOV EDX,DWORD PTR SS:[EBP-C]
005F724B |. A1 54516500 MOV EAX,DWORD PTR DS:[655154]
005F7250 |. 83C0 10 ADD EAX,10
005F7253 |. E8 30D5E0FF CALL un.00404788
005F7258 |. A1 54516500 MOV EAX,DWORD PTR DS:[655154]
005F725D |. E8 06BBFCFF CALL un.005C2D68 ;关键CALL
005F7262 |. 84C0 TEST AL,AL
005F7264 |. 74 1F JE SHORT un.005F7285
005F7266 |. A1 B0CB6300 MOV EAX,DWORD PTR DS:[63CBB0]
005F726B |. 8B15 54516500 MOV EDX,DWORD PTR DS:[655154]
005F7271 |. 8B52 08 MOV EDX,DWORD PTR DS:[EDX+8]
005F7274 |. E8 0FD5E0FF CALL un.00404788
005F7279 |. C783 4C020000>MOV DWORD PTR DS:[EBX+24C],1
005F7283 |. EB 0A JMP SHORT un.005F728F
005F7285 |> B8 C0725F00 MOV EAX,un.005F72C0 ; 注册失败!
005F728A |. E8 11F4F7FF CALL un.005766A0
005F728F |> 33C0 XOR EAX,EAX
005F7291 |. 5A POP EDX
005F7292 |. 59 POP ECX
005F7293 |. 59 POP ECX
005F7294 |. 64:8910 MOV DWORD PTR FS:[EAX],EDX
005F7297 |. 68 B1725F00 PUSH un.005F72B1
005F729C |> 8D45 F4 LEA EAX,DWORD PTR SS:[EBP-C]
005F729F |. BA 03000000 MOV EDX,3
005F72A4 |. E8 AFD4E0FF CALL un.00404758
005F72A9 \. C3 RETN
005F72AA .^ E9 45CEE0FF JMP un.004040F4
005F72AF .^ EB EB JMP SHORT un.005F729C
005F72B1 . 5B POP EBX
005F72B2 . 8BE5 MOV ESP,EBP
................................................
往上面看,我们就可以看到关键语句了:
005F725D |. E8 06BBFCFF CALL un.005C2D68 ;关键CALL
005F7262 |. 84C0 TEST AL,AL
记住关键CALL的地址,我这里是:005F725D 好了准备工作完了。
再用OD装入未脱壳的程序,用上面的方法让程序到达OEP处:
006306A0 55 PUSH EBP
006306A1 8BEC MOV EBP,ESP
006306A3 83C4 F0 ADD ESP,-10
006306A6 B8 98FE6200 MOV EAX,ssQss.0062FE98
006306AB E8 9C67DDFF CALL ssQss.00406E4C
006306B0 A1 F8C76300 MOV EAX,DWORD PTR DS:[63C7F8]
006306B5 8B00 MOV EAX,DWORD PTR DS:[EAX]
006306B7 E8 CC6EE5FF CALL ssQss.00487588
006306BC 8B0D 64C56300 MOV ECX,DWORD PTR DS:[63C564] ; ssQss.006551C8
006306C2 A1 F8C76300 MOV EAX,DWORD PTR DS:[63C7F8]
006306C7 8B00 MOV EAX,DWORD PTR DS:[EAX]
006306C9 8B15 70AA6000 MOV EDX,DWORD PTR DS:[60AA70] ; ssQss.0060AABC
006306CF E8 CC6EE5FF CALL ssQss.004875A0
006306D4 A1 F8C76300 MOV EAX,DWORD PTR DS:[63C7F8]
006306D9 8B00 MOV EAX,DWORD PTR DS:[EAX]
006306DB E8 406FE5FF CALL ssQss.00487620
006306E0 E8 573FDDFF CALL ssQss.0040463C
006306E5 8D40 00 LEA EAX,DWORD PTR DS:[EAX]
006306E8 0000 ADD BYTE PTR DS:[EAX],AL
按 Ctrl+G 后输入刚才记下的关键CALL的地址:005F725D 然后下断,F9运行,输入注册名和假注册号。
我输入的是:
注册名:rtwbp 注册码:787878787878787878
按注册按钮后,程序在005F725D被断下:
005F725D E8 06BBFCFF CALL ssQss.005C2D68 ;在这里按F7跟进
005F7262 84C0 TEST AL,AL
005F7264 74 1F JE SHORT ssQss.005F7285
005F7266 A1 B0CB6300 MOV EAX,DWORD PTR DS:[63CBB0]
005F726B 8B15 54516500 MOV EDX,DWORD PTR DS:[655154]
005F7271 8B52 08 MOV EDX,DWORD PTR DS:[EDX+8]
005F7274 E8 0FD5E0FF CALL ssQss.00404788
005F7279 C783 4C020000 0>MOV DWORD PTR DS:[EBX+24C],1
005F7283 EB 0A JMP SHORT ssQss.005F728F
005F7285 B8 C0725F00 MOV EAX,ssQss.005F72C0
005F728A E8 11F4F7FF CALL ssQss.005766A0
005F728F 33C0 XOR EAX,EAX
005F7291 5A POP EDX
005F7292 59 POP ECX
005F7293 59 POP ECX
005F7294 64:8910 MOV DWORD PTR FS:[EAX],EDX
005F7297 68 B1725F00 PUSH ssQss.005F72B1
005F729C 8D45 F4 LEA EAX,DWORD PTR SS:[EBP-C]
005F729F BA 03000000 MOV EDX,3
005F72A4 E8 AFD4E0FF CALL ssQss.00404758
.................................................
F7后:
005C2D68 55 PUSH EBP ;一路F8,并注意信息窗口的变化
005C2D69 8BEC MOV EBP,ESP
005C2D6B 33C9 XOR ECX,ECX
005C2D6D 51 PUSH ECX
005C2D6E 51 PUSH ECX
005C2D6F 51 PUSH ECX
005C2D70 51 PUSH ECX
005C2D71 53 PUSH EBX
005C2D72 8BD8 MOV EBX,EAX
005C2D74 33C0 XOR EAX,EAX
005C2D76 55 PUSH EBP
005C2D77 68 EF2D5C00 PUSH ssQss.005C2DEF
005C2D7C 64:FF30 PUSH DWORD PTR FS:[EAX]
005C2D7F 64:8920 MOV DWORD PTR FS:[EAX],ESP
005C2D82 8D55 FC LEA EDX,DWORD PTR SS:[EBP-4]
005C2D85 8BC3 MOV EAX,EBX
005C2D87 E8 3CFCFFFF CALL ssQss.005C29C8
005C2D8C 8B55 FC MOV EDX,DWORD PTR SS:[EBP-4]
005C2D8F 8B43 0C MOV EAX,DWORD PTR DS:[EBX+C]
005C2D92 E8 7965E4FF CALL ssQss.00409310
005C2D97 85C0 TEST EAX,EAX
005C2D99 75 31 JNZ SHORT ssQss.005C2DCC
005C2D9B 8D55 F4 LEA EDX,DWORD PTR SS:[EBP-C]
005C2D9E 8BC3 MOV EAX,EBX
005C2DA0 E8 17FDFFFF CALL ssQss.005C2ABC
005C2DA5 8B45 F4 MOV EAX,DWORD PTR SS:[EBP-C]
005C2DA8 8D55 F8 LEA EDX,DWORD PTR SS:[EBP-8]
005C2DAB E8 803CFBFF CALL ssQss.00576A30
005C2DB0 8B45 F8 MOV EAX,DWORD PTR SS:[EBP-8]
005C2DB3 50 PUSH EAX
005C2DB4 8D55 F0 LEA EDX,DWORD PTR SS:[EBP-10]
005C2DB7 8B43 10 MOV EAX,DWORD PTR DS:[EBX+10]
005C2DBA E8 713CFBFF CALL ssQss.00576A30
005C2DBF 8B45 F0 MOV EAX,DWORD PTR SS:[EBP-10]
005C2DC2 5A POP EDX
005C2DC3 E8 4865E4FF CALL ssQss.00409310
005C2DC8 85C0 TEST EAX,EAX
005C2DCA 74 04 JE SHORT ssQss.005C2DD0
005C2DCC 33C0 XOR EAX,EAX
005C2DCE EB 02 JMP SHORT ssQss.005C2DD2
005C2DD0 B0 01 MOV AL,1
005C2DD2 8BD8 MOV EBX,EAX
..................................................
005C2DA0 E8 17FDFFFF CALL ssQss.005C2ABC ;注意,这里的CALL
005C2DA5 8B45 F4 MOV EAX,DWORD PTR SS:[EBP-C]
005C2DA8 8D55 F8 LEA EDX,DWORD PTR SS:[EBP-8]
005C2DAB E8 803CFBFF CALL ssQss.00576A30
005C2DB0 8B45 F8 MOV EAX,DWORD PTR SS:[EBP-8]
005C2DB3 50 PUSH EAX
....................................
在005C2DA0的CALL按过F8后,我们可以在信息窗口中看到如下的内容了:
0012ED40 01AE43A4 ASCII "2363-3411-6416" ;这里是注册码了
0012ED44 00000000
0012ED48 01AE430C ASCII "7316702032" ;这里是机器码
0012ED4C /0012ED70
0012ED50 |005F7262 返回到 ssQss.005F7262 来自 ssQss.005C2D68
0012ED54 |0012ED88 指向下一个 SEH 记录的指针
0012ED58 |005F72AA SE 处理器
0012ED5C |0012ED70
0012ED60 |01AE8000
0012ED64 |01AE42D8 ASCII "787878787878787878"
0012ED68 |01AE7A94 ASCII "7316702032"
0012ED6C |01AE7A80 ASCII "rtwbp"
0012ED70 ]0012EDA0
.................................................
哈哈:2363-3411-6416 就是真正的注册码了。
重新输入注册码:2363-3411-6416 显示注册成功!
整理一下:
注册名:rtwbp
机器码:7316702032
注册码:2363-3411-6416
这个程序脱壳后的自校验,我研究了好几天了,一直搞不定,还望高手能指点! |
|