- UID
- 76216
注册时间2014-6-14
阅读权限30
最后登录1970-1-1
龙战于野
TA的每日心情 | 开心 2020-8-20 01:17 |
---|
签到天数: 8 天 [LV.3]偶尔看看II
|
本帖最后由 hackhaa 于 2015-3-28 13:24 编辑
【破文标题】销售小票打印专家2.7.9不完美爆破
【破文作者】Hackhaa
【破文邮箱】[email protected]
【作者主页】就快有的了
【破解工具】OllyDbg
【破解平台】WinXp32
【软件名称】销售小票打印专家
【软件大小】2.7.9
【来源地址】自行搜索下载
【保护方式】注册码
【软件简介】
这是一款支持所有类型小票打印机,实现打印销售小票并可查询统计的软件,简洁且实用!
主要特点:
1、自动日期和销售票号
2、自动合计数量和金额
3、记忆商品名称并关联单价
4、可通过商品代码快速输入商品
5、可对小票记录进行查询统计
6、可适合任意宽度的小票打印纸
7、可打印LOGO图标
8、可打印英文和繁体字小票
----------------------------------------------
【破解声明】 仅供学习与交流之用,请不要用于商业用途。
----------------------------------------------
【破解过程】
因为工作比较忙,已经快5年没有自己破解软件了,因此到论坛快一年的时间里,也没有发表过一个帖子,本帖算是处女贴吧。
最近单位在查账,所有发票都要有明细清单,本地的还好,去重新打一个就成,外地的可就不好办了,所以没办法,只有找个销售小票打印软件自己打吧。
那么,问题来了。
在网上找了老半天,只有【销售小票打印专家】这款软件软件满足需求,找了一个2.7.7的破解版破解版,满心欢喜。结果用了20次后,提示需要注册之后才能使用,原来遇到了伪破解版本。继续在网上找了半天,也没有好使的。看到论坛里面的@F8LEFT 大大有对该作者软件的算法分析,给他留言,想问问他有没有试过破这款软件,可能是时间太短,他还没看到留言,自己急着用,没办法,逼得自己动手了。
从官方网站上下载了一个2015.03.15最新更新的2.7.9版本,首先查壳,发现是C++,无壳,顿时信心大增。尔后OD载入,查找ascii,很快来到注册判断的领空
- 0041A2DE 90 nop
- 0041A2DF 90 nop
- 0041A2E0 6A FF push -1
- 0041A2E2 68 B0764200 push 销售小票.004276B0
- 0041A2E7 64:A1 00000000 mov eax,dword ptr fs:[0]
- 0041A2ED 50 push eax
- 0041A2EE 64:8925 00000000 mov dword ptr fs:[0],esp
- 0041A2F5 83EC 34 sub esp,34
- 0041A2F8 56 push esi
- 0041A2F9 8BF1 mov esi,ecx
- 0041A2FB 6A 01 push 1
- 0041A2FD E8 D2870000 call <jmp.&MFC42.#6334>
- 0041A302 8D4C24 24 lea ecx,dword ptr ss:[esp+24]
- 0041A306 E8 E58C0000 call <jmp.&MFC42.#533>
- 0041A30B 8D4C24 10 lea ecx,dword ptr ss:[esp+10]
- 0041A30F C74424 40 0000000>mov dword ptr ss:[esp+40],0
- 0041A317 E8 CE8C0000 call <jmp.&MFC42.#350>
- 0041A31C 8D4C24 20 lea ecx,dword ptr ss:[esp+20]
- 0041A320 C64424 40 01 mov byte ptr ss:[esp+40],1
- 0041A325 E8 56870000 call <jmp.&MFC42.#540>
- 0041A32A 6A 00 push 0
- 0041A32C 8D4C24 24 lea ecx,dword ptr ss:[esp+24]
- 0041A330 C64424 44 02 mov byte ptr ss:[esp+44],2
- 0041A335 C74424 14 E8B2420>mov dword ptr ss:[esp+14],销售小票.0042B>
- 0041A33D C74424 1C 0000000>mov dword ptr ss:[esp+1C],0
- 0041A345 C74424 20 FFFFFFF>mov dword ptr ss:[esp+20],-1
- 0041A34D E8 28870000 call <jmp.&MFC42.#860>
- 0041A352 8D4C24 08 lea ecx,dword ptr ss:[esp+8]
- 0041A356 C64424 40 03 mov byte ptr ss:[esp+40],3
- 0041A35B E8 20870000 call <jmp.&MFC42.#540>
- 0041A360 8D86 BC030000 lea eax,dword ptr ds:[esi+3BC]
- 0041A366 8D4C24 08 lea ecx,dword ptr ss:[esp+8]
- 0041A36A 50 push eax
- 0041A36B C64424 44 04 mov byte ptr ss:[esp+44],4
- 0041A370 E8 61880000 call <jmp.&MFC42.#858>
- 0041A375 8B5424 08 mov edx,dword ptr ss:[esp+8]
- 0041A379 8D4C24 10 lea ecx,dword ptr ss:[esp+10]
- 0041A37D 51 push ecx
- 0041A37E 6A 00 push 0
- 0041A380 52 push edx
- 0041A381 8D4C24 30 lea ecx,dword ptr ss:[esp+30]
- 0041A385 E8 5A8C0000 call <jmp.&MFC42.#5194>
- 0041A38A 85C0 test eax,eax
- 0041A38C 75 18 jnz short 销售小票.0041A3A6
- 0041A38E 6A 10 push 10
- 0041A390 68 F04D4300 push 销售小票.00434DF0 ; 出错了
- 0041A395 68 D44D4300 push 销售小票.00434DD4 ; 请确认注册文件的可用性!
- 0041A39A 8BCE mov ecx,esi
- 0041A39C E8 2D870000 call <jmp.&MFC42.#4224>
- 0041A3A1 E9 6D010000 jmp 销售小票.0041A513
- 0041A3A6 8D4C24 04 lea ecx,dword ptr ss:[esp+4]
- 0041A3AA E8 D1860000 call <jmp.&MFC42.#540>
- 0041A3AF 8D4424 04 lea eax,dword ptr ss:[esp+4]
- 0041A3B3 8D4C24 24 lea ecx,dword ptr ss:[esp+24]
- 0041A3B7 50 push eax
- 0041A3B8 C64424 44 05 mov byte ptr ss:[esp+44],5
- 0041A3BD E8 1C8C0000 call <jmp.&MFC42.#5465>
- 0041A3C2 8D4C24 04 lea ecx,dword ptr ss:[esp+4]
- 0041A3C6 51 push ecx
- 0041A3C7 B9 C0624300 mov ecx,销售小票.004362C0
- 0041A3CC E8 05880000 call <jmp.&MFC42.#858>
- 0041A3D1 8D5424 04 lea edx,dword ptr ss:[esp+4]
- 0041A3D5 8D4C24 24 lea ecx,dword ptr ss:[esp+24]
- 0041A3D9 52 push edx
- 0041A3DA E8 FF8B0000 call <jmp.&MFC42.#5465>
- 0041A3DF 68 B4624300 push 销售小票.004362B4
- 0041A3E4 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
- 0041A3E8 E8 F18B0000 call <jmp.&MFC42.#5465>
- 0041A3ED 68 A8624300 push 销售小票.004362A8
- 0041A3F2 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
- 0041A3F6 E8 E38B0000 call <jmp.&MFC42.#5465>
- 0041A3FB 68 A4624300 push 销售小票.004362A4
- 0041A400 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
- 0041A404 E8 D58B0000 call <jmp.&MFC42.#5465>
- 0041A409 68 A0624300 push 销售小票.004362A0
- 0041A40E 8D4C24 28 lea ecx,dword ptr ss:[esp+28]
- 0041A412 E8 C78B0000 call <jmp.&MFC42.#5465>
- 0041A417 8D4C24 24 lea ecx,dword ptr ss:[esp+24]
- 0041A41B E8 B88B0000 call <jmp.&MFC42.#1997>
- 0041A420 A1 B8624300 mov eax,dword ptr ds:[4362B8]
- 0041A425 50 push eax
- 0041A426 8B4424 08 mov eax,dword ptr ss:[esp+8]
- 0041A42A 50 push eax
- 0041A42B FF15 38974200 call dword ptr ds:[<&MSVCRT._mbscmp>>; msvcrt._mbscmp
- 0041A431 83C4 08 add esp,8
- 0041A434 85C0 test eax,eax
- 0041A436 0F85 B6000000 jnz 销售小票.0041A4F2
- 0041A43C 51 push ecx
- 0041A43D 8BCC mov ecx,esp
- 0041A43F 896424 10 mov dword ptr ss:[esp+10],esp
- 0041A443 68 B4624300 push 销售小票.004362B4
- 0041A448 E8 71870000 call <jmp.&MFC42.#535>
- 0041A44D E8 4EDDFEFF call 销售小票.004081A0
- 0041A452 83C4 04 add esp,4
- 0041A455 85C0 test eax,eax
- 0041A457 0F84 95000000 je 销售小票.0041A4F2
- 0041A45D 8D4C24 0C lea ecx,dword ptr ss:[esp+C]
- 0041A461 E8 1A860000 call <jmp.&MFC42.#540>
- 0041A466 8B0D BC624300 mov ecx,dword ptr ds:[4362BC]
- 0041A46C 8D5424 0C lea edx,dword ptr ss:[esp+C]
- 0041A470 51 push ecx
- 0041A471 68 64454300 push 销售小票.00434564 ; %s\posp.dll
- 0041A476 52 push edx
- 0041A477 C64424 4C 06 mov byte ptr ss:[esp+4C],6
- 0041A47C E8 3B860000 call <jmp.&MFC42.#2818>
- 0041A481 8B4424 18 mov eax,dword ptr ss:[esp+18]
- 0041A485 8B4C24 14 mov ecx,dword ptr ss:[esp+14]
- 0041A489 83C4 0C add esp,0C
- 0041A48C 6A 00 push 0
- 0041A48E 50 push eax
- 0041A48F 51 push ecx
- 0041A490 FF15 DC904200 call dword ptr ds:[<&KERNEL32.CopyFi>; kernel32.CopyFileA
- 0041A496 85C0 test eax,eax
- 0041A498 74 35 je short 销售小票.0041A4CF
- 0041A49A 8B15 BC624300 mov edx,dword ptr ds:[4362BC]
- 0041A4A0 52 push edx
- 0041A4A1 FF15 D8904200 call dword ptr ds:[<&KERNEL32.SetCur>; kernel32.SetCurrentDirectoryA
- 0041A4A7 6A 40 push 40
- 0041A4A9 68 CC4D4300 push 销售小票.00434DCC ; 恭喜
- 0041A4AE 68 C04D4300 push 销售小票.00434DC0 ; 注册成功!
- 0041A4B3 8BCE mov ecx,esi
- 0041A4B5 E8 14860000 call <jmp.&MFC42.#4224>
- 0041A4BA 6A 00 push 0
- 0041A4BC 8BCE mov ecx,esi
- 0041A4BE C705 CC624300 010>mov dword ptr ds:[4362CC],1
- 0041A4C8 E8 DD850000 call <jmp.&MFC42.#2645>
- 0041A4CD EB 13 jmp short 销售小票.0041A4E2
- 0041A4CF 6A 10 push 10
- 0041A4D1 68 F04D4300 push 销售小票.00434DF0 ; 出错了
- 0041A4D6 68 B44D4300 push 销售小票.00434DB4 ; 注册失败!
- 0041A4DB 8BCE mov ecx,esi
- 0041A4DD E8 EC850000 call <jmp.&MFC42.#4224>
- 0041A4E2 8D4C24 0C lea ecx,dword ptr ss:[esp+C]
- 0041A4E6 C64424 40 05 mov byte ptr ss:[esp+40],5
- 0041A4EB E8 7E850000 call <jmp.&MFC42.#800>
- 0041A4F0 EB 13 jmp short 销售小票.0041A505
- 0041A4F2 6A 10 push 10
- 0041A4F4 68 F04D4300 push 销售小票.00434DF0 ; 出错了
- 0041A4F9 68 A04D4300 push 销售小票.00434DA0 ; 注册文件不正确!
- 0041A4FE 8BCE mov ecx,esi
- 0041A500 E8 C9850000 call <jmp.&MFC42.#4224>
- 0041A505 8D4C24 04 lea ecx,dword ptr ss:[esp+4]
- 0041A509 C64424 40 04 mov byte ptr ss:[esp+40],4
- 0041A50E E8 5B850000 call <jmp.&MFC42.#800>
- 0041A513 8D4C24 08 lea ecx,dword ptr ss:[esp+8]
- 0041A517 C64424 40 03 mov byte ptr ss:[esp+40],3
- 0041A51C E8 4D850000 call <jmp.&MFC42.#800>
- 0041A521 C74424 10 E8B2420>mov dword ptr ss:[esp+10],销售小票.0042B>
- 0041A529 8D4C24 20 lea ecx,dword ptr ss:[esp+20]
- 0041A52D C64424 40 07 mov byte ptr ss:[esp+40],7
- 0041A532 E8 37850000 call <jmp.&MFC42.#800>
- 0041A537 8D4C24 24 lea ecx,dword ptr ss:[esp+24]
- 0041A53B C74424 10 689E420>mov dword ptr ss:[esp+10],销售小票.00429>
- 0041A543 C74424 40 FFFFFFF>mov dword ptr ss:[esp+40],-1
- 0041A54B E8 828A0000 call <jmp.&MFC42.#798>
- 0041A550 8B4C24 38 mov ecx,dword ptr ss:[esp+38]
- 0041A554 5E pop esi
- 0041A555 64:890D 00000000 mov dword ptr fs:[0],ecx
- 0041A55C 83C4 40 add esp,40
- 0041A55F C3 retn
复制代码 分析发现,下面这两个判断都是指向【注册文件不正确】,遂nop之
- 0041A434 85C0 test eax,eax
- 0041A436 0F85 B6000000 jnz 销售小票.0041A4F2
- 0041A43C 51 push ecx
- 0041A43D 8BCC mov ecx,esp
- 0041A43F 896424 10 mov dword ptr ss:[esp+10],esp
- 0041A443 68 B4624300 push 销售小票.004362B4
- 0041A448 E8 71870000 call <jmp.&MFC42.#535>
- 0041A44D E8 4EDDFEFF call 销售小票.004081A0
- 0041A452 83C4 04 add esp,4
- 0041A455 85C0 test eax,eax
- 0041A457 0F84 95000000 je 销售小票.0041A4F2
- 0041A45D 8D4C24 0C lea ecx,dword ptr ss:[esp+C]
复制代码 之后就是保存修改到文件,然后伪造一个后缀为.pkey的注册文件,打开软件点击注册就突破限制了。
【破解总结】
之所以叫做不完美爆破,是因为这款软件有文件的重启验证,点击注册之后,相关信息都保存在posp.dll里面,注册码不对,肯定显示为注册,所以,每次重新打开软件都得重新注册一下。
因为工作实在太忙,没时间去细扣重启验证的关键跳转,能用就成。大大们有兴趣指导,俺也会虚心受教。
【版权声明】 本文有@Hackhaa原创于PYG,转载请注明作者与出处。
|
评分
-
查看全部评分
|