最近工作不是很忙,于是开始看一些关于破解方面的东西,随便从网上找了一个小的共享软件(map2shp V1.3版)来试试。此软件的未注册版本没有时间限制,只有功能限制,采用机器码和用户名生成激活码来进行注册。运行软件后在界面点击注册,弹出注册对话框,随便填了个用户名和激活码,然后点击Register,弹出错误对话框提示:对不起,您输入了错误的注册信息!之后运行OD,载入Map2Shp.exe,用万能断点插件下了断点,点击运行,然后在程序的界面点击注册,弹出注册对话框,还是随便填了个用户名和激活码,然后点击注册。被OD断下,按alt+F9和ctrl+F9,最后来到MFCCtrls.dll,并弹出错误对话框。在停下的地方一直往上跟代码,找到GetHardDiskID、GetMACaddress、GetProductName等字符,并看到一个跳转,这段代码如下:
......
039886E 8D4C24 40 LEA ECX,DWORD PTR SS:[ESP+40]
00398872 E8 F9BCFFFF CALL MFCCtrls.??0CFileVersionInfo@@QAE@XZ
00398877 C68424 D4060000>MOV BYTE PTR SS:[ESP+6D4],2
0039887F E8 48060000 CALL <JMP.&MFC80U.#1079>
00398884 8B40 08 MOV EAX,DWORD PTR DS:[EAX+8]
00398887 50 PUSH EAX
00398888 8D4C24 44 LEA ECX,DWORD PTR SS:[ESP+44]
0039888C E8 2FBAFFFF CALL MFCCtrls.?Open@CFileVersionInfo@@QAEHPAUHINSTANCE__@@@Z
00398891 8D4424 1C LEA EAX,DWORD PTR SS:[ESP+1C]
00398895 50 PUSH EAX
00398896 8D4C24 44 LEA ECX,DWORD PTR SS:[ESP+44]
0039889A E8 71BCFFFF CALL MFCCtrls.?GetProductName@CFileVersionInfo@@QBE?AV?$CStringT@_WV?$StrT>
0039889F 8D4C24 20 LEA ECX,DWORD PTR SS:[ESP+20]
003988A3 51 PUSH ECX
003988A4 8D4C24 44 LEA ECX,DWORD PTR SS:[ESP+44]
003988A8 C68424 D8060000>MOV BYTE PTR SS:[ESP+6D8],3
003988B0 E8 9BBBFFFF CALL MFCCtrls.?GetFileVersion@CFileVersionInfo@@QBE?AV?$CStringT@_WV?$StrT>
003988B5 8D5424 30 LEA EDX,DWORD PTR SS:[ESP+30]
003988B9 52 PUSH EDX
003988BA 8D4C24 44 LEA ECX,DWORD PTR SS:[ESP+44]
003988BE C68424 D8060000>MOV BYTE PTR SS:[ESP+6D8],4
003988C6 E8 45BBFFFF CALL MFCCtrls.?GetCompanyName@CFileVersionInfo@@QBE?AV?$CStringT@_WV?$StrT>
003988CB 8D8C24 4C020000 LEA ECX,DWORD PTR SS:[ESP+24C]
003988D2 C68424 D4060000>MOV BYTE PTR SS:[ESP+6D4],5
003988DA E8 41B7FFFF CALL MFCCtrls.??0CComputerInfo@@QAE@XZ
003988DF 8D8C24 4C020000 LEA ECX,DWORD PTR SS:[ESP+24C]
003988E6 C68424 D4060000>MOV BYTE PTR SS:[ESP+6D4],6
003988EE E8 9DB7FFFF CALL MFCCtrls.?Open@CComputerInfo@@QAEHXZ
003988F3 8D4424 28 LEA EAX,DWORD PTR SS:[ESP+28]
003988F7 50 PUSH EAX
003988F8 8D8C24 50020000 LEA ECX,DWORD PTR SS:[ESP+250]
003988FF E8 4CB6FFFF CALL MFCCtrls.?GetCPUInfo@CComputerInfo@@QAE?AV?$CStringT@_WV?$StrTraitMFC>
00398904 8D4C24 18 LEA ECX,DWORD PTR SS:[ESP+18]
00398908 51 PUSH ECX
00398909 8D8C24 50020000 LEA ECX,DWORD PTR SS:[ESP+250]
00398910 C68424 D8060000>MOV BYTE PTR SS:[ESP+6D8],7
00398918 E8 63B6FFFF CALL MFCCtrls.?GetMACaddress@CComputerInfo@@QAE?AV?$CStringT@_WV?$StrTrait>
0039891D 8D8C24 4C020000 LEA ECX,DWORD PTR SS:[ESP+24C]
00398924 C68424 D4060000>MOV BYTE PTR SS:[ESP+6D4],8
0039892C E8 AFB5FFFF CALL MFCCtrls.?GetHardDiskID@CComputerInfo@@QAEKXZ
00398931 D9EE FLDZ
00398933 51 PUSH ECX
00398934 D91C24 FSTP DWORD PTR SS:[ESP]
00398937 6A 00 PUSH 0
00398939 50 PUSH EAX
0039893A 51 PUSH ECX
0039893B 8D5424 28 LEA EDX,DWORD PTR SS:[ESP+28]
0039893F 8BCC MOV ECX,ESP
00398941 896424 34 MOV DWORD PTR SS:[ESP+34],ESP
00398945 52 PUSH EDX
00398946 FF15 40B23900 CALL DWORD PTR DS:[<&MFC80U.#280>]
0039894C 51 PUSH ECX
0039894D 8D4424 24 LEA EAX,DWORD PTR SS:[ESP+24]
00398951 8BCC MOV ECX,ESP
00398953 896424 20 MOV DWORD PTR SS:[ESP+20],ESP
00398957 50 PUSH EAX
00398958 C68424 EC060000>MOV BYTE PTR SS:[ESP+6EC],9
00398960 FF15 40B23900 CALL DWORD PTR DS:[<&MFC80U.#280>]
00398966 51 PUSH ECX
00398967 8D5424 38 LEA EDX,DWORD PTR SS:[ESP+38]
0039896B 8BCC MOV ECX,ESP
0039896D 896424 54 MOV DWORD PTR SS:[ESP+54],ESP
00398971 52 PUSH EDX
00398972 C68424 F0060000>MOV BYTE PTR SS:[ESP+6F0],0A
0039897A FF15 40B23900 CALL DWORD PTR DS:[<&MFC80U.#280>]
00398980 C68424 EC060000>MOV BYTE PTR SS:[ESP+6EC],0B
00398988 51 PUSH ECX
00398989 8D4424 38 LEA EAX,DWORD PTR SS:[ESP+38]
0039898D 8BCC MOV ECX,ESP
0039898F 896424 54 MOV DWORD PTR SS:[ESP+54],ESP
00398993 50 PUSH EAX
00398994 FF15 40B23900 CALL DWORD PTR DS:[<&MFC80U.#280>]
0039899A 51 PUSH ECX
0039899B 8D5424 34 LEA EDX,DWORD PTR SS:[ESP+34]
0039899F 8BCC MOV ECX,ESP
003989A1 896424 54 MOV DWORD PTR SS:[ESP+54],ESP
003989A5 52 PUSH EDX
003989A6 C68424 F8060000>MOV BYTE PTR SS:[ESP+6F8],0C
003989AE FF15 40B23900 CALL DWORD PTR DS:[<&MFC80U.#280>]
003989B4 51 PUSH ECX
003989B5 8D8424 E4040000 LEA EAX,DWORD PTR SS:[ESP+4E4]
003989BC 8BCC MOV ECX,ESP
003989BE 896424 50 MOV DWORD PTR SS:[ESP+50],ESP
003989C2 50 PUSH EAX
003989C3 C68424 FC060000>MOV BYTE PTR SS:[ESP+6FC],0D
003989CB FF15 0CB23900 CALL DWORD PTR DS:[<&MFC80U.#283>]
003989D1 C68424 F8060000>MOV BYTE PTR SS:[ESP+6F8],8
003989D9 E8 D2F5FFFF CALL MFCCtrls.00397FB0
003989DE 83C4 24 ADD ESP,24
003989E1 8BF8 MOV EDI,EAX
003989E3 57 PUSH EDI
003989E4 8BCE MOV ECX,ESI
003989E6 E8 65F1FFFF CALL MFCCtrls.?ChangeInterface@CRegisterDlg@@IAEXH@Z
003989EB 85FF TEST EDI,EDI
003989ED 0F84 A5000000 JE MFCCtrls.00398A98 ;此处修改为JNZ
003989F3 8D4C24 0C LEA ECX,DWORD PTR SS:[ESP+C]
003989F7 FF15 B4B13900 CALL DWORD PTR DS:[<&MFC80U.#293>]
003989FD 68 34343A00 PUSH MFCCtrls.003A3434
00398A02 8D4C24 10 LEA ECX,DWORD PTR SS:[ESP+10]
00398A06 C68424 D8060000>MOV BYTE PTR SS:[ESP+6D8],0E
00398A0E FF15 94B13900 CALL DWORD PTR DS:[<&MFC80U.#776>]
.....
修改了这个关键跳后,再次运行此软件,弹出对话框提示:感谢您使用本软件,当前软件副本注册用户为
于是心里不免一阵激动。马上关掉软件,重新运行,再点击注册,结果发现注册对话框上面依然提示:您目前使用的软件版本是未注册版本,请注册后使用!
心里那个狂凉啊!
看来还有一处是标志软件是否注册的地方,只有这个标记改为注册了才能正常使用软件了。还得继续努力。也希望大家能提示一下我这个菜鸟,不胜感激!
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)