Aurora MPEG To DVD Burner注册算法分析
文/图 zjjtr
人人都说国内的软件安全性太差,今天上网找到一个不错的国外软件Aurora MPEG To DVD Burner,它能将MPEG文件转化为DVD-R、DVD+R、DVD+RW,使其能够在DVD播放机上播放。用它可以创造一个真正的DVD,而不仅仅是硬盘上的一个MPEG文件。下面我就来看看它的安全性如何。
试着注册一下,发现有错误提示“Sorry,Invalid username or registration code”。用PEiD查壳,发现无壳,并且软件是用Microsoft Visual C++ 6.0写的。用OD载入,查找ASCII,并没有那些错误提示,既然弹出了对话框,就用API断点吧。F9运行,点Register,出来注册窗口,User Name填“zjjtr”,Registeration Code填“123456789”。OD中下“bp MessageBoxA”,点击OK按扭,程序成功被断。
77D5058A > 8BFF MOV EDI,EDI ;断在这里
77D5058C 55 PUSH EBP
77D5058D 8BEC MOV EBP,ESP
77D5058F 833D BC04D777 0>CMP DWORD PTR DS:[77D704BC],0
Alt+F9回到程序,点确定,来到这里。
0045E317 /$ 8B4424 08 MOV EAX,DWORD PTR SS:[ESP+8]
0045E31B |. 56 PUSH ESI
0045E31C |. 85C0 TEST EAX,EAX
0045E31E |. 8BF1 MOV ESI,ECX
0045E320 |. 75 08 JNZ SHORT Aurora_M.0045E32A
0045E322 |. E8 AEED0000 CALL Aurora_M.0046D0D5
0045E327 |. 8B40 10 MOV EAX,DWORD PTR DS:[EAX+10]
0045E32A |> 85F6 TEST ESI,ESI
0045E32C |. 75 04 JNZ SHORT Aurora_M.0045E332
0045E32E |. 33C9 XOR ECX,ECX
0045E330 |. EB 03 JMP SHORT Aurora_M.0045E335
0045E332 |> 8B4E 1C MOV ECX,DWORD PTR DS:[ESI+1C]
0045E335 |> FF7424 10 PUSH DWORD PTR SS:[ESP+10]
0045E339 |. 50 PUSH EAX
0045E33A |. FF7424 10 PUSH DWORD PTR SS:[ESP+10]
0045E33E |. 51 PUSH ECX
0045E33F |. FF15 7C764700 CALL DWORD PTR DS:[<&USER32.MessageBoxA>>
0045E345 |. 5E POP ESI ;来到这里
往前看到0045E317,发现“本地调用来自 00422FD7,00423005”,我们分别来到00422FD7和00423005,直接从00422FD7处分析。重新载入程序,在00422F70 处下断点,程序停了下来:
00422F70 . 6A FF PUSH -1 ;断点
00422F72 . 68 F8444700 PUSH Aurora_M.004744F8
00422F77 . 64:A1 0000000>MOV EAX,DWORD PTR FS:[0]
00422F7D . 50 PUSH EAX
00422F7E . 64:8925 00000>MOV DWORD PTR FS:[0],ESP
00422F85 . 83EC 08 SUB ESP,8
00422F88 . A1 34404900 MOV EAX,DWORD PTR DS:[494034]
00422F8D . 56 PUSH ESI
00422F8E . 8BF1 MOV ESI,ECX
00422F90 . 894424 04 MOV DWORD PTR SS:[ESP+4],EAX
00422F94 . 6A 01 PUSH 1
00422F96 . C74424 18 000>MOV DWORD PTR SS:[ESP+18],0
00422F9E . E8 6ABE0300 CALL Aurora_M.0045EE0D ;注册码
00422FA3 . E8 2DA10400 CALL Aurora_M.0046D0D5
00422FA8 . 8B48 04 MOV ECX,DWORD PTR DS:[EAX+4] ;固定字符串“hyG”
00422FAB . E8 D88A0300 CALL Aurora_M.0045BA88
00422FB0 . 8B46 60 MOV EAX,DWORD PTR DS:[ESI+60] ;注册码移入EAX
00422FB3 . 8B4E 5C MOV ECX,DWORD PTR DS:[ESI+5C] ;用户名移入ECX
00422FB6 . 50 PUSH EAX
00422FB7 . 51 PUSH ECX
00422FB8 . C64424 1C 01 MOV BYTE PTR SS:[ESP+1C],1
00422FBD . E8 CEFCFFFF CALL Aurora_M.00422C90 ;算法call,F7追入
00422FC2 . 83C4 08 ADD ESP,8
00422FC5 . 85C0 TEST EAX,EAX
00422FC7 . 75 18 JNZ SHORT Aurora_M.00422FE1 ;不等就注册失败,这里可以爆破
00422FC9 . 6A 40 PUSH 40
00422FCB . 68 28FC4800 PUSH Aurora_M.0048FC28
00422FD0 . 68 FCFB4800 PUSH Aurora_M.0048FBFC
00422FD5 . 8BCE MOV ECX,ESI
00422FD7 . E8 3BB30300 CALL Aurora_M.0045E317 ;调用上面出错信息的call
00422FDC . E9 A0000000 JMP Aurora_M.00423081
00422FE1 > 8B4E 5C MOV ECX,DWORD PTR DS:[ESI+5C]
00422FE4 . 8D5424 04 LEA EDX,DWORD PTR SS:[ESP+4]
00422FE8 . 51 PUSH ECX
00422FE9 . 68 E0FB4800 PUSH Aurora_M.0048FBE0 ;ASCII "License To:%s "
00422FEE . 52 PUSH EDX
00422FEF . E8 20520300 CALL Aurora_M.00458214
00422FF4 . 8B4424 10 MOV EAX,DWORD PTR SS:[ESP+10]
00422FF8 . 83C4 0C ADD ESP,0C
00422FFB . 8BCE MOV ECX,ESI
00422FFD . 6A 40 PUSH 40
00422FFF . 68 D4FB4800 PUSH Aurora_M.0048FBD4 ;ASCII "Thank you"
00423004 . 50 PUSH EAX
00423005 . E8 0DB30300 CALL Aurora_M.0045E317 ;如果运行到这里注册成功
0042300A . 8B46 5C MOV EAX,DWORD PTR DS:[ESI+5C]
0042300D . B9 38844900 MOV ECX,Aurora_M.00498438
00423012 . 50 PUSH EAX
00423013 . E8 E83CFFFF CALL Aurora_M.00416D00
00423018 . 8B46 60 MOV EAX,DWORD PTR DS:[ESI+60]
0042301B . B9 38844900 MOV ECX,Aurora_M.00498438
00423020 . 50 PUSH EAX
00423021 . E8 0A3DFFFF CALL Aurora_M.00416D30
00423026 . E8 AAA00400 CALL Aurora_M.0046D0D5
0042302B . 8B40 04 MOV EAX,DWORD PTR DS:[EAX+4]
0042302E . 8D4C24 04 LEA ECX,DWORD PTR SS:[ESP+4]
00423032 . 51 PUSH ECX
00423033 . 8D5424 0C LEA EDX,DWORD PTR SS:[ESP+C]
00423037 . 68 08D74800 PUSH Aurora_M.0048D708
0042303C . 52 PUSH EDX
0042303D . C680 C1000000>MOV BYTE PTR DS:[EAX+C1],1
00423044 . E8 557D0300 CALL Aurora_M.0045AD9E
00423049 . 50 PUSH EAX
0042304A . 8D4C24 08 LEA ECX,DWORD PTR SS:[ESP+8]
0042304E . C64424 18 02 MOV BYTE PTR SS:[ESP+18],2
00423053 . E8 767B0300 CALL Aurora_M.0045ABCE
00423058 . 8D4C24 08 LEA ECX,DWORD PTR SS:[ESP+8]
0042305C . C64424 14 01 MOV BYTE PTR SS:[ESP+14],1
00423061 . E8 2F7A0300 CALL Aurora_M.0045AA95
00423066 . E8 6AA00400 CALL Aurora_M.0046D0D5
0042306B . 8B40 04 MOV EAX,DWORD PTR DS:[EAX+4]
0042306E . 8B4C24 04 MOV ECX,DWORD PTR SS:[ESP+4]
00423072 . 51 PUSH ECX
00423073 . 8BC8 MOV ECX,EAX
00423075 . 8B10 MOV EDX,DWORD PTR DS:[EAX]
00423077 . FF52 74 CALL DWORD PTR DS:[EDX+74]
0042307A . 8BC8 MOV ECX,EAX
0042307C . E8 21C90300 CALL Aurora_M.0045F9A2
00423081 > 8BCE MOV ECX,ESI
00423083 . E8 3D950300 CALL Aurora_M.0045C5C5
00423088 . C64424 14 00 MOV BYTE PTR SS:[ESP+14],0
0042308D . E8 43A00400 CALL Aurora_M.0046D0D5
00423092 . 8B48 04 MOV ECX,DWORD PTR DS:[EAX+4]
00423095 . E8 038A0300 CALL Aurora_M.0045BA9D
0042309A . 8D4C24 04 LEA ECX,DWORD PTR SS:[ESP+4]
0042309E . C74424 14 FFF>MOV DWORD PTR SS:[ESP+14],-1
004230A6 . E8 EA790300 CALL Aurora_M.0045AA95
004230AB . 8B4C24 0C MOV ECX,DWO
上一篇: .net带事件的对象BinaryFormatter 序列化失败
下一篇: Python 文件操作