吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 15975|回复: 32
收起左侧

[调试逆向] [原创] 寻找被加密的EXE真实密码

  [复制链接]
Ruin 发表于 2012-6-23 07:34
本帖最后由 Ruin 于 2012-6-23 08:59 编辑

【文章标题】: 寻找被加密的EXE真实密码
【文章作者】: Ruin
【软件名称】: akalaexelock3.20
【软件大小】: 506 KB
【下载地址】: 自己搜索下载
【加壳方式】: aspack2.12
【编写语言】: Borland Delphi
【使用工具】: OD PEID ASPack脱壳
【操作平台】: XP
【软件介绍】: 一款国外的加密程序 样子还不错
【作者声明】: 只是感兴趣,没有其他目的。失误之处敬请诸位大侠赐教!
--------------------------------------------------------------------------------------------
【详细过程】
  这款国外加密EXE的样子 以前很喜欢 后来没能力破解 密码只能6位
  
  进了吾爱也有一段时间了 学习的东西 也挺多.......
  
  感谢诸位师傅的教导:邦牛,K大,酱油牛,海贼牛,qaz大大,zhi大大,qzy大大,还有咪咪爷,膜拜P叔把我带上这个舞台,
  
  --------------------------------------------------------------------------------
  首先PEID查壳
  ASPack 2.12 -> Alexey Solodovnikov [Overlay]
  
  ASPack这款壳在各位同学的工具包里都有 直接拿来使用一下 当然希望手动的东西直接ESP定律到OEP OD自带插件脱壳
  
  取消重建输入表 就不需要修复了
  
  现在我们载入OD


脱壳后的入口点
004644E0 > $ 55 push ebp
004644E1 . 8BEC mov ebp,esp
004644E3 . 83C4 F0 add esp,-0x10
004644E6 . B8 D8414600 mov eax,1ZPFixer.004641D8 ; UNICODE "`"
004644EB . E8 B01CFAFF call 1ZPFixer.004061A0
004644F0 . A1 28634600 mov eax,dword ptr ds:[0x466328]
004644F5 . 8B00 mov eax,dword ptr ds:[eax]
004644F7 . E8 B01AFFFF call 1ZPFixer.00455FAC
004644FC . A1 28634600 mov eax,dword ptr ds:[0x466328]
00464501 . 8B00 mov eax,dword ptr ds:[eax]
00464503 . BA 40454600 mov edx,1ZPFixer.00464540 ; ASCII "Akala EXE Lock"
00464508 . E8 9716FFFF call 1ZPFixer.00455BA4
0046450D . 8B0D 2C644600 mov ecx,dword ptr ds:[0x46642C] ; 1ZPFixer.004690C4
00464513 . A1 28634600 mov eax,dword ptr ds:[0x466328]
00464518 . 8B00 mov eax,dword ptr ds:[eax]
0046451A . 8B15 B8374600 mov edx,dword ptr ds:[0x4637B8] ; 1ZPFixer.00463804
00464520 . E8 9F1AFFFF call 1ZPFixer.00455FC4
00464525 . A1 28634600 mov eax,dword ptr ds:[0x466328]
0046452A . 8B00 mov eax,dword ptr ds:[eax]
0046452C . E8 131BFFFF call 1ZPFixer.00456044
00464531 . E8 F6F9F9FF call 1ZPFixer.00403F2C

从OEP看 就知道是Delphi的特征
  
  接下来用上大家都知道的Point-H破解法 俗称:万能断点
  
  首先启动程序F9运行
  
  任意输入假码 点ok (我就输入123456)
  
  好 成功断下
  
  在次F9运行让寄存器显示我们的假码
  
  接下来在 堆栈 寻找 返回到
  
  0012FC10  |00463EC4  返回到 1ZPFixer.00463EC4 来自 1ZPFixer.004366C0
  
  这些我相信同学们都学过了 接下来右键这里反汇编窗口数据跟随
00463DE8 /. 55 push ebp
00463DE9 |. 8BEC mov ebp,esp
00463DEB |. 33C9 xor ecx,ecx
00463DED |. 51 push ecx
00463DEE |. 51 push ecx
00463DEF |. 51 push ecx
00463DF0 |. 51 push ecx
00463DF1 |. 51 push ecx
00463DF2 |. 51 push ecx
00463DF3 |. 53 push ebx
00463DF4 |. 56 push esi
00463DF5 |. 8BF0 mov esi,eax
00463DF7 |. 33C0 xor eax,eax
00463DF9 |. 55 push ebp
00463DFA |. 68 4D3F4600 push 1ZPFixer.00463F4D
00463DFF |. 64:FF30 push dword ptr fs:[eax]
00463E02 |. 64:8920 mov dword ptr fs:[eax],esp
00463E05 |. 8D86 48030000 lea eax,dword ptr ds:[esi+0x348]
00463E0B |. BA 5C3F4600 mov edx,1ZPFixer.00463F5C
00463E10 |. 33C9 xor ecx,ecx
00463E12 |. 8A08 mov cl,byte ptr ds:[eax]
00463E14 |. 41 inc ecx
00463E15 |. E8 56EEF9FF call 1ZPFixer.00402C70
00463E1A |. 74 15 je short 1ZPFixer.00463E31
00463E1C |. BA 783F4600 mov edx,1ZPFixer.00463F78 ; ASCII "Encryption Flag Error!"
00463E21 |. 8B86 28030000 mov eax,dword ptr ds:[esi+0x328]
00463E27 |. E8 9428FDFF call 1ZPFixer.004366C0
00463E2C |. E9 F1000000 jmp 1ZPFixer.00463F22
00463E31 |> 8D45 F8 lea eax,[local.2]

在push ebp处F2下断
  
  取消万能断点
  
  F9运行程序
  
  好了 成功断在了push ebp
  
  F8单步往下走 这时候请注意 寄存器

在push ebp处F2下断

取消万能断点

F9运行程序

好了 成功断在了push ebp

F8单步往下走 这时候请注意 寄存器
00463DE8 /. 55 push ebp
00463DE9 |. 8BEC mov ebp,esp
00463DEB |. 33C9 xor ecx,ecx
00463DED |. 51 push ecx
00463DEE |. 51 push ecx
00463DEF |. 51 push ecx
00463DF0 |. 51 push ecx
00463DF1 |. 51 push ecx
00463DF2 |. 51 push ecx
00463DF3 |. 53 push ebx
00463DF4 |. 56 push esi
00463DF5 |. 8BF0 mov esi,eax
00463DF7 |. 33C0 xor eax,eax
00463DF9 |. 55 push ebp
00463DFA |. 68 4D3F4600 push 1ZPFixer.00463F4D
00463DFF |. 64:FF30 push dword ptr fs:[eax]
00463E02 |. 64:8920 mov dword ptr fs:[eax],esp
00463E05 |. 8D86 48030000 lea eax,dword ptr ds:[esi+0x348]
00463E0B |. BA 5C3F4600 mov edx,1ZPFixer.00463F5C
00463E10 |. 33C9 xor ecx,ecx
00463E12 |. 8A08 mov cl,byte ptr ds:[eax]
00463E14 |. 41 inc ecx
00463E15 |. E8 56EEF9FF call 1ZPFixer.00402C70
00463E1A |. 74 15 je short 1ZPFixer.00463E31 ; 这里跳过了一个提示 不知道什么提示 不管他
00463E1C |. BA 783F4600 mov edx,1ZPFixer.00463F78 ; ASCII "Encryption Flag Error!"
00463E21 |. 8B86 28030000 mov eax,dword ptr ds:[esi+0x328]
00463E27 |. E8 9428FDFF call 1ZPFixer.004366C0
00463E2C |. E9 F1000000 jmp 1ZPFixer.00463F22
00463E31 |> 8D45 F8 lea eax,[local.2]
00463E34 |. 8D96 59030000 lea edx,dword ptr ds:[esi+0x359]
00463E3A |. E8 6104FAFF call 1ZPFixer.004042A0
00463E3F |. 8B45 F8 mov eax,[local.2] ; 开始出现类似与密码的数字和字符了
00463E42 |. 8D55 FC lea edx,[local.1]
00463E45 |. E8 0E9DFFFF call 1ZPFixer.0045DB58
00463E4A |. 8B45 FC mov eax,[local.1] ; 成功出现真实密码52pojie
00463E4D |. 50 push eax
00463E4E |. 8D55 F4 lea edx,[local.3]
00463E51 |. 8B86 2C030000 mov eax,dword ptr ds:[esi+0x32C]
00463E57 |. E8 3428FDFF call 1ZPFixer.00436690
00463E5C >|. 8B55 F4 mov edx,[local.3] ; 出现我们的假码
00463E5F |. 58 pop eax
00463E60 |. E8 E305FAFF call 1ZPFixer.00404448
00463E65 >|. 74 6D je short 1ZPFixer.00463ED4  ;  假码与真码比较 真跳 假不跳 不跳就提示错误
00463E67 |. FE86 40030000 inc byte ptr ds:[esi+0x340]
00463E6D |. 8A9E 40030000 mov bl,byte ptr ds:[esi+0x340]
00463E73 |. 80FB 03 cmp bl,0x3
00463E76 |. 76 0C jbe short 1ZPFixer.00463E84
00463E78 |. 8BC6 mov eax,esi
00463E7A |. E8 85EAFEFF call 1ZPFixer.00452904
00463E7F |. E9 9E000000 jmp 1ZPFixer.00463F22
00463E84 |> 8D45 F0 lea eax,[local.4]
00463E87 |. 50 push eax
00463E88 |. 33C0 xor eax,eax
00463E8A |. 8AC3 mov al,bl
00463E8C |. BA 04000000 mov edx,0x4
00463E91 |. 2BD0 sub edx,eax
00463E93 |. 8955 E8 mov [local.6],edx
00463E96 |. C645 EC 00 mov byte ptr ss:[ebp-0x14],0x0
00463E9A |. 8D55 E8 lea edx,[local.6]
00463E9D |. 33C9 xor ecx,ecx
00463E9F |. B8 983F4600 mov eax,1ZPFixer.00463F98 ; ASCII "Password Error! %d tries left."
00463EA4 |. E8 3753FAFF call 1ZPFixer.004091E0
00463EA9 |. 8B55 F0 mov edx,[local.4]
00463EAC |. 8B86 28030000 mov eax,dword ptr ds:[esi+0x328]
00463EB2 |. E8 0928FDFF call 1ZPFixer.004366C0
00463EB7 |. 33D2 xor edx,edx
00463EB9 |. 8B86 2C030000 mov eax,dword ptr ds:[esi+0x32C]
00463EBF |. E8 FC27FDFF call 1ZPFixer.004366C0
00463EC4 |. 8B86 2C030000 mov eax,dword ptr ds:[esi+0x32C]
00463ECA |. 8B10 mov edx,dword ptr ds:[eax]
00463ECC |. FF92 C4000000 call dword ptr ds:[edx+0xC4]
00463ED2 |. EB 4E jmp short 1ZPFixer.00463F22
00463ED4 |> 8B86 38030000 mov eax,dword ptr ds:[esi+0x338]

--------------------------------------------------------------------------------
【经验总结】
  只要多去尝试 就会学到自己想学的东西 玩破解这几个月里 多谢邦邦 有机会 我们要吃十斤牛腰子 四十斤蚕卵
  
  第一次写破文 如果有什么不足的地方 希望各位同学和大牛指点一下 在次祝大家端午节快乐!
  
--------------------------------------------------------------------------------
【版权声明】: 本文原创于 吾爱破解Ruin, 转载请注明作者并保持文章的完整, 谢谢!

                                                       2012年06月23日 07:28:25





免费评分

参与人数 2热心值 +2 收起 理由
Chief + 1 欢迎分析讨论交流[吾爱破解论坛]有你更精彩.
Peace + 1 欢迎分析讨论交流,[吾爱破解论坛]有你更精.

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

老万 发表于 2012-6-23 07:47
学习了,谢谢分享
小咪咪 发表于 2012-6-23 07:47
1354669803 发表于 2012-6-23 07:57
Ruin牛V5  此来吾等小菜之楷模也...众鸟膜拜之神
索马里的海贼 发表于 2012-6-23 08:46
本帖最后由 索马里的海贼 于 2012-6-23 08:49 编辑

小菜都跟不上师傅的步伐了。
144643916 发表于 2012-6-23 09:21
谢谢分享,学习了……
a3620538 发表于 2012-6-23 09:24

果断ruin大神 感谢分享 学习一下
誓言 发表于 2012-6-23 09:24
不错,谢谢LZ分享
xie83544109 发表于 2012-6-23 09:35

多谢楼主分享,来学习一下
 楼主| Ruin 发表于 2012-6-23 09:49
索马里的海贼 发表于 2012-6-23 08:46
小菜都跟不上师傅的步伐了。

海贼师傅谦虚了。 以后多指教!
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-3-29 13:16

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表