|
論壇說明 | 標記討論區已讀 |
歡迎您來到『史萊姆論壇』 ^___^ 您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的! 請點擊這裡:『註冊成為我們的一份子!』 |
|
主題工具 | 顯示模式 |
2003-12-12, 01:31 PM | #1 |
榮譽會員
|
3Dmark2003d算法分析
標題:3Dmark2003註冊號的算法研究
軟體:3Dmark 2003 版本:3.1.3.0 下載網站:www.mydrivers.com 破解者: 火翼[CCG] 組織 : [CCG] (China Cracking Group) 使用軟體: OllyDbg+Ida430 昨天才出來的軟體,官方下載位址沒提供註冊號(官方當然不會提供)。 用IDA反彙編,搜尋"Incorrect registration code."在41D8CA找到對這個字串串的使用,向上可以在0041D81E找到關鍵判斷 .text:0041D81E call sub_405190 //關鍵判斷 .text:0041D823 add esp, 4 .text:0041D826 test al, al .text:0041D828 lea ecx, [ebp+var_6C] .text:0041D82B jz loc_41D8CA 跟進去之後,程式碼如下 .text:00405190 push 0FFFFFFFFh .text:00405192 push offset loc_596D31 .text:00405197 mov eax, large fs:0 .text:0040519D push eax .text:0040519E mov large fs:0, esp .text:004051A5 sub esp, 40h .text:004051A8 mov eax, dword_611F00 .text:004051AD xor eax, [esp+4Ch] .text:004051B1 push ebx .text:004051B2 push ebp .text:004051B3 push esi .text:004051B4 push edi .text:004051B5 mov edi, [esp+5Ch+arg_0] .text:004051B9 mov ecx, edi .text:004051BB mov [esp+5Ch+var_10], eax .text:004051BF call ?size@? $basic_string@DU?$char_traits@D@std@@V? $allocator@D@2@@std@@QBEIXZ //MFC字串串類的方法 //得到字串串長度 .text:004051C5 cmp eax, 17h //看輸入的是否是23 //個字串 .text:004051C8 jnz loc_40540C .text:004051CE push 5 .text:004051D0 mov ecx, edi .text:004051D2 call ??A?$basic_string@DU? $char_traits@D@std@@V?$allocator@D @2@@std@@QBEABDI@Z //取字串串的第6 //個字串 .text:004051D8 cmp byte ptr [eax], 2Dh //和"-"比較 以下還有兩處,判斷第12位和第18位是不是"-" .text:00405207 push offset a5azuhNzcd6La83 ; "5AZUH-NZCD6-LA83C-RW5KS" //黑名單 .text:0040520C push edi .text:0040520D call ds:??8std@@YA_NABV? $basic_string@DU?$char_traits@D@std@@V? $allocator@D@2@@0@PBD@Z //字串串比較 .text:00405213 add esp, 8 .text:00405216 test al, al .text:00405218 jnz loc_40540C //相等就跳 現在開始時註冊號的計算程序 一共分為3段 (1)把輸入的字串串在字串表B2CD6FHJ1LN4RSTE3VWX8YZA0Q7MUK9P5 中的位置寫道記憶體中 對應ZA5UH-NZCD6-LA83C-RW5KS 在記憶體中的數字就是 16 17 20 1C 06 - 0A 16 02 03 04 - 09 17 14 10 02 - 0C 12 20 1D 0D 每個數字占32位,「-「用ffffffff代表 程式碼如下 .text:0040521E lea ecx, [esp+30h] .text:00405222 call ds:??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<char,std::char_traits<char>,std::allocator<char>>(void) .text:00405228 lea esi, [esp+30h] .text:0040522C mov dword ptr [esp+58h], 0 .text:00405234 call sub_404A20 .text:00405239 mov ecx, edi .text:0040523B call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:00405241 push eax .text:00405242 lea ecx, [esp+5Ch+var_38] .text:00405246 call sub_405160 .text:0040524B mov ecx, edi .text:0040524D mov byte ptr [esp+58h], 1 .text:00405252 xor ebx, ebx .text:00405254 call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:0040525A test eax, eax .text:0040525C mov esi, [esp+24h] .text:00405260 jbe short loc_405298 .text:00405262 .text:00405262 loc_405262: ; CODE XREF: sub_405190+106j .text:00405262 push ebx .text:00405263 mov ecx, edi .text:00405265 call ds:??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>:perator[](uint) .text:0040526B movsx eax, byte ptr [eax] .text:0040526E push 0 .text:00405270 push eax .text:00405271 lea ecx, [esp+5Ch+var_24] .text:00405275 call ds:?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::find(char,uint) .text:0040527B mov ecx, ds:?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB ; uint const std::basic_string<char,std::char_traits<char>,std::allocator<char>>::npos .text:00405281 cmp eax, [ecx] .text:00405283 jnz short loc_405288 .text:00405285 or eax, 0FFFFFFFFh .text:00405288 .text:00405288 loc_405288: ; CODE XREF: sub_405190+F3j .text:00405288 mov [esi+ebx*4], eax .text:0040528B mov ecx, edi .text:0040528D inc ebx .text:0040528E call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:00405294 cmp ebx, eax .text:00405296 jb short loc_405262 .text:00405298 .text:00405298 loc_405298: ; (2)對記憶體中的編號進行運算得到正確的8個數 算法如下 前三個數是把前三段的頭四個字串對應的編號相加再對21取余, 第4個數是把第5,11,17個字串的編號相加再對21取余, 第5個數是第11,17,19個字串的編號相加再對21取余, 第6個數是把第17,19,20個字串的編號相加再對21取余, 第7個數是把第19,20,21個字串的編號相加再對21取余, 第8個數是把第20,21,22個字串的編號相加再對21取余, 對應ZA5UH-NZCD6-LA83C-RW5KS 第一個 1 2 3 4 16+17+20+1C=69 %21=06 第二個 9 8 10 7 02+16+03+0A=25 %21=04 第三個 15 14 13 16 14+17+09+10=44 %21=02 第四個 5 17 11 06+02+04=0C %21=0C 第五個 17 11 19 02+04+0C=12 %21=12 第六個 20 17 19 12+02+0C=20 %21=20 第七個 19 20 21 0C+12+20=3E %21=1D 第八個 22 20 21 1D+12+20=4F %21=0D CODE XREF: sub_405190+D0j .text:00405298 lea ecx, [esp+54h+var_24] .text:0040529C call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:004052A2 mov ebx, [esi+4] .text:004052A5 mov edi, [esi+0Ch] .text:004052A8 mov edx, [esi] .text:004052AA mov ecx, eax .text:004052AC mov eax, [esi+8] .text:004052AF add eax, ebx .text:004052B1 add eax, edi .text:004052B3 add eax, edx .text:004052B5 xor edx, edx .text:004052B7 div ecx .text:004052B9 lea ecx, [esp+4Ch+var_1C] .text:004052BD mov edi, edx .text:004052BF call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:004052C5 mov ebp, [esi+20h] .text:004052C8 mov ebx, [esi+1Ch] .text:004052CB mov edx, [esi+24h] .text:004052CE mov ecx, eax .text:004052D0 mov eax, [esi+18h] .text:004052D3 add eax, ebp .text:004052D5 add eax, ebx .text:004052D7 add eax, edx .text:004052D9 xor edx, edx .text:004052DB div ecx .text:004052DD lea ecx, [esp+30h] .text:004052E1 mov ebx, edx .text:004052E3 call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:004052E9 mov ebp, [esi+38h] .text:004052EC mov edx, [esi+34h] .text:004052EF mov ecx, eax .text:004052F1 mov eax, [esi+30h] .text:004052F4 add eax, ebp .text:004052F6 mov ebp, [esi+3Ch] .text:004052F9 add eax, edx .text:004052FB add eax, ebp .text:004052FD xor edx, edx .text:004052FF div ecx .text:00405301 lea ecx, [esp+30h] .text:00405305 mov ebp, edx .text:00405307 call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:0040530D mov edx, [esi+40h] .text:00405310 mov ecx, eax .text:00405312 mov eax, [esi+10h] .text:00405315 add eax, edx .text:00405317 add eax, [esi+28h] .text:0040531A xor edx, edx .text:0040531C div ecx .text:0040531E lea ecx, [esp+30h] .text:00405322 mov [esp+34h+var_24], edx .text:00405326 call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:0040532C mov edx, [esi+28h] .text:0040532F mov ecx, eax .text:00405331 mov eax, [esi+40h] .text:00405334 add eax, edx .text:00405336 add eax, [esi+48h] .text:00405339 xor edx, edx .text:0040533B div ecx .text:0040533D lea ecx, [esp+2Ch+arg_0] .text:00405341 mov [esp+2Ch+var_18], edx .text:00405345 call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:0040534B mov edx, [esi+4Ch] .text:0040534E mov ecx, eax .text:00405350 mov eax, [esi+40h] .text:00405353 add eax, edx .text:00405355 add eax, [esi+48h] .text:00405358 xor edx, edx .text:0040535A div ecx .text:0040535C lea ecx, [esp+30h] .text:00405360 mov [esp+18h], edx .text:00405364 call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:0040536A mov edx, [esi+48h] .text:0040536D mov ecx, eax .text:0040536F mov eax, [esi+4Ch] .text:00405372 add eax, edx .text:00405374 add eax, [esi+50h] .text:00405377 xor edx, edx .text:00405379 div ecx .text:0040537B lea ecx, [esp+30h] .text:0040537F mov [esp+1Ch], edx .text:00405383 call ds:?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ ; std::basic_string<char,std::char_traits<char>,std::allocator<char>>::size(void) .text:00405389 mov edx, [esi+54h] .text:0040538C mov ecx, eax .text:0040538E mov eax, [esi+4Ch] .text:00405391 add eax, edx .text:00405393 add eax, [esi+50h] .text:00405396 xor edx, edx .text:00405398 div ecx (3)把這八個數和輸入註冊號的對應位編號比較 第一個 5位 第二個 11位 第三位 17位 第四個 19位 第五個 20位 第六個 21位 第七個 22位 第八個 23位 程式碼如下 .text:0040539A cmp [esi+10h], edi //1 .text:0040539D jnz short loc_4053F1 .text:0040539F cmp [esi+28h], ebx//2 .text:004053A2 jnz short loc_4053F1 .text:004053A4 cmp [esi+40h], ebp//3 .text:004053A7 jnz short loc_4053F1 .text:004053A9 mov eax, [esp+10h] .text:004053AD cmp [esi+48h], eax//4 .text:004053B0 jnz short loc_4053F1 .text:004053B2 mov ecx, [esp+14h] .text:004053B6 cmp [esi+4Ch], ecx//5 .text:004053B9 jnz short loc_4053F1 .text:004053BB mov eax, [esp+14h+arg_0] .text:004053BF cmp [esi+50h], eax//6 .text:004053C2 jnz short loc_4053F1 .text:004053C4 mov ecx, [esp+1Ch] .text:004053C8 cmp [esi+54h], ecx//7 .text:004053CB jnz short loc_4053F1 .text:004053CD cmp [esi+58h], edx//8 .text:004053D0 jnz short loc_4053F1 .text:004053D2 lea ecx, [esp+20h] 總結 註冊號產生算法如下 先在字串串B2CD6FHJ1LN4RSTE3VWX8YZA0Q7MUK9P5中任取12位 組成XXXXa-XXXXb-XXXXc-defgh形的字串,X為任取的字串, a,b,c位對應的前面4個字串在字串串B2CD6FHJ1LN4RSTE3VWX8YZA0Q7MUK9P5中的位置編號(16進制)相加再對21(16進制)取余得到數字對應位置的字串,d為a,b,c位置編號相加再對21取余得到數字對應位置的字串,e為b,c,d位置編號相加再對21取余得到數字對應位置的字串,f為c,d,e位置編號相加再對21取余得到數字對應位置的字串,g為d,e,f位置編號相加再對21取余得到數字對應位置的字串,h為e,f,g位置編號相加再對21取余得到數字對應位置的字串。 註冊機下載,http://firewings.533.net/3dmark2003_kengen.rar |
送花文章: 3,
|