系统 : Windows xp

程序 : cztria~1

程序下载地址 :http://pan.baidu.com/s/1slUwmVr

要求 : 爆破

使用工具 : OD

可在看雪论坛中查找关于此程序的破文:传送门

废话不多说,直接查询到字符串:“            you did it!”,双击定位:

0040137B  |.  6A          push                                   ; /Count = 40 (64.)
0040137D |. push ; |pediy
|. FF35 push dword ptr [] ; |hWnd = 000405D8 (class='Edit',parent=000505C0)
|. E8 A3080000 call <jmp.&USER32.GetWindowTextA> ; \GetWindowTextA
0040138D |. 83F8 cmp eax, ; 小于等于4?
|. 0F8E 9F000000 jle
|. 6A push ; /Count = 40 (64.)
|. push ; |12345
0040139D |. B90B0000 push 0BB9 ; |ControlID = BB9 (3001.)
004013A2 |. FF75 push dword ptr [ebp+] ; |hWnd
004013A5 |. E8 6E080000 call <jmp.&USER32.GetDlgItemTextA> ; \GetDlgItemTextA
004013AA |. 83F8 cmp eax, ; 小于等于4?
004013AD |. 0F8E jle
004013B3 |. A3 mov dword ptr [], eax
004013B8 |. FF35 push dword ptr [] ; /hWnd = 000405D8 (class='Edit',parent=000505C0)
004013BE |. E8 AF080000 call <jmp.&USER32.SetFocus> ; \SetFocus
004013C3 |. BF mov edi, ; pediy
004013C8 |. BE mov esi, ; pediy
004013CD |> AC /lods byte ptr [esi] ; 循环迭代用户名字符串
004013CE |. 0C |or al,
004013D0 |. |je short 004013D7
004013D2 |. 0C |or al,
004013D4 |. AA |stos byte ptr es:[edi]
004013D5 |.^ EB F6 \jmp short 004013CD
004013D7 |> BF A0324000 mov edi, 004032A0
004013DC |. BE mov esi, ;
004013E1 |. 8D1D lea ebx, dword ptr []
004013E7 |. 33C9 xor ecx, ecx
004013E9 |> AC /lods byte ptr [esi] ; 循环迭代 密码
004013EA |. 0C |or al,
004013EC |. |je short
004013EE |. 8A13 |mov dl, byte ptr [ebx] ; 循环迭代 用户名
004013F0 |. 2AD0 |sub dl, al ; 用户名字符 - 密码字符
004013F2 |. 80CA |or dl, ; 如果相同,则跳转出错
004013F5 |. 3E |je short
004013F7 |. 8AC2 |mov al, dl
004013F9 |. 0F |and al, 0F
004013FB |. 0C |or al, ; al为0?
004013FD |. |je short ; 为0则跳转出错
004013FF |. AA |stos byte ptr es:[edi] ; 保存al成表
|. 02C8 |add cl, al ; 结果累加
|. |inc ebx
|.^ EB E4 \jmp short 004013E9
|> 890D 6A324000 mov dword ptr [40326A], ecx ; 保存累加结果
0040140B |. E8 call ; 关键call
|. BE A0324000 mov esi, 004032A0
|. 8B15 mov edx, dword ptr [] ; 取密码长度
0040141B |. C1EA shr edx, ; 逻辑右移
0040141E |. 03F2 add esi, edx
|. 8A06 mov al, byte ptr [esi] ; 表中取值
|. 33D2 xor edx, edx
|. 8B15 6E324000 mov edx, dword ptr [40326E]
0040142A |. 2BD0 sub edx, eax
0040142C |. A1 6A324000 mov eax, dword ptr [40326A]
|. 3BC2 cmp eax, edx
jz short
|> push ; /Style = MB_OK|MB_TASKMODAL
0040143A |. D1314000 push 004031D1 ; | error
0040143F |. F9314000 push 004031F9 ; | sorry cracker, wrong.
|. FF75 push dword ptr [ebp+] ; |hOwner
|. E8 call <jmp.&USER32.MessageBoxA> ; \MessageBoxA
0040144C |. 6A push ; /Length = 40 (64.)
0040144E |. E0324000 push 004032E0 ; |Destination = cztria~1.004032E0
|. E8 call <jmp.&KERNEL32.RtlZeroMemory> ; \RtlZeroMemory
|. 6A push ; /Length = 40 (64.)
0040145A |. A0334000 push 004033A0 ; |Destination = cztria~1.004033A0
0040145F |. E8 4A080000 call <jmp.&KERNEL32.RtlZeroMemory> ; \RtlZeroMemory
|. EB 2F jmp short
|> push ; /Style = MB_OK|MB_TASKMODAL
0040146B |. E5314000 push 004031E5 ; | <registered>
|. push ; | you did it!
|. FF75 push dword ptr [ebp+] ; |hOwner
|. E8 D1070000 call <jmp.&USER32.MessageBoxA> ; \MessageBoxA
0040147D |. 6A push ; /Length = 40 (64.)
0040147F |. E0324000 push 004032E0 ; |Destination = cztria~1.004032E0
|. E8 call <jmp.&KERNEL32.RtlZeroMemory> ; \RtlZeroMemory
|. 6A push ; /Length = 40 (64.)
0040148B |. A0334000 push 004033A0 ; |Destination = cztria~1.004033A0
|. E8 call <jmp.&KERNEL32.RtlZeroMemory> ; \RtlZeroMemory

跟入 0040140B |. E8 27020000 call 00401637 ; 关键call

  /$  BE A0324000   mov     esi, 004032A0
0040163C |. 8B15 mov edx, dword ptr [] ; 取密码长度
|. push edx
|. 33C0 xor eax, eax
|. 83EA sub edx,
|. 03F2 add esi, edx
0040164A |. 8A06 mov al, byte ptr [esi] ; 表中取值
0040164C |. F7E0 mul eax
0040164E |. 5A pop edx
0040164F |. 83EA sub edx,
|. F7E2 mul edx
|. B9 mov ecx,
|> 2BC1 /sub eax, ecx
0040165B |. 83F8 |cmp eax, ; eax为0?
0040165E |. 7E |jle short
|. 83C2 |add edx,
|. 83C1 |add ecx,
|.^ EB F1 \jmp short
|> push edx ; 保存edx
|. BE A0324000 mov esi, 004032A0
0040166E |. 8BFE mov edi, esi
|. 8B15 mov edx, dword ptr [] ; 取密码长度
|. 33C0 xor eax, eax
|. 83EA sub edx,
0040167B |. 03F2 add esi, edx
0040167D |. 8A06 mov al, byte ptr [esi] ; 表中取值
0040167F |. 83C0 add eax,
|. 5A pop edx
|. 03C2 add eax, edx
|. D1E8 shr eax,
|. 8B15 mov edx, dword ptr [] ; 取密码长度
0040168D |. 03FA add edi, edx
0040168F |. AA stos byte ptr es:[edi]
|. F7E0 mul eax
|. 8B15 mov edx, dword ptr [] ; 取密码长度
|. 83EA sub edx,
0040169B |. F7E2 mul edx
0040169D |. B9 mov ecx,
004016A2 |> 2BC1 /sub eax, ecx
004016A4 |. 83F8 |cmp eax, ; eax为0?
004016A7 |. 7E |jle short 004016B1
004016A9 |. 83C2 |add edx,
004016AC |. 83C1 |add ecx,
004016AF |.^ EB F1 \jmp short 004016A2
004016B1 |> push edx
004016B2 |. BE A0324000 mov esi, 004032A0
004016B7 |. 8B15 mov edx, dword ptr [] ; 取密码长度
004016BD |. 33C0 xor eax, eax
004016BF |. 03F2 add esi, edx
004016C1 |. 8A06 mov al, byte ptr [esi] ; 取表中末位
004016C3 |. 83C0 add eax,
004016C6 |. 5A pop edx
004016C7 |. 03C2 add eax, edx
004016C9 |. D1E8 shr eax,
004016CB |. A3 6E324000 mov dword ptr [40326E], eax ; 保存结果
004016D0 \. C3 retn

这是一个典型的二元函数加密,将用户名与密码的差值生成一个表 和 累加值。再根据表生成两个特殊值。

输入的结果差值要符合 特殊值1 - 特殊值2 == 累加结果

我们可以直接将判断的条件修改成:

00401433 /75 31 jnz short 00401466

就可以完成爆破了。

最新文章

  1. 利用Python进行数据分析(15) pandas基础: 字符串操作
  2. LeetCode 368
  3. IOS网络第五天 AFN-03-监控网络状态
  4. IOS开发常见错误整理
  5. ecshop 版权问题 Powered by ECShop
  6. Oracle11g的delayed failed logins特性引起的性能问题
  7. Archlinux 添加无线网络
  8. 初识 TextKit
  9. Python学习(22)python网络编程
  10. Java命名:
  11. javascript中常用的一些功能及正则表达式的用法
  12. my9.23(输入输出,写操作)
  13. Web —— java web 项目开发 笔记
  14. 顶尖数据挖掘辅助教学套件(TipDM-T6)产品白皮书
  15. 【Learning】带花树——一般图最大匹配
  16. centos7服务的管理
  17. 免费申请使用IBM Cloud Lite(轻量套餐) 续
  18. Vue系列之 =&gt; Watch监视路由地址改变
  19. STL set简单用法
  20. OPENSTACK在RHEL7安装;admin创建虚拟机模板供demo使用

热门文章

  1. 一个在线jpg png转ICO的网站
  2. nginx 配置ci ,tp
  3. jquery中select的应用
  4. PHP7 错误处理
  5. 算法练习之leetcode系列1-3
  6. Java中将一个字符串传入数组的几种方法
  7. 面试复习(C++)之基数排序
  8. Windows环境下MongoDB的安装与配置
  9. java中Jbutton常用设置
  10. leetcode 日记 4sum java