|
[破解RSA512要多久]谁见过这种BT加密算法,帮忙分析分析 [完结]
以上代码在 VC6.0 win2000/winxp 下调试通过,使用了比较多的内联汇编。ww.dll 是直接使用IDA dump出来的 |
|
|
|
[注意]熊猫烧香作者:不是五年,是无期徒刑...
最初由 指令CC 发布 哎,一句感慨而已,我只是觉得对一个20来岁的年轻人来说判无期很是惋惜,虽然还没最终裁决。对于技术而言我不想评价什么,我相信认真逆向过熊猫烧香的朋友或多或少都得到些东西或想法,这就够了不是吗。 如今网络上想要那方面的资料,文章,甚至代码都很方便,能将需要的知识点,汇集起来并能达到自己预期的目的就不是一件简单的事,需要很多的精力,在这个“拼拼凑凑”过程中我们能学到很多东西,我相信谁都是这么过来的,学习就不是一件简单的事 :)最后我要指出你的一个错误的想法,绝对不是你所认为的高手都会用一个笔,一张纸写出八皇后问题的求解代码的! |
|
[注意]熊猫烧香作者:不是五年,是无期徒刑...
晕哦,无期有点过分了,不过在里面表现的好点,可能会减刑的,这种人好好教育教育对国家还是有用的。 |
|
[破解RSA512要多久]谁见过这种BT加密算法,帮忙分析分析 [完结]
Fun2() 可以看下面这段汇编代码 // 以下是将128字节聚合成64字节的处理函数代码 /*---------------------------------------------------------------------------------- 0041F0BF 90 nop ; 6个参数 主要串入 表地址 和B数据 0041F0C0 8B4424 0C mov eax, [esp+C] ; 加密表地址 固定 0041F0C4 8B4C24 10 mov ecx, [esp+10] ; 20 长度 0041F0C8 83EC 14 sub esp, 14 0041F0CB 83F9 01 cmp ecx, 1 0041F0CE 53 push ebx 0041F0CF 66:8B18 mov bx, [eax] ; 取头2位数据 0041F0D2 55 push ebp 0041F0D3 56 push esi 0041F0D4 7E 0B jle short 0041F0E1 0041F0D6 66:8B40 02 mov ax, [eax+2] ; 取后头2位 0041F0DA 66:894424 10 mov [esp+10], ax 0041F0DF EB 08 jmp short 0041F0E9 0041F0E1 C74424 10 00000>mov dword ptr [esp+10], 0 0041F0E9 8B4424 28 mov eax, [esp+28] ; 21 0041F0ED 33F6 xor esi, esi 0041F0EF 33ED xor ebp, ebp 0041F0F1 2BC1 sub eax, ecx 0041F0F3 894424 1C mov [esp+1C], eax ; 保存21-20 =1 0041F0F7 0F88 82010000 js 0041F27F 0041F0FD 81E3 FFFF0000 and ebx, 0FFFF ; 头数据和 0xFFFF 取底位数据 0041F103 57 push edi 0041F104 895C24 18 mov [esp+18], ebx 0041F108 EB 06 jmp short 0041F110 0041F10A 8B5C24 18 mov ebx, [esp+18] ; 取加密表头数据 0041F10E 33F6 xor esi, esi ; 清ESI 0 0041F110 3BEE cmp ebp, esi 0041F112 75 0A jnz short 0041F11E 0041F114 8B4C24 28 mov ecx, [esp+28] ; ECX保存 散列数据地址 0041F118 897424 10 mov [esp+10], esi 0041F11C EB 14 jmp short 0041F132 0041F11E 8B4C24 28 mov ecx, [esp+28] ; 保存128位 数据表首地址 0041F122 33C0 xor eax, eax ; 晴空 EAX 0 0041F124 66:8B4469 FE mov ax, [ecx+ebp*2-2] ; 取数据表中当前值(前64位数据) 0041F129 66:897469 FE mov [ecx+ebp*2-2], si ; 清掉数据该位数据 值保存到 EAX 0041F12E 894424 10 mov [esp+10], eax ; 将该数据保存到esp+10 0041F132 8B5424 2C mov edx, [esp+2C] ; 40H 长度 0041F136 8D42 FF lea eax, [edx-1] ; 20 3F 0041F139 3BE8 cmp ebp, eax 0041F13B 74 07 je short 0041F144 ; 以下假设128字节开头数据形势xx1表示开始xx127最后一个 0041F13D 33F6 xor esi, esi ; 128字节表开始是散列最后一次的完整数据 0041F13F 66:8B7469 02 mov si, [ecx+ebp*2+2] ; 当前数据表头取xx3 xx1(散列的高位) xx2(散列的低位) xx3 0041F144 8B4424 10 mov eax, [esp+10] ; xx1保存 EAX 0041F148 3BC3 cmp eax, ebx 0041F14A 72 07 jb short 0041F153 0041F14C BF FFFF0000 mov edi, 0FFFF 0041F151 EB 56 jmp short 0041F1A9 0041F153 33D2 xor edx, edx 0041F155 66:8B1469 mov dx, [ecx+ebp*2] ; 当前计算的值xx2 0041F159 8BCA mov ecx, edx ; 当前值保存到ECX 0041F15B 33D2 xor edx, edx ; 清EDX 0 0041F15D C1E0 10 shl eax, 10 ; 将地位转换成高位 0041F160 0BC8 or ecx, eax ; 高低位合并 0041F162 8BC1 mov eax, ecx ; 结果保存到EAX 0041F164 F7F3 div ebx ; EAX / EBX 结果保存到EBX 0041F166 33D2 xor edx, edx 0041F168 8BF8 mov edi, eax 0041F16A 8BC1 mov eax, ecx 0041F16C F7F3 div ebx ; 77BF6737 0041F16E 8B4C24 14 mov ecx, [esp+14] 0041F172 81E1 FFFF0000 and ecx, 0FFFF ; 该值固定 6737 0041F178 8BC1 mov eax, ecx ; 6737 0041F17A 0FAFC7 imul eax, edi ; EAX保存 6737*上面的除商 0041F17D 8BDA mov ebx, edx ; 保存 除法的余 0041F17F C1E3 10 shl ebx, 10 ; 将余移至 高位 0041F182 03DE add ebx, esi ; 将值和表中下一位数据相加 0041F184 3BC3 cmp eax, ebx ; 数据代号 A1 0041F186 76 1D jbe short 0041F1A5 0041F188 8B5C24 18 mov ebx, [esp+18] ; 取当前加密表数据 0041F18C 4F dec edi ; 上面的商-1 = C1 0041F18D 03D3 add edx, ebx ; 将余+当前加密表数据 0041F18F 81E2 FFFF0000 and edx, 0FFFF ; 只取地位 0041F195 3BD3 cmp edx, ebx ; 到此 数据代号 B1 0041F197 72 0C jb short 0041F1A5 0041F199 C1E2 10 shl edx, 10 ; 将B1置高位 = B2 0041F19C 03D6 add edx, esi ; B2+数据表后一位的数据 =B3 0041F19E 2BC1 sub eax, ecx ; (低位)A1 - B3 保存到 EAX 0041F1A0 3BC2 cmp eax, edx 0041F1A2 76 01 jbe short 0041F1A5 0041F1A4 4F dec edi 0041F1A5 8B4C24 28 mov ecx, [esp+28] ; B数据地址 0041F1A9 8B4424 34 mov eax, [esp+34] ; 20 0041F1AD 33DB xor ebx, ebx 0041F1AF 48 dec eax 0041F1B0 85C0 test eax, eax 0041F1B2 7C 46 jl short 0041F1FA 0041F1B4 8B5424 30 mov edx, [esp+30] ; 以下比较关键 0041F1B8 8D3442 lea esi, [edx+eax*2] ; 取加密表最后数据 0041F1BB 8D1428 lea edx, [eax+ebp] 0041F1BE 40 inc eax ; eax+1 = 0x20 0041F1BF 8D1451 lea edx, [ecx+edx*2] ; 指向128字节的64字节处 0041F1C2 894424 1C mov [esp+1C], eax ; eax保存到参数总 0041F1C6 33C0 xor eax, eax ; 清一下EAX 一般此刻保存的是记数器的值 0041F1C8 66:8B06 mov ax, [esi] ; 最后开始加密表2字节 D1 0041F1CB 0FAFC7 imul eax, edi ; D1*C1 保存到EAX = D2 0041F1CE 03C3 add eax, ebx ; 上一次计算的高位数据值 有可能+1看下面的计算 0041F1D0 8BC8 mov ecx, eax ; 结果保存到 ECX 0041F1D2 C1E9 10 shr ecx, 10 ; 取高位 0041F1D5 8BD9 mov ebx, ecx ; 保存到 EBX 高位数据 0041F1D7 66:8B0A mov cx, [edx] ; A数据散列后的后64/64 根据计算的目的不同而不同 0041F1DA 66:3BC1 cmp ax, cx ; E1 0041F1DD 76 01 jbe short 0041F1E0 ; ax < cx jmp 0041F1DF 43 inc ebx ; EBX+1 下回运算时使用 0041F1E0 2BC8 sub ecx, eax ; E1 - D2 结果保存到ECX 0041F1E2 8B4424 1C mov eax, [esp+1C] ; 20-- 0041F1E6 66:890A mov [edx], cx ; 取低位 写入当前数据表 0041F1E9 83EE 02 sub esi, 2 ; 加密表和数据表指向下一个处理的位置 0041F1EC 83EA 02 sub edx, 2 0041F1EF 48 dec eax ; 记数器 - 1 0041F1F0 894424 1C mov [esp+1C], eax ; esp+1c保存当前的记数器值 0041F1F4 ^ 75 D0 jnz short 0041F1C6 ; 继续处理 0041F1F6 8B4C24 28 mov ecx, [esp+28] ; B数据地址 0041F1FA 3B5C24 10 cmp ebx, [esp+10] 0041F1FE 74 49 je short 0041F249 ; 跳上去 循环 0041F200 8B5424 34 mov edx, [esp+34] 0041F204 33C0 xor eax, eax 0041F206 8D72 FF lea esi, [edx-1] 0041F209 85F6 test esi, esi 0041F20B 7C 3B jl short 0041F248 0041F20D 8B5424 30 mov edx, [esp+30] 0041F211 8D1472 lea edx, [edx+esi*2] 0041F214 03F5 add esi, ebp 0041F216 8D0C71 lea ecx, [ecx+esi*2] 0041F219 8B7424 34 mov esi, [esp+34] 0041F21D 897424 1C mov [esp+1C], esi 0041F221 33DB xor ebx, ebx 0041F223 33F6 xor esi, esi 0041F225 66:8B19 mov bx, [ecx] 0041F228 66:8B32 mov si, [edx] 0041F22B 03D8 add ebx, eax 0041F22D 83EA 02 sub edx, 2 0041F230 83E9 02 sub ecx, 2 0041F233 8D0433 lea eax, [ebx+esi] 0041F236 8B7424 1C mov esi, [esp+1C] 0041F23A 66:8941 02 mov [ecx+2], ax 0041F23E C1E8 10 shr eax, 10 0041F241 4E dec esi 0041F242 897424 1C mov [esp+1C], esi 0041F246 ^ 75 D9 jnz short 0041F221 0041F248 4F dec edi 0041F249 8B4424 38 mov eax, [esp+38] 0041F24D 85C0 test eax, eax 0041F24F 74 20 je short 0041F271 0041F251 8B4C24 2C mov ecx, [esp+2C] 0041F255 8B7424 34 mov esi, [esp+34] 0041F259 8B5C24 3C mov ebx, [esp+3C] 0041F25D 2BCD sub ecx, ebp 0041F25F 2BCE sub ecx, esi 0041F261 C1E1 04 shl ecx, 4 0041F264 03CB add ecx, ebx 0041F266 51 push ecx 0041F267 57 push edi 0041F268 50 push eax 0041F269 E8 22000000 call 0041F290 0041F26E 83C4 0C add esp, 0C 0041F271 8B4424 20 mov eax, [esp+20] 0041F275 45 inc ebp 0041F276 3BE8 cmp ebp, eax ; 32轮 0041F278 ^ 0F8E 8CFEFFFF jle 0041F10A 0041F27E 5F pop edi 0041F27F 5E pop esi 0041F280 5D pop ebp 0041F281 5B pop ebx 0041F282 83C4 14 add esp, 14 0041F285 C3 retn ;返回 ------------------------END----------------------- 首帖的代码在winxp,win2000 +VC6.0 是调试通过的,由于公司FTP关闭我家的PC没原代码,等明天去公司我会将代码发上来.可以调试的跑跑就很清楚了。 . |
|
[破解RSA512要多久]谁见过这种BT加密算法,帮忙分析分析 [完结]
终于忙完了过年回到了北京,一看帖子没一个回复,伤心啊 可能是我没说明白,仔细描述一下,看不懂的兄弟也帮忙顶顶吧 这算法比较有意思的,可以研究研究,或许以后你会遇到。 算法总体描述: 64字节的明文数据经过16轮的循环,经过2个函数的处理,最后输出64字节的密文数据,这2个函数,我暂时叫它们,Fun1(), Fun2()。 先说Fun()1函数 Fun()1: Fun1()将64字节的明文数据散列成128字节的数据,处理大致是这样的见下面的明文数据 . 64字节的明文数据: 0x02 ,0x00 ,0x0D ,0x66 ,0xA9 ,0x52 ,0x0D ,0x56 , 0xB2 ,0x55 ,0xB6 ,0x91 ,0x7A ,0x45 ,0xE9 ,0xA1, 0x9A ,0xB4 ,0x8C ,0x02 ,0xA0 ,0x49 ,0x00 ,0xD8 , 0x64 ,0x35 ,0x35 ,0x39 ,0x64 ,0x61 ,0x37 ,0x63, 0x31 ,0x32 ,0x36 ,0x65 ,0x30 ,0x30 ,0x39 ,0x32 , 0x63 ,0x37 ,0x30 ,0x63 ,0x64 ,0x65 ,0x36 ,0x32, 0x65 ,0x37 ,0x33 ,0x66 ,0x64 ,0x34 ,0x39 ,0x61 , 0x33 ,0x34 ,0x61 ,0x64 ,0x64 ,0x38 ,0x32 ,0x35 以上是64字节的明文数据,Fun1()函数,经过32轮循环 从上数据表中以word形式从最后2字节开始循环的逐个相乘,如上面的数据最后2个字节是0x32,0x35, word形式就是0x3532,第一次0x3532*0x3532=0xB0DBDC4,取输出缓冲(128字节的缓冲)的当前数据(这里就是缓冲指针指向最后2个字节的数据),加上上一次计算的高位数据,再加上0xB0DBDC4,(注:128字节的缓冲开始的时候都被初始化0,现在是第一次计算,所以没有高位数据,也就是0xB0DBDC4+0+0=0xB0DBDC4),将0xB0DBDC4高底位分开,低位0xBDC4写入新缓冲地址,高位保存,用做下会计算使用,然后字符指针-2只向前2位,就是上数据表的0x64,0x38,和上面一样,0x3532*0x3864+0(当前输出缓冲数据)+0xB0D(上一次的高位),...如此循环将数据表的数据全部处理完毕,最后输出128字节的数据. 以下是Fun1()的汇编代码 __asm { mov edx, offset szdata ; 取数据表 mov esi, i ; esi保存当前的循环计数 mov ebx, offset szbuffer[0x40] ; 指向128表2段位置(64字节1段/64字节2段) lea edx, [edx+esi*2] ; 指向数据表尾 lea ecx, [ebx+esi*2+2] ; 指向缓冲表尾 mov edi, edx ; 将数据表尾的地址保存到edi xor ebx, ebx ; 清空EBX sub edx, 2 ; 新表数据和当前表数据值 sub ecx, 2 ; 向下2位数据 mov edi, dwbase ; 取出本轮的基数 mov bx, [edi] ; 获取当前的表基值 N xor ebp, ebp ; 清空EBP mov bp, [edx+2] ; 得到当前表的值 B imul ebx, ebp ; N*B 结果保存到ebx中 xor ebp, ebp ; 清空表EBP xor eax , eax mov eax, ecx sub eax, k ; eax指向本轮数据缓冲的地址 mov ecx, eax ; mov bp, [ecx] ; 获取新数据表中的当前数据 mov eax, dwHindex ; 上轮的高位数据保存到eax add ebp, eax ; 上一次进位数据加上新数据表中的当前位 lea eax, [ebx+ebp] ; 当前乘积+edp数据 ; EAX保存了整个计算的结果 mov [ecx], ax ; 将底位数据写入新表当前位置 mov dwHindex, eax ; dwHindex保存当前的值 } //取高位用于下轮的计算使用 __asm push ecx dwHindex >>= 16; //取高位,保存到dwHindex,用于下次计算 __asm pop ecx 先描述到这到这里有朋友见过这种算法吗,或者说说想法,小弟不胜感激. Fun2()就是将Fun1()128字节的数据压缩成64字节的数据,由于比较长,又刚下飞机比较累,等过几天详细描述,再次谢谢了. |
|
[原创][入门算法]三维立体图像制作大师v3.15
牛X,珍藏.. |
|
[XX]不想放出去的补丁被别人放出去了还打上了原创标记
技术就是实事求是,弄虚作假的人永远不会进步,BS那些弄虚作假的人 |
|
[原创]被CodeVeil加密的.net程序的dump与修复
过年还如此努力真是敬佩 |
|
rFactor 1.250 破解过程详述
强 好文,膜拜膜拜 |
|
[求助]一个牛软件的破解
有必要搞的这么复杂吗 |
|
[讨论]能否写出这个表的实现算法?
关注中... |
|
祝大家春节快乐
好喜庆 我也凑凑热闹 |
|
[原创]被CodeVeil加密的.net程序的dump与修复
图文讲解 真是精彩 |
|
[原创][易语言]文件保护专家V9.61算法分析
好东西 收藏! |
|
|
|
过节结束,回家继续努力,贡献看雪几个小工具(附源)!
支持支持,好东西应该大家一起分享 |
|
[原创]绕过流星网络电视(MeteorNetTv) V2.23.3 在线认证
好文 顶 学习学习 |
|
纪念自己学破解一周年的一些文章[已上传]
不错 精神可佳 帮你顶 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值