【破文标题】Watery Desktop 3D算法分析+系列注册机之汇编实现(中级)
【破文作者】Playboysen
【作者邮箱】playboysen#126.com
【破解工具】OD
【破解平台】Windows7
【软件语言】英文
【原版下载】7c5K9s2c8@1M7q4)9K6b7g2)9J5c8W2)9J5c8Y4N6%4N6#2)9J5k6i4m8#2M7$3S2Q4x3X3c8%4j5h3I4D9M7r3q4H3k6i4u0Q4x3X3g2U0L8$3#2Q4x3V1j5H3x3g2)9J5c8R3`.`.
【保护方式】用户名 注册码
【软件简介】Watery Desktop 3D——迄今为止我见过的效果最炫的动态壁纸和屏保,惊叹!多处搜索发现此软件只有屏保部分的爆破版本,网上无法找到任何一组全功能注册码(在国外网站找到三个注册码,可以弹出注册成功提示,但其实功能不正常)遂兴趣盎然着手研究……
【破解声明】看本文需要极大耐心。版权所有,转载需注明作者!
【破解内容】
毫不夸张地说这是我折腾过的所有软件中单靠程序算法验证保护(不靠强壳、VM之类)最严密的一个,从试用、分析到算法还原写注册机,前后耗时一月有余,叹为观止!此程序的注册验证机制精巧,也许有些东西值得我们学习……
1、输入假码无提示,获取文本尽量避开常用API如GetDlgItemText GetWindowText等
2、程序对注册码分段、分时、多处验证,验证为假码后无提示功能限制,注册码加密保存(其实大部分时间都耗在暗桩处算法的查找分析上了,汗)
3、验证时临时解密注册表密钥,且解密后参与验证的数据并不是明文注册码(已经过简单处理)
4、程序使用GetUserNameEx参与验证注册码,隐式绑定电脑
上面这些似乎并不高明的伎俩足足耗费了我两三周的时间来分析和应付,几欲放弃……
然而,智者千虑必有一失,程序未加壳、有注册成功提示、配置对话框标题有(unregistered)字样且字符为明文。
有的放矢,搜索字符串轻易找到注册码验证的第一处
00405264 . 6A 00 push 0 ; /lParam = 0
00405266 . 6A 00 push 0 ; |wParam = 0
00405268 . 6A 0E push 0E ; |Message = WM_GETTEXTLENGTH
0040526A . 52 push edx ; |hWnd
0040526B . FFD6 call esi ; \SendMessageW
0040526D . 83F8 05 cmp eax, 5
00405270 . 0F85 01040000 jnz 00405677
00405276 . 8D4424 1C lea eax, dword ptr [esp+1C]
0040527A . 50 push eax ; /lParam
0040527B . 6A 06 push 6 ; |wParam = 6
0040527D . 6A 0D push 0D ; |Message = WM_GETTEXT
0040527F . 57 push edi ; |hWnd
00405280 . FFD6 call esi ; \SendMessageW
00405282 . 33C0 xor eax, eax
00405284 > 8A4C44 1C mov cl, byte ptr [esp+eax*2+1C] ; 注册码分四段,每段5个字符
00405288 . 80E9 41 sub cl, 41 ; 分别取出每段字符 每一位减去41h后生成一段20位的数据储存
0040528B . 884C04 28 mov byte ptr [esp+eax+28], cl
0040528F . 40 inc eax
00405290 . 83F8 05 cmp eax, 5
00405293 .^ 7C EF jl short 00405284
……
00405300 > /0FB65404 28 movzx edx, byte ptr [esp+eax+28] ; 求K的前19位之和放入ecx
00405305 . |40 inc eax
00405306 . |03CA add ecx, edx
00405308 . |83F8 13 cmp eax, 13
0040530B .^\7C F3 jl short 00405300
0040530D . 0FB64424 3B movzx eax, byte ptr [esp+3B] ; K20放入eax
00405312 . F7D1 not ecx
00405314 . 33C1 xor eax, ecx
00405316 . A8 0F test al, 0F
00405318 . 0F85 59030000 jnz 00405677
00405300 > /0FB65404 28 movzx edx, byte ptr [esp+eax+28]
00405305 . |40 inc eax
00405306 . |03CA add ecx, edx
00405308 . |83F8 13 cmp eax, 13
0040530B .^\7C F3 jl short 00405300
0040530D . 0FB64424 3B movzx eax, byte ptr [esp+3B]
00405312 . F7D1 not ecx
00405314 . 33C1 xor eax, ecx
00405316 . A8 0F test al, 0F
00405318 . 0F85 59030000 jnz 00405677
0040531E . 33C0 xor eax, eax
00405320 > 8BC8 mov ecx, eax ; K的第二次变换加密
00405322 . 83E1 03 and ecx, 3
00405325 . 41 inc ecx
00405326 . D26404 28 shl byte ptr [esp+eax+28], cl
0040532A . 40 inc eax
0040532B . 83F8 14 cmp eax, 14
0040532E .^ 7C F0 jl short 00405320
00405330 . 8D4C24 18 lea ecx, dword ptr [esp+18]
00405334 . 51 push ecx
00405335 . 8D9424 480200>lea edx, dword ptr [esp+248]
0040533C . 52 push edx
0040533D . 6A 02 push 2 ; 注意这个参数,写注册机时必须用这个参数,否则结果会出错
0040533F . E8 52B90400 call <jmp.&Secur32.GetUserNameExW>
00405344 . B8 04010000 mov eax, 104
00405349 . 8D8C24 440200>lea ecx, dword ptr [esp+244]
00405350 > 66:8339 00 cmp word ptr [ecx], 0
00405354 . 74 0A je short 00405360
00405356 . 83C1 02 add ecx, 2
00405359 . 83E8 01 sub eax, 1
0040535C .^ 75 F2 jnz short 00405350
0040535E . EB 57 jmp short 004053B7
00405360 > 85C0 test eax, eax
00405362 . 74 53 je short 004053B7
00405364 . BA 04010000 mov edx, 104
00405369 . 2BD0 sub edx, eax
0040536B . B9 04010000 mov ecx, 104
00405370 . 2BCA sub ecx, edx
00405372 . 8D8454 440200>lea eax, dword ptr [esp+edx*2+244]
00405379 . 74 34 je short 004053AF
0040537B . BF 28044700 mov edi, 00470428 ; "12345678901234567890"
......
004053C0 > 8A9444 440200>mov dl, byte ptr [esp+eax*2+244] ; K的第三次变换加密
004053C7 . F6D2 not dl ; 加密因子为GetUserNameEx + '12345678901234567890'
004053C9 . 305404 28 xor byte ptr [esp+eax+28], dl
004053CD . 40 inc eax
004053CE . 83F8 14 cmp eax, 14
004053D1 .^ 7C ED jl short 004053C0
004053D3 . 8D8424 4C0400>lea eax, dword ptr [esp+44C]
004053DA . 50 push eax
004053DB . 6A 00 push 0
004053DD . FF15 18E44900 call dword ptr [49E418]
004053E3 . 8D4424 3C lea eax, dword ptr [esp+3C]
004053E7 . BE 04064700 mov esi, 00470604 ; "Thank you for registrating "
......
0040561C . 6A 14 push 14 ; /BufSize = 14 (20.)
0040561E . 8D5424 2C lea edx, dword ptr [esp+2C] ; |
00405622 . 52 push edx ; |Buffer
00405623 . 6A 03 push 3 ; |ValueType = REG_BINARY
00405625 . 50 push eax ; |Reserved
00405626 . 8B4424 20 mov eax, dword ptr [esp+20] ; |
0040562A . 68 54044700 push 00470454 ; |ValueName = "REG"
0040562F . 50 push eax ; |hKey
00405630 . FF15 10F04600 call dword ptr [<&ADVAPI32.RegSetValu>; \RegSetValueExW
00405636 . 8B4C24 10 mov ecx, dword ptr [esp+10]
0040563A . 51 push ecx ; /hKey
0040563B . FF15 00F04600 call dword ptr [<&ADVAPI32.RegCloseKe>; \RegCloseKey
00405641 > 8B15 D4DB4900 mov edx, dword ptr [49DBD4]
00405647 . 6A 00 push 0 ; /lParam = 0
00405649 . 6A 00 push 0 ; |wParam = 0
0040564B . 6A 12 push 12 ; |Message = WM_QUIT
0040564D . 52 push edx ; |hWnd => NULL
0040564E . FF15 64F24600 call dword ptr [<&USER32.SendMessageW>; \SendMessageW
00404F05 |. 68 54044700 push 00470454 ; "REG"
00404F0A |. 50 push eax
00404F0B |. FFD6 call esi
00404F0D |. 8B4C24 0C mov ecx, dword ptr [esp+C]
00404F11 |. 51 push ecx
00404F12 |. FFD3 call ebx
00404F14 |> 8D5424 18 lea edx, dword ptr [esp+18]
00404F18 |. 52 push edx
00404F19 |. 68 98DC4900 push 0049DC98 ; "Senhuan-PC\Senhuan12345678901234567890"
00404F1E |. 6A 02 push 2
00404F20 |. C74424 24 040>mov dword ptr [esp+24], 104
00404F28 |. E8 69BD0400 call <jmp.&Secur32.GetUserNameExW>
00404F2D |. 68 28044700 push 00470428 ; "12345678901234567890"
00404F32 |. 68 04010000 push 104
00404F37 |. 68 98DC4900 push 0049DC98 ; "Senhuan-PC\Senhuan12345678901234567890"
00404F3C |. E8 CFC9FFFF call 00401910
00404F41 |. 8B8C24 240200>mov ecx, dword ptr [esp+224]
0040C1F0 |> /0FB60C45 98DC>/movzx ecx, byte ptr [eax*2+49DC98] ; 硬件访问断点找到的第一处算法
0040C1F8 |. |0FB61445 9ADC>|movzx edx, byte ptr [eax*2+49DC9A]
0040C200 |. |F6D1 |not cl
......
0040C250 |. |884C04 0C |mov byte ptr [esp+eax+C], cl
0040C254 |. |83C0 05 |add eax, 5
0040C257 |. |83F8 14 |cmp eax, 14
0040C25A |.^\7C 94 \jl short 0040C1F0
0040C25C |. 33C0 xor eax, eax
0040C25E |. 8BFF mov edi, edi
0040C260 |> 8AC8 /mov cl, al
0040C262 |. 80E1 03 |and cl, 3
0040C265 |. FEC1 |inc cl
0040C267 |. D26C04 08 |shr byte ptr [esp+eax+8], cl
0040C26B |. 40 |inc eax
0040C26C |. 83F8 14 |cmp eax, 14
0040C26F |.^ 7C EF \jl short 0040C260
0040C271 |. 33C9 xor ecx, ecx
0040C273 |. 33D2 xor edx, edx
0040C275 |. 33F6 xor esi, esi
0040C277 |. 33C0 xor eax, eax
0040C279 |. 57 push edi
0040C27A |. 8D9B 00000000 lea ebx, dword ptr [ebx]
0040C280 |> 0FB67C04 0C /movzx edi, byte ptr [esp+eax+C]
0040C285 |. 03CF |add ecx, edi
0040C287 |. 0FB67C04 0D |movzx edi, byte ptr [esp+eax+D]
0040C28C |. 83C0 02 |add eax, 2
0040C28F |. 03D7 |add edx, edi
0040C291 |. 83F8 12 |cmp eax, 12
0040C294 |.^ 7C EA \jl short 0040C280
0040C296 |. 83F8 13 cmp eax, 13
0040C299 |. 5F pop edi
0040C29A |. 7D 05 jge short 0040C2A1
0040C29C |. 0FB67404 08 movzx esi, byte ptr [esp+eax+8]
0040C2A1 |> 0FB64424 1B movzx eax, byte ptr [esp+1B]
0040C2A6 |. 03D1 add edx, ecx
0040C2A8 |. 03D6 add edx, esi
0040C2AA |. F7D2 not edx
0040C2AC |. 33D0 xor edx, eax
0040C2AE |. F6C2 0F test dl, 0F
0040C2B1 |. 75 07 jnz short 0040C2BA
0040C2B3 |. C605 B8DE4900>mov byte ptr [49DEB8], 1
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课