文章标题】: 某剑侠2外挂的登陆界面的骗取
【文章作者】: wenxinoooo
【软件名称】: jx2**
【下载地址】: http://www.ipk.cn/soft/10043.htm
【加壳方式】: UPX 0.89.6 - 1.02 / 1.05 - 1.24 (Delphi) stub -> Markus & Laszlo
【编写语言】: Borland C++ 1999
【使用工具】: OD
【操作平台】: WinXP
【软件介绍】: 目前很好的剑侠2外挂
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------
【详细过程】
一、壳UPX 0.89.6 - 1.02 / 1.05 - 1.24 (Delphi) stub -> Markus & Laszlo
OEP 00401000
二、 脱壳后无法运行,脱壳后是Borland C++ 1999,带壳调试.
三、OD载入,F9运行,F12暂停,ALT+F9返回程序.(或ESP定律hr 0012ffa4)查找ASCII,
地址=00411160
反汇编=MOV EDX,jx2**.004DFA44
文本字串=成功登陆,帐号剩余时间:
双击,向上找CALL的首部
00410A48 55 PUSH EBP------------------------->CALL的首部,F2下断,F9运行,断下后ASCII "67.159.34.162
00410A49 8BEC MOV EBP,ESP
00410A4B 81C4 18FDFFFF ADD ESP,-2E8
00410A51 53 PUSH EBX
00410A52 56 PUSH ESI
00410A53 57 PUSH EDI
00410A54 898D 64FFFFFF MOV DWORD PTR SS:[EBP-9C],ECX
00410A5A 8995 68FFFFFF MOV DWORD PTR SS:[EBP-98],EDX
00410A60 8985 6CFFFFFF MOV DWORD PTR SS:[EBP-94],EAX
00410A66 B8 6C014E00 MOV EAX,jx2**.004E016C
00410A6B E8 C4A20B00 CALL jx2**.004CAD34--------------------------CALL用户名
00410A70 8B4D 0C MOV ECX,DWORD PTR SS:[EBP+C]----------------用户名入栈
..............省略
00410B7C BA B80B0000 MOV EDX,0BB8
00410B81 8B08 MOV ECX,DWORD PTR DS:[EAX]
00410B83 FF91 94000000 CALL DWORD PTR DS:[ECX+94]------------------------连接主认证服务器的CALL
00410B89 66:C745 80 0000 MOV WORD PTR SS:[EBP-80],0
00410B8F E9 AA000000 JMP jx2**.00410C3E
00410B94 66:C745 80 2000 MOV WORD PTR SS:[EBP-80],20
00410B9A BA 51FB4D00 MOV EDX,jx2**.004DFB51 ; 连接主认证服务器失败:
00410B9F 8D45 EC LEA EAX,DWORD PTR SS:[EBP-14]
..............省略
00410F13 8B85 6CFFFFFF MOV EAX,DWORD PTR SS:[EBP-94]
00410F19 C780 84000000 0>MOV DWORD PTR DS:[EAX+84],1
00410F23 6A 04 PUSH 4
00410F25 56 PUSH ESI
00410F26 8D85 58FFFFFF LEA EAX,DWORD PTR SS:[EBP-A8]
00410F2C 50 PUSH EAX
00410F2D E8 96990B00 CALL jx2**.004CA8C8
00410F32 8B95 6CFFFFFF MOV EDX,DWORD PTR SS:[EBP-94]
00410F38 83C4 0C ADD ESP,0C
00410F3B 8B8D 58FFFFFF MOV ECX,DWORD PTR SS:[EBP-A8]
00410F41 8D46 04 LEA EAX,DWORD PTR DS:[ESI+4] ------在此处ECX的值是天数,如改1000,则登陆成功后则显示1000天
00410F44 898A 80000000 MOV DWORD PTR DS:[EDX+80],ECX
00410F4A 6A 03 PUSH 3
00410F4C 50 PUSH EAX
00410F4D 8B95 6CFFFFFF MOV EDX,DWORD PTR SS:[EBP-94]
00410F53 81C2 D8000000 ADD EDX,0D8
00410F59 52 PUSH EDX
00410F5A E8 69990B00 CALL jx2**.004CA8C8
00410F5F 8B8D 6CFFFFFF MOV ECX,DWORD PTR SS:[EBP-94]
00410F65 83C4 0C ADD ESP,0C
00410F68 83C6 14 ADD ESI,14
00410F6B 8D85 58FFFFFF LEA EAX,DWORD PTR SS:[EBP-A8]
00410F71 C681 DB000000 0>MOV BYTE PTR DS:[ECX+DB],0
00410F78 6A 04 PUSH 4
00410F7A 56 PUSH ESI
00410F7B 50 PUSH EAX
00410F7C E8 47990B00 CALL jx2**.004CA8C8
00410F81 83C4 0C ADD ESP,0C
00410F84 8B95 6CFFFFFF MOV EDX,DWORD PTR SS:[EBP-94]
00410F8A 8B85 58FFFFFF MOV EAX,DWORD PTR SS:[EBP-A8]
00410F90 8982 84000000 MOV DWORD PTR DS:[EDX+84],EAX
00410F96 8B95 6CFFFFFF MOV EDX,DWORD PTR SS:[EBP-94]
00410F9C 3B82 80000000 CMP EAX,DWORD PTR DS:[EDX+80]
00410FA2 0F84 56010000 JE jx2**.004110FE--------------------------是就跳到"登陆成功",必跳,改JMP
00410FA8 8B8D 6CFFFFFF MOV ECX,DWORD PTR SS:[EBP-94]
00410FAE 8B81 88000000 MOV EAX,DWORD PTR DS:[ECX+88]
00410FB4 8B10 MOV EDX,DWORD PTR DS:[EAX]
00410FB6 FF52 58 CALL DWORD PTR DS:[EDX+58]
00410FB9 8B8D 6CFFFFFF MOV ECX,DWORD PTR SS:[EBP-94]
00410FBF 83B9 80000000 0>CMP DWORD PTR DS:[ECX+80],0
00410FC6 0F85 C6000000 JNZ jx2**.00411092-------------------------不等就跳到"登陆失败"
00410FCC 8B85 6CFFFFFF MOV EAX,DWORD PTR SS:[EBP-94]
00410FD2 83B8 84000000 0>CMP DWORD PTR DS:[EAX+84],2
00410FD9 75 5D JNZ SHORT jx2**.00411038--------------------不等就跳到"帐号剩余时间已用完"
00410FDB 66:C745 80 6800 MOV WORD PTR SS:[EBP-80],68
00410FE1 BA A7FB4D00 MOV EDX,jx2**.004DFBA7 ; 该帐号未注册,请先注册!
00410FE6 8D45 C4 LEA EAX,DWORD PTR SS:[EBP-3C]
00410FE9 E8 96780C00 CALL jx2**.004D8884
00410FEE FF45 8C INC DWORD PTR SS:[EBP-74]
00410FF1 8B00 MOV EAX,DWORD PTR DS:[EAX]
00410FF3 33D2 XOR EDX,EDX
00410FF5 8955 C0 MOV DWORD PTR SS:[EBP-40],EDX
00410FF8 8D55 C0 LEA EDX,DWORD PTR SS:[EBP-40]
00410FFB FF45 8C INC DWORD PTR SS:[EBP-74]
00410FFE E8 350FFFFF CALL jx2**.00401F38
00411003 8D55 C0 LEA EDX,DWORD PTR SS:[EBP-40]
00411006 8B85 6CFFFFFF MOV EAX,DWORD PTR SS:[EBP-94]
0041100C 8B12 MOV EDX,DWORD PTR DS:[EDX]
0041100E E8 69F9FFFF CALL jx2**.0041097C
00411013 FF4D 8C DEC DWORD PTR SS:[EBP-74]
00411016 8D45 C0 LEA EAX,DWORD PTR SS:[EBP-40]
00411019 BA 02000000 MOV EDX,2
0041101E E8 C1790C00 CALL jx2**.004D89E4
00411023 FF4D 8C DEC DWORD PTR SS:[EBP-74]
00411026 8D45 C4 LEA EAX,DWORD PTR SS:[EBP-3C]
00411029 BA 02000000 MOV EDX,2
0041102E E8 B1790C00 CALL jx2**.004D89E4
00411033 E9 B2000000 JMP jx2**.004110EA
00411038 66:C745 80 7400 MOV WORD PTR SS:[EBP-80],74
0041103E BA C0FB4D00 MOV EDX,jx2**.004DFBC0 ; 帐号剩余时间已用完!
00411043 8D45 BC LEA EAX,DWORD PTR SS:[EBP-44]
00411046 E8 39780C00 CALL jx2**.004D8884
0041104B FF45 8C INC DWORD PTR SS:[EBP-74]
0041104E 8B00 MOV EAX,DWORD PTR DS:[EAX]
00411050 33D2 XOR EDX,EDX
00411052 8955 B8 MOV DWORD PTR SS:[EBP-48],EDX
00411055 8D55 B8 LEA EDX,DWORD PTR SS:[EBP-48]
00411058 FF45 8C INC DWORD PTR SS:[EBP-74]
0041105B E8 D80EFFFF CALL jx2**.00401F38
00411060 8D55 B8 LEA EDX,DWORD PTR SS:[EBP-48]
00411063 8B85 6CFFFFFF MOV EAX,DWORD PTR SS:[EBP-94]
00411069 8B12 MOV EDX,DWORD PTR DS:[EDX]
0041106B E8 0CF9FFFF CALL jx2**.0041097C
00411070 FF4D 8C DEC DWORD PTR SS:[EBP-74]
00411073 8D45 B8 LEA EAX,DWORD PTR SS:[EBP-48]
00411076 BA 02000000 MOV EDX,2
0041107B E8 64790C00 CALL jx2**.004D89E4
00411080 FF4D 8C DEC DWORD PTR SS:[EBP-74]
00411083 8D45 BC LEA EAX,DWORD PTR SS:[EBP-44]
00411086 BA 02000000 MOV EDX,2
0041108B E8 54790C00 CALL jx2**.004D89E4
00411090 EB 58 JMP SHORT jx2**.004110EA
00411092 66:C745 80 8000 MOV WORD PTR SS:[EBP-80],80
00411098 BA D5FB4D00 MOV EDX,jx2**.004DFBD5 ; 登陆失败!
0041109D 8D45 B4 LEA EAX,DWORD PTR SS:[EBP-4C]
004110A0 E8 DF770C00 CALL jx2**.004D8884
004110A5 FF45 8C INC DWORD PTR SS:[EBP-74]
004110A8 8B00 MOV EAX,DWORD PTR DS:[EAX]
004110AA 33D2 XOR EDX,EDX
004110AC 8955 B0 MOV DWORD PTR SS:[EBP-50],EDX
004110AF 8D55 B0 LEA EDX,DWORD PTR SS:[EBP-50]
004110B2 FF45 8C INC DWORD PTR SS:[EBP-74]
004110B5 E8 7E0EFFFF CALL jx2**.00401F38
004110BA 8D55 B0 LEA EDX,DWORD PTR SS:[EBP-50]
004110BD 8B85 6CFFFFFF MOV EAX,DWORD PTR SS:[EBP-94]
004110C3 8B12 MOV EDX,DWORD PTR DS:[EDX]
004110C5 E8 B2F8FFFF CALL jx2**.0041097C
004110CA FF4D 8C DEC DWORD PTR SS:[EBP-74]
004110CD 8D45 B0 LEA EAX,DWORD PTR SS:[EBP-50]
004110D0 BA 02000000 MOV EDX,2
004110D5 E8 0A790C00 CALL jx2**.004D89E4
004110DA FF4D 8C DEC DWORD PTR SS:[EBP-74]
004110DD 8D45 B4 LEA EAX,DWORD PTR SS:[EBP-4C]
004110E0 BA 02000000 MOV EDX,2
004110E5 E8 FA780C00 CALL jx2**.004D89E4
004110EA 33C0 XOR EAX,EAX
004110EC 8B95 70FFFFFF MOV EDX,DWORD PTR SS:[EBP-90]
004110F2 64:8915 0000000>MOV DWORD PTR FS:[0],EDX
004110F9 E9 6F010000 JMP jx2**.0041126D
004110FE 53 PUSH EBX
004110FF E8 886E0B00 CALL jx2**.004C7F8C
00411104 59 POP ECX
00411105 8B8D 6CFFFFFF MOV ECX,DWORD PTR SS:[EBP-94]
0041110B 8B81 88000000 MOV EAX,DWORD PTR DS:[ECX+88]
00411111 8B10 MOV EDX,DWORD PTR DS:[EAX]
00411113 FF52 58 CALL DWORD PTR DS:[EDX+58]
00411116 8B8D 6CFFFFFF MOV ECX,DWORD PTR SS:[EBP-94]
0041111C 8B95 6CFFFFFF MOV EDX,DWORD PTR SS:[EBP-94]
00411122 8B81 80000000 MOV EAX,DWORD PTR DS:[ECX+80]-------此时EAX的值为改后的值1000天
00411128 3B82 84000000 CMP EAX,DWORD PTR DS:[EDX+84]
0041112E 0F85 2A010000 JNZ jx2**.0041125E-------------------此处不能跳,改JE就可骗取到登陆界面
00411134 66:C745 80 8C00 MOV WORD PTR SS:[EBP-80],8C
0041113A BA F9FB4D00 MOV EDX,jx2**.004DFBF9 ; 天
0041113F 8D45 9C LEA EAX,DWORD PTR SS:[EBP-64]
00411142 E8 3D770C00 CALL jx2**.004D8884
00411147 FF45 8C INC DWORD PTR SS:[EBP-74]
0041114A 8B00 MOV EAX,DWORD PTR DS:[EAX]
0041114C 33D2 XOR EDX,EDX
0041114E 8955 98 MOV DWORD PTR SS:[EBP-68],EDX
00411151 8D55 98 LEA EDX,DWORD PTR SS:[EBP-68]
00411154 FF45 8C INC DWORD PTR SS:[EBP-74]
00411157 E8 DC0DFFFF CALL jx2**.00401F38
0041115C 8D45 98 LEA EAX,DWORD PTR SS:[EBP-68]
0041115F 50 PUSH EAX
00411160 BA E0FB4D00 MOV EDX,jx2**.004DFBE0 ; 成功登陆,帐号剩余时间:
00411165 8D45 AC LEA EAX,DWORD PTR SS:[EBP-54]
00411168 E8 17770C00 CALL jx2**.004D8884
--------------------------------------------------------------------------------
【经验总结】
1、虽然可以脱壳,但脱壳后不论怎么修复优化都不能运行------希望大侠们能指点一下。
2、虽然可以取得了登陆的界面及时间,但呼不出外挂------希望大侠们能指点一下。
3、虽然可以带壳调试,但打了补丁后程序不能运行。
4、有的朋友说可以用修改内存的方式来修改登陆的用户名,实际上不行。如本程序:例如:如果注册用户123456789可正常登陆且
用户天数为1000天,修改内存把123456789改为987654321后,登陆界面上显示的的确是987654321,但进入游戏后马上自动
退出游戏。--------这一点希望大侠们能指点一下。
5、网络验证的CALL能找到,有的文章说能NOP掉,但不知怎么操作。
6、下一步将进一步学学拦截封包的技术!
--------------------------------------------------------------------------------
【版权声明】: 本文原创于看雪技术论坛, 转载请注明作者并保持文章的完整, 谢谢!
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课