uaEURESYS EASYACCESS6.5
限制:采用软件狗,在easyAccess的help里有个license manager
破解的关键是字符串
Dallas Semiconductor driver not found - Install it if you are using a Dallas Semiconductor dongle
MultiCam for Picolo driver not found or out-of-date - ( Re)install it if you are using MultiCam for Picolo with on-board licences
MultiCam driver not found or out-of-date - ( Re)install it if you are using a Picolo/Grablink/Quickpack/Domino/Multi with on-board licences
Sentinel dongle access problem - Contact Technical Support
Dallas Semiconductor driver not found - Install it if you are using a Dallas Semiconductor dongle
从w32dasm可以看出,下面的位置都是字符串的位置。
:0059896A 33D2 xor edx, edx
:0059896C 8A9194995900 mov dl, byte ptr [ecx+00599994]
:00598972 FF2495D8985900 jmp dword ptr [4*edx+005998D8]
* Possible StringData Ref from Data Obj ->"The license for EasyGauge is not "
->"granted - Launch license manager"
|
:00598979 B8D4867E00 mov eax, 007E86D4
:0059897E C3 ret
* Possible StringData Ref from Data Obj ->"This feature is not available"
|
:0059897F B8B4867E00 mov eax, 007E86B4
:00598984 C3 ret
l Possible StringData Ref from Data Obj ->"The license for EasyBarCode is "
查找Dallas Semiconductor driver not found - Install it if you are using a Dallas Semiconductor dongle可以找到位置:
00555E37 E8 04A40400 call EasyAcce.005A0240
00555E3C 85C0 test eax,eax
00555E3E 74 4E je short EasyAcce.00555E8E
00555E40 50 push eax
00555E41 E8 9A250400 call EasyAcce.005983E0ß------这个call就出错了。
还有一个入口:如果什么都不输入,弹出出错对话框:An activation code must have following structure :
XXXX XXXX XXXX XXXX"
005579C8 68 40F47C00 push EasyAcce.007CF440 ; ASCII "An activation code must have following structure :
XXXX XXXX XXXX XXXX"
005579CD B9 60DA8000 mov ecx,EasyAcce.0080DA60
005579D2 C78424 98000000 >mov dword ptr ss:[esp+98],0
005579DD E8 68791900 call EasyAcce.006EF34A
005579E2 8B40 1C mov eax,dword ptr ds:[eax+1C]
005579E5 50 push eax
005579E6 FF15 24187500 call dword ptr ds:[<&USER32.Messag>; USER32.MessageBoxA
005579EC 8D4C24 14 lea ecx,dword ptr ss:[esp+14]
00557964 52 push edx
00557965 50 push eax
00557966 57 push edi
00557967 E8 24850400 call EasyAcce.0059FE90
0055796C 8D4C24 78 lea ecx,dword ptr ss:[esp+78] ß-这里出现字符串:堆栈地址=0012F890, (ASCII "0740624154")
00557970 51 push ecx
//////////////////////////////关键的算法,////////////
00557986 50 push eax ; "1111222233334444"
00557987 8D5424 64 lea edx,dword ptr ss:[esp+64]
0055798B 51 push ecx
0055798C 52 push edx ; ASCII "0740624154"
0055798D E8 AE850400 call EasyAcce.0059FF40; 这个call里面判断注册码
00557992 8B4424 1C mov eax,dword ptr ss:[esp+1C]; 校验注册码的结果:esp+1c=0ffffff
00557996 85C0 test eax,eax ; 判断是否等于0
00557998 ^ 0F84 45FFFFFF je EasyAcce.005578E3
0055799E A9 00000080 test eax,80000000 ; 判断是否等于80000000
005579A3 ^ 0F84 2DFFFFFF je EasyAcce.005578D6
005579A9 8D4424 48 lea eax,dword ptr ss:[esp+48]
005579AD 6A 01 push 1
005579AF 50 push eax ; 我输入的注册码:"1111222233334444"
005579B0 ^ E9 28FFFFFF jmp EasyAcce.005578DD
005579B5 68 37020000 push 237
0059FF40 8B4C24 0C mov ecx,dword ptr ss:[esp+C]; "1111222233334444"
0059FF44 83EC 08 sub esp,8
0059FF47 8D4424 00 lea eax,dword ptr ss:[esp]
0059FF4B 6A 00 push 0
0059FF4D 50 push eax
0059FF4E 51 push ecx ; 我输入的key
0059FF4F E8 AC130000 call EasyAcce.005A1300
0059FF54 8B5424 0C mov edx,dword ptr ss:[esp+C] ; 22221111
0059FF58 8B4424 10 mov eax,dword ptr ss:[esp+10] ; 44443333
0059FF5C 8B4C24 1C mov ecx,dword ptr ss:[esp+1C]
0059FF60 8915 FC1D8100 mov dword ptr ds:[811DFC],edx ; 22221111
0059FF66 A3 F81D8100 mov dword ptr ds:[811DF8],eax ; 44443333
0059FF6B 8B4424 18 mov eax,dword ptr ss:[esp+18]; ASCII "0740624154"
0059FF6F 8B11 mov edx,dword ptr ds:[ecx] ; 1C
0059FF71 52 push edx ; 1C
0059FF72 50 push eax ; ASCII "0740624154"
0059FF73 E8 F8FDFFFF call EasyAcce.0059FD70
0059FF78 50 push eax ; EAX=2C25071A
0059FF79 E8 A2FDFFFF call EasyAcce.0059FD20; 这个call里面判断输入的key,保存结果影响eax和[811DFC]
0059FF7E E8 3DFDFFFF call EasyAcce.0059FCC0 ; 判断[811DFC]的值。
0059FF83 8B4C24 30 mov ecx,dword ptr ss:[esp+30]
0059FF87 8B15 FC1D8100 mov edx,dword ptr ds:[811DFC]; 注册码校验的结果。
0059FF8D 8911 mov dword ptr ds:[ecx],edx
0059FF8F 83C4 20 add esp,20
0059FF92 C2 1000 retn 10
跟进59FF79处的call EasyAcce.0059FD20 里面比较注册码
0059FD20 A1 FC1D8100 mov eax,dword ptr ds:[811DFC] ; 22221111
0059FD25 8B15 F81D8100 mov edx,dword ptr ds:[811DF8] ; 44443333
0059FD2B 69C0 3BA71F01 imul eax,eax,11FA73B; eax = eax * 11FA73B=265a7d 390b05eb
0059FD31 69D2 3BA71F01 imul edx,edx,11FA73B; edx := edx * 11fa73b
0059FD37 B9 550C7F72 mov ecx,727F0C55
0059FD3C 2BC8 sub ecx,eax ; 727f0c55-390b05eb=3974066A
0059FD3E B8 550C7F72 mov eax,727F0C55
0059FD43 2BC2 sub eax,edx ; eax-edx=727f0c55-9F4B11C1=D333FA94
0059FD45 8B5424 04 mov edx,dword ptr ss:[esp+4]; 上面一个call得到的eax=2C25071A
0059FD49 A3 F81D8100 mov dword ptr ds:[811DF8],eax; 59fd43出计算得到的值,放到内存某处
0059FD4E 2BC1 sub eax,ecx ; 前8位和后8位计算得到的值进行减法运算 D333FA94-3974066A=99BFF42A
0059FD50 3BC2 cmp eax,edx ; if 99BFF42A=2C25071A
0059FD52 74 0D je short EasyAcce.0059FD61
0059FD54 C705 FC1D8100 00>mov dword ptr ds:[811DFC],0
0059FD5E 33C0 xor eax,eax
0059FD60 C3 retn
0059FD61 2BCA sub ecx,edx; 3974066A-edx
0059FD63 B8 01000000 mov eax,1
0059FD68 890D FC1D8100 mov dword ptr ds:[811DFC],ecx; ecx=4EFF50,这里也很重要,
0059FD6E C3 retn
00555E3C |. 85C0 test eax,eax
00555E3E |. 74 4E je short EasyAcce.00555E8E
00555E40 |> 50 /push eax
00555E41 |. E8 9A250400 |call EasyAcce.005983E0 ; 这个call里查表的到错误字符串
00555E46 |. 50 |push eax ; EasyAcce.007E7F34
破解狗的话,插入狗,出现如下提示:
看来事件是在form的OnCreate事件里,用mfcspy查看,可以看到Create:006EB122
Listview: 00020358(SysListView32,id=076d)
OnNotify: notifycode=fffe id=076d,func=00557540(EasyAccess.exe+157540)
OnNotify: notifycode=ff65 id=076d,func=00557560(EasyAccess.exe+157560)
0055698E |. 6A 02 push 2 ; /lParam = 2
00556990 |. 6A FF push -1 ; |wParam = FFFFFFFF
00556992 |. 68 0C100000 push 100C ; |Message = MSG(100C)
00556997 |. 50 push eax ; |hWnd = 20358
00556998 |. FFD7 call edi ; /SendMessageA
发送消息,是发给谁呢?什么消息呢?100c是个自定义消息
0059FEFA |. 50 push eax
0059FEFB |. 57 push edi ; 出现狗里的key, (ASCII "6600:0000:223E:3182")
0059FEFC |. E8 6FFEFFFF call EasyAcce.0059FD70
0059FF01 |. 50 push eax
0059FF02 |. E8 19FEFFFF call EasyAcce.0059FD20
0059FF07 |. 83C4 20 add esp,20
0059FF0A |. E8 B1FDFFFF call EasyAcce.0059FCC0
0059FD20 >/$ A1 FC1D8100 mov eax,dword ptr ds:[811DFC] ; 22221111
0059FD25 |. 8B15 F81D8100 mov edx,dword ptr ds:[811DF8] ; 44443333
0059FD2B |. 69C0 3BA71F01 imul eax,eax,11FA73B ; eax = eax * 11FA73B=265a7d 390b05eb
0059FD31 |. 69D2 3BA71F01 imul edx,edx,11FA73B ; edx := edx * 11fa73b
0059FD37 |. B9 550C7F72 mov ecx,727F0C55
0059FD3C |. 2BC8 sub ecx,eax ; 727f0c55-390b05eb=3974066A
下面这个函数校验用户输入的key,并且根据0059FD61处的值判断外面的checkbox
0059FD3E |. B8 550C7F72 mov eax,727F0C55
0059FD43 |. 2BC2 sub eax,edx ; eax-edx=727f0c55-9F4B11C1=D333FA94
0059FD45 |. 8B5424 04 mov edx,dword ptr ss:[esp+4] ; 上面一个call得到的eax=2C25071A
0059FD49 |. A3 F81D8100 mov dword ptr ds:[811DF8],eax ; 59fd43出计算得到的值,放到内存某处
0059FD4E |. 2BC1 sub eax,ecx ; 前8位和后8位计算得到的值进行减法运算 D333FA94-3974066A=99BFF42A
0059FD50 |. 3BC2 cmp eax,edx ; if 99BFF42A=2C25071A
0059FD52 |. 74 0D je short EasyAcce.0059FD61
0059FD54 |. C705 FC1D8100>mov dword ptr ds:[811DFC],0
0059FD5E |. 33C0 xor eax,eax
0059FD60 |. C3 retn
0059FD61 |> 2BCA sub ecx,edx ; 3974066A-edx
0059FD63 |. B8 01000000 mov eax,1
0059FD68 |. 890D FC1D8100 mov dword ptr ds:[811DFC],ecx ; ecx=4EFF50,这里也很重要,
0059FD6E /. C3 retn
狗里面的数据经过verifykey2后,得到的值进行移位,
Shr 1, 2, 3, 4, 6, 0E, 0F, 9, a, 10, 0B, 0D, 0F
然后and 1 判断是否为1,=1就check,=0就uncheck,在这个里面有个地方需要注意,就是有个地方有判断kind=0E,等于就继续检查几个
00556AD1 |. 68 6F070000 push 76F
00556AD6 |. D1EB shr ebx,1
00556AD8 |. 8BCE mov ecx,esi
00556ADA 83C3 01 add ebx,1
00556ADD |. E8 6B6E1900 call <EasyAcce.SetCheckBox>
00556AE2 |. 8B50 1C mov edx,dword ptr ds:[eax+1C]
00556AE5 |. 6A 00 push 0
00556AE7 |. 53 push ebx
00556AE8 |. 68 F1000000 push 0F1
00556AED |. 52 push edx
00556AEE |. FFD7 call edi 这里给checkbox赋值
00556A26 |. E8 65940400 call <EasyAcce.VerifyDogSN>
00556A2B |. 8D5424 3C lea edx,dword ptr ss:[esp+3C]
00556A2F |. 52 push edx ; key
00556A30 |. E8 33591700 call EasyAcce.006CC368 ; 这个call里得到kind=2,checkbox根据这个判断
00556A35 |. 8B5424 38 mov edx,dword ptr ss:[esp+38]
下面破解狗,因为在打开license manager窗体的时候有读狗,所以下断点 deviceIoControl
005A8F97 |. 52 |push edx
005A8F98 |. 50 |push eax
005A8F99 |. C74424 28 100>|mov dword ptr ss:[esp+28],10
005A8FA1 |. E8 3A000000 |call <EasyAcce.ReadDogData>
005A8FA6 |. 83C4 0C |add esp,0C
在deviceIoControl后,得到如下数据:
0013DD0C 00 11 25 42 25 8B 00 00 .%B%?.
并且把地址给 esi
0059F9E6 |. E8 8589FFFF |call EasyAcce.00598370
0059F9EB |. 85C0 |test eax,eax
0059F9ED |. 0F85 AC000000 |jnz EasyAcce.0059FA9F
0059F9F3 |. 8B5424 08 |mov edx,dword ptr ss:[esp+8]
0059F9F7 |. 8B4C24 04 |mov ecx,dword ptr ss:[esp+4]
0059F9FB |. 8B4424 0C |mov eax,dword ptr ss:[esp+C]
0059F9FF |. 8915 FC1D8100 |mov dword ptr ds:[811DFC],edx
0059FA05 |. 8D5424 10 |lea edx,dword ptr ss:[esp+10] 这里出现了序列号
0059FA09 |. 51 |push ecx
0059FA0A |. 52 |push edx
0059FA0B |. A3 F81D8100 |mov dword ptr ds:[811DF8],eax
这里应该是给checkbox赋值
006ED954 |. FF7424 04 push dword ptr ss:[esp+4] ; /ControlID
006ED958 |. FF71 1C push dword ptr ds:[ecx+1C] ; |hWnd = 000302F4 ('eVision Licenses',class='#32770',parent=000102AA)
006ED95B |. FF15 04177500 call dword ptr ds:[<&USER32.GetDlgItem>] ; /GetDlgItem
破解mchMatch.exe 点击菜单上的
45c810
第一处不同的地方:
第一处不同的地方:68044C2F EasyMs60里
68044C19 /74 06 je short EasyMs60.68044C21
68044C1B |FF05 BC920A68 inc dword ptr ds:[680A92BC]
68044C21 /A1 A4920A68 mov eax,dword ptr ds:[680A92A4]
68044C26 BA 01000000 mov edx,1
68044C2B D3E2 shl edx,cl
68044C2D 85D0 test eax,edx
68044C2F 74 11 je short EasyMs60.68044C42 关键的跳转
68044C31 0B048D 28320A68 or eax,dword ptr ds:[ecx*4+680A3228]
68044C38 A3 A4920A68 mov dword ptr ds:[680A92A4],eax
68044C3D ^ E9 FEFCFEFF jmp EasyMs60.EOk
68044C42 83F9 11 cmp ecx,11
68044C45 0F87 D9000000 ja EasyMs60.68044D24
68044C4B FF248D 304D0468 jmp dword ptr ds:[ecx*4+68044D30]
总结:这次破解也花费了几天的工夫,主要是破解思路有些零乱,开始是去跟踪EasyAccess.exe的license Manager,也成功跟出了狗里的注册码和CheckBox对应的功能项的关系。可是EA.exe里的读狗代码似乎是在exe里。但是我们需要破解的最终产品是ocx,
于是用delphi加载ocx,编译一个exe,出错弹出license not grant的对话框,是个很好的入口,另外delphi写的程序,菜单事件的入口也可以从delphi里得到,所以代码就限制在这两者之间。因为有狗,所以使用ollydbg的trace运行跟踪功能,分别用狗和不用狗,自动单步。很快发现68044C2F(EasyMs60.dll)这个地方不同。(前面还有一处不同的,不过那是第一次运行和第二次运行导致的不同)。修改之!!!搞定之!!!
狗里的注册机制是得到狗里的序列号,然后进两次运算,第一次运算很简单,把6600:0000:223E:3182这样的狗里的sn进行变形,变成0x66000000, 0000223E, 00003182等三个数。然后第一个数和第三个数and,然后再和第二个数and,得到的结果在第二个函数VerifyKey2里运算和校验,得到的数据后进行移位然后判断是否给checkbox打勾。00556AD1附近的代码。
分析一下,这个软件是个OCX,其中EasyMs60.dll负责其中的注册控制。里面有个ELincese类,这次我破解的基本就是里面的License.Get
Function VerifyKey2
0059FD20 A1 FC1D8100 mov eax,dword ptr ds:[811DFC] ; 22221111
0059FD25 8B15 F81D8100 mov edx,dword ptr ds:[811DF8] ; 44443333
0059FD2B 69C0 3BA71F01 imul eax,eax,11FA73B; eax = eax * 11FA73B=265a7d 390b05eb
0059FD31 69D2 3BA71F01 imul edx,edx,11FA73B; edx := edx * 11fa73b
0059FD37 B9 550C7F72 mov ecx,727F0C55
0059FD3C 2BC8 sub ecx,eax ; 727f0c55-390b05eb=3974066A
0059FD3E B8 550C7F72 mov eax,727F0C55
0059FD43 2BC2 sub eax,edx ; eax-edx=727f0c55-9F4B11C1=D333FA94
0059FD45 8B5424 04 mov edx,dword ptr ss:[esp+4]; 上面一个call得到的eax=2C25071A
0059FD49 A3 F81D8100 mov dword ptr ds:[811DF8],eax; 59fd43出计算得到的值,放到内存某处
0059FD4E 2BC1 sub eax,ecx ; 前8位和后8位计算得到的值进行减法运算 D333FA94-3974066A=99BFF42A
0059FD50 3BC2 cmp eax,edx ; if 99BFF42A=2C25071A
0059FD52 74 0D je short EasyAcce.0059FD61
0059FD54 C705 FC1D8100 00>mov dword ptr ds:[811DFC],0
0059FD5E 33C0 xor eax,eax
0059FD60 C3 retn
0059FD61 2BCA sub ecx,edx; 3974066A-edx
0059FD63 B8 01000000 mov eax,1
0059FD68 890D FC1D8100 mov dword ptr ds:[811DFC],ecx; ecx=4EFF50,这里也很重要,
0059FD6E C3 retn